Skip to main content

Python client for ECMWF web services API.

Project description

ecmwf-api-client

Installation

Install via pip with:

$ pip install ecmwf-api-client

Configure

Note that the key expires in 1 year. You will receive an email to the registered email address 1 month before the expiration date with the renewal instructions. To check the expiry date of your current key log into www.ecmwf.int, and go to https://api.ecmwf.int/v1/key/.

  • Copy the information in this page and paste it in the file $HOME/.ecmwfapirc (Unix/Linux) or %USERPROFILE%.ecmwfapirc (Windows: usually in C:\Users<USERNAME>.ecmwfapirc ; see how to create a file with a leading dot).

Your $HOME/.ecmwfapirc (Unix/Linux) or %USERPROFILE%.ecmwfapirc (Windows) should look something like this:

{
    "url"   : "https://api.ecmwf.int/v1",
    "key"   : "XXXXXXXXXXXXXXXXXXXXXX",
    "email" : "john.smith@example.com"
}

Test

You can test this small python script to retrieve TIGGE data:

#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer

# To run this example, you need an API key 
# available from https://api.ecmwf.int/v1/key/

server = ECMWFDataServer()    
server.retrieve({
    'origin'    : "ecmf",
    'levtype'   : "sfc",
    'number'    : "1",
    'expver'    : "prod",
    'dataset'   : "tigge",
    'step'      : "0/6/12/18",
    'area'      : "70/-130/30/-60",
    'grid'      : "2/2",
    'param'     : "167",
    'time'      : "00/12",
    'date'      : "2014-11-01",
    'type'      : "pf",
    'class'     : "ti",
    'target'    : "tigge_2014-11-01_0012.grib"
})

License

Copyright 2019 European Centre for Medium-Range Weather Forecasts (ECMWF) Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. In applying this licence, ECMWF does not waive the privileges and immunities granted to it by virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecmwf-api-client-1.5.4.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

ecmwf_api_client-1.5.4-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file ecmwf-api-client-1.5.4.tar.gz.

File metadata

  • Download URL: ecmwf-api-client-1.5.4.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for ecmwf-api-client-1.5.4.tar.gz
Algorithm Hash digest
SHA256 5b31c4c8c6d0c344dfaed038b388d1b70e8b9d4ea6ad732e5d827a25d5acc573
MD5 b7f0410c6e6b53bfb6c050aa3eded7c0
BLAKE2b-256 7437b20dfa5573b4ffd88897369567c143ca1e93610fb54f0c9082daf01feb30

See more details on using hashes here.

File details

Details for the file ecmwf_api_client-1.5.4-py3-none-any.whl.

File metadata

  • Download URL: ecmwf_api_client-1.5.4-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for ecmwf_api_client-1.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c8d421e534e0f8dee0c28797dfd107ef6101ae02277a56a7eb1988036a7a1606
MD5 4a97e57aac0f25968a7284f799657a48
BLAKE2b-256 8ebfd9a58b41e234d6f4b3d55252d99107a9f51975cd9dc84a95935c1aa42043

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page