Skip to main content

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.agent implementation was removed; use the harness shipped in cmdop_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

cmdop_utils-0.2.1.tar.gz (105.3 kB view details)

Uploaded Source

Built Distribution

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

cmdop_utils-0.2.1-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

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

Hashes for cmdop_utils-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0ca1a254c2301c54a9e21dd416e6d2ea3b88ad305b6f21ba6224319af80d093f
MD5 5614c6147b055b303cb9d12e58c24255
BLAKE2b-256 1f4485aac495c6aaf715e785796e04e51f1f2e1c60d8d69b075752f64efc0963

See more details on using hashes here.

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

Hashes for cmdop_utils-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 183998fc3342c5c528850f7722f588593ed92779bb53dcf4b91e39f82ada79ac
MD5 995b4dd4c7798c265618def24ea9248e
BLAKE2b-256 f35d85088c929891774c02ed691e2e0b7c7e741903748e41016ac6ec74592955

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page