Metadata-Version: 2.5
Name: grow-datadog-logs
Version: 0.1.1
Summary: Grow Codes SDK for Datadog Log Management (unofficial, community maintained)
Project-URL: Homepage, https://grow-codes-packages.github.io/datadog-logs/
Project-URL: Documentation, https://grow-codes-packages.github.io/datadog-logs/
Project-URL: Repository, https://github.com/grow-codes-packages/datadog-logs
Project-URL: Issues, https://github.com/grow-codes-packages/datadog-logs/issues
Author-email: Grow Codes <opensource@grow.codes>
Maintainer-email: Grow Codes <opensource@grow.codes>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: datadog-logs,grow-codes,logging,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Requires-Dist: opentelemetry-api<2,>=1.27
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.27
Requires-Dist: opentelemetry-sdk<2,>=1.27
Provides-Extra: all
Requires-Dist: structlog>=24.1; extra == 'all'
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: hatchling>=1.25; extra == 'dev'
Requires-Dist: mkdocs>=1.6; extra == 'dev'
Requires-Dist: mkdocstrings[python]>=0.27; extra == 'dev'
Requires-Dist: mypy>=1.13; extra == 'dev'
Requires-Dist: pip-licenses>=5.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: respx>=0.22; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: structlog>=24.1; extra == 'dev'
Requires-Dist: twine>=6.1; extra == 'dev'
Provides-Extra: structlog
Requires-Dist: structlog>=24.1; extra == 'structlog'
Description-Content-Type: text/markdown

# grow-datadog-logs (Python)

Python SDK for [Datadog Log Management](https://grow-codes-packages.github.io/datadog-logs/) by Grow Codes.
Unofficial and community maintained; "Datadog Log Management" is a trademark of Datadog, Inc. Not affiliated with or endorsed by Datadog.

```bash
pip install grow-datadog-logs
```

```python
import grow_datadog_logs as sdk

# Reads DD_API_KEY, DD_APP_KEY, DD_SITE, DD_SERVICE, DD_ENV, DD_TAGS, GROW_DATADOG_LOGS_* ...
with sdk.DatadogLogsClient.from_env() as client:
    assert client.validate_api_key()
    logs = client.log_client(resource={"service.name": "checkout"})  # batching, gzip
    logs.logger().info("user signed in", {"user": {"id": 42}})
    logs.flush(10)

    query = client.query()  # needs the application key
    page = query.search_logs('service:checkout "signed in"', from_="now-1h", limit=50)
    counts = query.aggregate_logs(sdk.DatadogCompute("count"), [sdk.DatadogGroupBy("status")])
# close() flushed every log client
```

The async client has the same methods:

```python
import asyncio
from grow_datadog_logs import AsyncDatadogLogsClient

async def main() -> None:
    async with AsyncDatadogLogsClient.from_env() as client:
        print(await client.health())

asyncio.run(main())
```

- Python 3.10 or newer, typed (`py.typed`), `httpx` based, environment proxies ignored unless
  configured.
- Retries with full-jitter backoff and `Retry-After`, connect/request/total timeouts,
  cancellation, hooks and a silent-by-default `logging` logger named `grow_datadog_logs`.
- Credentials are wrapped in `Secret` and never appear in `repr()`, logs or error messages.
- `grow_datadog_logs.testing` ships in-memory fakes and the conformance runner.

Documentation: https://grow-codes-packages.github.io/datadog-logs/ ·
Source: https://github.com/grow-codes-packages/datadog-logs · Licence: Apache-2.0
