Python wrapper for interacting with the CBIBS API
Project description
python-cbibs
Python module to interact with the CBIBS API.
Installation
To get the package, execute:
pip install python-cbibs
Usage
View the CBIBS API documentation on CBIBS. By default the response output will be in JSON format. If you would like XML, configure your instance to use XML (see example below).
Then set up an CBIBS instance, set your API key, and make any available requests.
from cbibs.buoy import Cbibs
# Create CBIBS instance
buoy = Cbibs(api_key='API_KEY')
buoy_xml = Cbibs(api_key='API_KEY', response_format='xml')
# Get all current readings from all stations
latest_all = buoy.get_current_readings_all_stations()
# Get the latest station readings from AN
station_readings = buoy.get_station_readings('AN')
# Query a specific station with parameters
station_variable = buoy.query_station(
station_name="AN",
start_date='2020-04-01T10:00:00z',
end_date='2020-04-01T20:00:00z',
variable="sea_water_temperature"
)
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_cbibs-0.0.3.tar.gz.
File metadata
- Download URL: python_cbibs-0.0.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3cac58f4635c84497a1a9b3a34ca3528a950a0c4c98023c298208c8bb8ab2c8
|
|
| MD5 |
80a0c0d4c91b8b2953923054de6a2f06
|
|
| BLAKE2b-256 |
b25dbd61a7513e024d6e4c46325aa55ec0eb4fc0cf7deacd39f9231f553ff09a
|
File details
Details for the file python_cbibs-0.0.3-py3-none-any.whl.
File metadata
- Download URL: python_cbibs-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb2e0553a08a8b5b87e4d21e7a21ced46157fe451197a8c262c5a4ddb8e17ed9
|
|
| MD5 |
2f8f56d8fb25f7b1412edb2af04437a6
|
|
| BLAKE2b-256 |
40d31f497b15d6bd5f0d45339896d3ba8d408be085554a23f6378f0f505c387e
|