Metadata-Version: 2.4
Name: cwms-cli
Version: 0.8.0
Summary: Command line utilities for Corps Water Management Systems (CWMS) python scripts. This is a collection of shared scripts across the enterprise Water Management Enterprise System (WMES) teams.
License: LICENSE
License-File: LICENSE
Keywords: USACE,CWMS,CLI,Hydrologic Engineering Center,HEC,Hydrology,Hydraulics,Water Resources,DSS
Author: Eric Novotny
Author-email: eric.v.novotny@usace.army.mil
Requires-Python: >=3.9,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Provides-Extra: dss
Requires-Dist: click (>=8.1.8,<9.0.0)
Requires-Dist: colorama (>=0.4.6,<0.5.0)
Requires-Dist: cwms-python (>=1.0.7) ; extra == "dss"
Requires-Dist: hec-python-library (>=0.9.5) ; extra == "dss"
Requires-Dist: hecdss (>=0.1.24) ; extra == "dss"
Requires-Dist: requests (>=2.32.0,<3.0.0) ; python_version == "3.9"
Requires-Dist: requests (>=2.33.0,<3.0.0) ; python_version >= "3.10"
Project-URL: Repository, https://github.com/HydrologicEngineeringCenter/cwms-cli
Description-Content-Type: text/markdown

# 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](https://readthedocs.org/projects/cwms-cli/badge/?version=latest)](https://cwms-cli.readthedocs.io/en/latest/cli.html#cwms-cli) - 📖 Read the docs: https://cwms-cli.readthedocs.io/en/latest/

## Install

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


### Update
```sh
python -m pip install --upgrade cwms-cli
```

Or as of version `0.3.0+`
```sh
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:
```sh
cwms-cli update --target-version 0.7.1 --yes
```

## Command line implementation

View the help in terminal:
```sh
cwms-cli --help
```

## run from within python
```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:

```sh
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.

