Skip to main content

The utility package of Dou Inc.

Project description

dou-utils

Composition of utils for Dou Inc. projects.

DouCLI

Installs files for python formatting options.

Quickstart

# initiate project with `uv init`
# add dou-utils with `uv add dou-utils`
dou install formatting

DouLogger

A simple and flexible Python logging utility with enhanced features for structured logging.

Features

  • Easy-to-use logging methods: info, debug, warning, error.
  • Structured logging support: Pass additional metadata with your log messages.
  • Configurable logging levels: Control the verbosity of your logs.

Installation

Install DouLogger directly from the GitHub repository:

pip install git+https://github.com/douinc/dou-python-utils.git@v0.1.0

Quick Start

Import the logger from the dou package:

from dou import logger

Basic Logging

Log messages at different severity levels:

logger.info("This is an info message")
logger.debug("This is a debug message")
logger.warning("This is a warning message")
logger.error("This is an error message")

Structured Logging

Include additional metadata in your logs for better traceability:

logger.info(
    message={
        "event": "user_signup",
        "user_id": 12345,
    },
    search_id="abcde12345",
)

Development

uv build
uv pip install -e .

Publish

uv publish

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For questions or suggestions, please open an issue or contact us at team@dou.so

Project details


Download files

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

Source Distribution

dou_utils-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

dou_utils-0.1.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file dou_utils-0.1.2.tar.gz.

File metadata

  • Download URL: dou_utils-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.1

File hashes

Hashes for dou_utils-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4e2b7416b84967c3fdae29ed57696ab3769e4769f3dbff6cef55c379ef983950
MD5 cc61dd28ec2d5bf8127d880c5afb2889
BLAKE2b-256 4933b41e3385eebc9f6054c26cae23e8ac2e9058aa9f2f953c8dbc7d6d1f9429

See more details on using hashes here.

File details

Details for the file dou_utils-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dou_utils-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.1

File hashes

Hashes for dou_utils-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ecbf29499df0ec855da3142fee08fe75964bda3c25c9992a4a7369dda1df17b0
MD5 ce1954057cc8d3d99b4038efa7dd33dd
BLAKE2b-256 9a306d3ee5b6c9269cf168a85f5116570bb8bd5257944d70ceb3ec175e9a92e3

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 Pingdom Monitoring Sentry Error logging StatusPage Status page