cmdop-utils
Small framework-neutral utilities shared by CMDOP services.
pip install cmdop-utils
As of 0.2.0, the former umbrella package has been split:
- LLM transport and the current agent harness:
pip install cmdop-llm(import cmdop_llm) - Client generation:
pip install cmdop-codegen(import cmdop_codegen) - The obsolete
cmdop_utils.agentimplementation was removed; use the harness shipped incmdop_llm.agent.
cmdop-utils now contains only focused logging and Telegram helpers.
Structured logging
from cmdop_utils.logging import configure_logging, get_logger
configure_logging(service="billing", environment="production")
logger = get_logger(__name__)
logger.info("invoice_created", invoice_id="inv_123", amount="19.00")
The logger uses structlog, async-safe queue-backed sinks, compact machine
output, context scoping, redaction, rate limiting, and a Rich console renderer.
Telegram
from cmdop_utils.telegram import DjangoTelegram
telegram = DjangoTelegram(
bot_token="your-token",
chat_id="your-chat-id",
)
telegram.send_message("Deployment completed", fail_silently=True)
DjangoTelegram keeps its historical name but does not depend on Django.
Credentials can be passed explicitly or supplied through the env-backed
cmdop_utils._compat configuration seam.
Development and release
python -m pip install -e ".[dev]"
pytest
python ../publishing/publish.py cmdop-utils --build-only
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cmdop_utils-0.2.1.tar.gz.
File metadata
- Download URL: cmdop_utils-0.2.1.tar.gz
- Upload date:
- Size: 105.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ca1a254c2301c54a9e21dd416e6d2ea3b88ad305b6f21ba6224319af80d093f
|
|
| MD5 |
5614c6147b055b303cb9d12e58c24255
|
|
| BLAKE2b-256 |
1f4485aac495c6aaf715e785796e04e51f1f2e1c60d8d69b075752f64efc0963
|
File details
Details for the file cmdop_utils-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cmdop_utils-0.2.1-py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
183998fc3342c5c528850f7722f588593ed92779bb53dcf4b91e39f82ada79ac
|
|
| MD5 |
995b4dd4c7798c265618def24ea9248e
|
|
| BLAKE2b-256 |
f35d85088c929891774c02ed691e2e0b7c7e741903748e41016ac6ec74592955
|