Skip to content

Repository files navigation

cwms-cli

A collection of scripts to create, read, update, list, and delete data through CWMS Data API (CDA) and other commonly used API in the US Army Corps of Engineers water management. CWMS-CLI wraps these API in a friendly to use terminal based interface.

Docs - 📖 Read the docs: https://cwms-cli.readthedocs.io/en/latest/

Install

pip install cwms-cli

Note: You may need to run python -m pip install cwms-cli if PIP is not in your path.

Update

pip install cwms-cli --upgrade

Or as of version 0.3.0+

cwms-cli update

To install a specific version:

cwms-cli update --target-version 0.7.1 --yes

Command line implementation

View the help in terminal:

cwms-cli --help

run from within python

from cwmscli.usgs.getusgs_cda import getusgs_cda
from cwmscli.usgs.getusgs_measurements_cda import getusgs_measurements_cda
from cwmscli.usgs.getUSGS_ratings_cda import getusgs_rating_cda

Development environment

The repository includes a Linux/Python 3.12 development container exercised by a dedicated CI job. Open the repository with the VS Code Dev Containers extension, or use the Dev Container CLI:

devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . poetry run pytest -q

The container installs project dependencies with Poetry and uses /home/vscode/.venv, so it does not reuse a host operating system's .venv. Poetry itself is kept in a separate /opt/poetry environment. Use the container for changes involving time zones, paths, native libraries, or other operating-system-dependent behavior. Standard Python 3.9 and Python 3.12 installations remain covered by the existing CI matrix.

About

Command line utilities used for Corps Water Management Systems (CWMS) processes

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages