Python 3.6+ compatible interface to ECMWF's ODB API
Project description
py3odb
Python 3.6+ compatible interface to ECMWF’s ODB API
Overview
ODB API was developed by the European Centre for Medium-Range Weather Forecasts for “encoding and processing of observational data.” The ODB API provides an SQL-like interface called odbsql, along with a Python 2 compatible API.
This module was written to provide an interface to ODB API using Python >=3.6. It requires access to libOdb provided by ODB API.
Usage
py3odb follows the Python Database API Specification:
import py3odb connection = py3odb.connect('foo.db') cursor = connection.cursor() cursor.execute('SELECT * FROM "foo.db"') for row in cursor: print(row) connection.close()
For single queries, there is a Reader context manager and <odb> tag:
import py3odb with py3odb.Reader('foo.db', 'SELECT * FROM <odb>') as odb_reader: for row in odb_reader: print(row)
Known Limitations
The intent of this library is to read odb2 files generated by the Unified Model for the purpose of observation monitoring. The underlying odbql interface to the ODB API provided by ECMWF does not support database operations in a traditional sense. For example: * as of ODB API version 17.6, odbql only supports 8 character strings * only the most recent INSERT command is accepted * you cannot open an existing odb file and do an INSERT
References
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
Built Distribution
File details
Details for the file py3odb-0.3.tar.gz
.
File metadata
- Download URL: py3odb-0.3.tar.gz
- Upload date:
- Size: 56.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9034ee41732ebe73ad0cf384a5edd0102749caacc221b41bb76084a0806d0897 |
|
MD5 | 0f259403e5d919539266a1f25736f596 |
|
BLAKE2b-256 | 3bfee3092d52060fb03e6f2ddc1e8457033f6e740b751323c922239a980f9efe |
File details
Details for the file py3odb-0.3-py3-none-any.whl
.
File metadata
- Download URL: py3odb-0.3-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5e54d02d05ac094b5f8ffe6db094c04563ce6e6dfd0d36099383af53aa7ce8d |
|
MD5 | 135d11083fde0e4f067febb93c3c3eb2 |
|
BLAKE2b-256 | a44a129b1b10c20fd72fe0c222a1f25e077fc62592240b7a866564bea9481362 |