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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ecmwf-api-client-1.5.6.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

File hashes

Hashes for ecmwf-api-client-1.5.6.tar.gz
Algorithm Hash digest
SHA256 d92bfa59a900921dd0f06bfe8b720ba857d59ada1a811241fbbea35fcfdc1836
MD5 7f7a8575f8f2a4b250a06a55b0472ff6
BLAKE2b-256 0de410be19c320c3f55533b4799b47bd3ddba865028f134d74ab915dd7263d26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ecmwf_api_client-1.5.6-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

File hashes

Hashes for ecmwf_api_client-1.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 104e87e30871415962dc306ccf32673bee2404cc6849e09e235b8be513f38ac8
MD5 265199cc82636c61f6a0f724e6b02b2e
BLAKE2b-256 d77e6f554d533b49b099e6a48865b728573b4e05058b059bc659dc886e11bba1

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