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.6.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

ecmwf_api_client-1.6.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ecmwf-api-client-1.6.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for ecmwf-api-client-1.6.0.tar.gz
Algorithm Hash digest
SHA256 5236d23d1559cdfa4525701a86a1f3bb2b3994cdd0b9aa5762ddd6cef708b160
MD5 db047941c8c7f1b577b319e0bbdc4dbf
BLAKE2b-256 49b76460f9f4e7d89303d7b39ae16b8943b913d662a1c0d4b8eea1af00fcc2e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ecmwf_api_client-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for ecmwf_api_client-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 582a048bc4d587bfe444e37ab87f6f2bb0df2637097cd583cfb6a5b210f01596
MD5 3330ad56ac345495fc6845c902d0b81c
BLAKE2b-256 32b88cd155c9f35a2d5e2ca341ae9b6b1eda8ee068b46962ce361ec35de3cb84

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