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:

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({
    'dataset' : 'tigge',
    'step'    : '24',
    'number'  : 'all',
    'levtype' : 'sl',
    'date'    : '20071001',
    'time'    : '00',
    'origin'  : 'all',
    'type'    : 'pf',
    'param'   : 'tp',
    'area'    : '70/-130/30/-60',
    'grid'    : '2/2',
    'target'  : 'data.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.3.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

ecmwf_api_client-1.5.3-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ecmwf-api-client-1.5.3.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for ecmwf-api-client-1.5.3.tar.gz
Algorithm Hash digest
SHA256 87af6caaa18f44a24673419e29d784f2baf1855be3f84f1d5105196f97ed2d3f
MD5 89ff70174f9338ac40ffacf3df1d066c
BLAKE2b-256 4fad30cb0fde3b695072288d4d00678921a8b445dcb6fe1832638f1eba49ad87

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ecmwf_api_client-1.5.3-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for ecmwf_api_client-1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 03d30ed9bee7445c487ec1462e87e81fdea2a39f06661242dec3386064c5e752
MD5 afbfd5a37889bae1646901f29ae3879a
BLAKE2b-256 00733b545ced1b20e5eb3d54ff2c418d851b22898bd126ccf996d0808dc695c5

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