Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.79 KB

README.md

File metadata and controls

50 lines (38 loc) · 1.79 KB

cwmspy

Wrapper around the HEC CWMS api

Visit the documentation for full description.

Installation

pip install git+https://github.com/jetilton/cwmspy.git

You will need to navigate to the package location and create a .env file with the appropriate user, password, host and service name to automatically connect to the CWMS Oracle database. You will also need to have followed the instructions for the python package cx_Oracle.

Usage example

from cwmspy import CWMS 

cwms = CWMS()
cwms.connect()
df = cwms.retrieve_ts(p_cwms_ts_id='Some.Fully.Qualified.Ts.Id', start_time='2019/1/1', end_time='2019/9/1', return_df=True)

df.head()
            date_time  value  quality_code
0 2018-12-31 23:00:00    NaN             5
1 2019-01-01 00:00:00    0.0             0
2 2019-01-01 01:00:00    0.0             0
3 2019-01-01 02:00:00    0.0             0
4 2019-01-01 03:00:00    0.0             0

Visit the documentation for more examples.

Meta

Jeff Tilton – [email protected]

https://github.com/jetilton/cwmspy

Contributing

  1. Fork it (https://github.com/jetilton/cwmspy/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request