Skip to main content

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

python -m pip install --upgrade cwms-cli

Or as of version 0.3.0+

cwms-cli update

cwms-cli update displays the Python executable, environment, package metadata location, and editable project location when applicable before asking for confirmation. It runs pip through the same Python interpreter that is running cwms-cli, avoiding accidental updates to a different Python installation or virtual environment.

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. The workspace root is also added to PYTHONPATH, so the checked-out source and local test modules are available throughout a Codespace without copying them into the image. 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cwms_cli-0.8.1.tar.gz (111.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cwms_cli-0.8.1-py3-none-any.whl (142.7 kB view details)

Uploaded Python 3

File details

Details for the file cwms_cli-0.8.1.tar.gz.

File metadata

  • Download URL: cwms_cli-0.8.1.tar.gz
  • Upload date:
  • Size: 111.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cwms_cli-0.8.1.tar.gz
Algorithm Hash digest
SHA256 ab6ed3b8c464f846b2a7d3ce8f4a9e7debfef04ba3825e4b5b5becd0144f0047
MD5 66285219dfaedbdc6e0a45235f4016c4
BLAKE2b-256 4a3be68d5eb93cbbd962b1aa03ee207e5f8a501b7922e44b9a2d7930ed7b9a8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwms_cli-0.8.1.tar.gz:

Publisher: release-please.yml on HydrologicEngineeringCenter/cwms-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cwms_cli-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: cwms_cli-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 142.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cwms_cli-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ecadb258c8d95979cef6fc3e91898f225c4f142dfdef89f3af9043741f859ae
MD5 bbc18c0bff6f8cabc0e84a4fd3e7a429
BLAKE2b-256 3da210b8493c5f7b6427e8488f57bd998146f166d551eb1201595074e2ab43f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cwms_cli-0.8.1-py3-none-any.whl:

Publisher: release-please.yml on HydrologicEngineeringCenter/cwms-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 files

0.8.0

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.1.5

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page