Corps water managerment systems (CWMS) REST API for Data Retrieval of USACE water data
Project description
CWMSpy
CWMS REST API for Data Retrieval
Requirements.
Python 3.8+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/HydrologicEngineeringCenter/cwms-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/HydrologicEngineeringCenter/cwms-python.git
)
Then import the package:
from CWMS import CWMS
Getting Started
Please follow the installation procedure and then run the following:
from CWMS import CWMS
from datetime import datetime, timedelta
apiRoot = 'CDA url to connect to'
cwms = CWMS()
cwms.connect(apiRoot)
end = datetime.now()
start = end - timedelta(days = 10)
df cwms.retrieve_ts(p_tsId='Some.Fully.Qualified.Ts.Id',p_start_date = start, p_end_date = end)
ts_df.head()
date-time value quality-code
0 2023-12-25 06:00:00 1432.82 0
1 2023-12-28 06:00:00 1432.86 0
2 2023-12-29 06:00:00 1432.92 0
3 2023-12-30 06:00:00 1432.92 0
4 2023-12-31 06:00:00 1432.91 0
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
cwms-python-0.1.0.tar.gz
(13.1 kB
view hashes)
Built Distribution
Close
Hashes for cwms_python-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 115d559d37e65dd9f70ce00296e921e23c01ec609034031ca6bec7b6f2adfef5 |
|
MD5 | ccd2ed1aabb8ac0df8e78fef3b2e6308 |
|
BLAKE2b-256 | 9abb020827fda14f3f561c28ababc4ed18bae35a6b2b22ae4be8c4a114b5c57a |