pycommontools
A collection of common Python utilities and tools for your personal projects.
Installation
pip install pycommontools
# or
uv add pycommontools
Features
Resources
Singleton Metaclass - Implement the singleton pattern easily:
from pycommontools.resources.singleton import Singleton
class DatabaseConnection(metaclass=Singleton):
def __init__(self, host: str):
self.host = host
# Both instances will be the same object
db1 = DatabaseConnection("localhost")
db2 = DatabaseConnection("localhost")
assert db1 is db2 # True
Configs
Logger Setup - Configure loggers with custom levels:
from pycommontools.configs.logging import setup_logger
import logging
# Create a logger with DEBUG level
logger = setup_logger("myapp", level=logging.DEBUG)
logger.debug("Debug message")
logger.info("Info message")
# Create a logger with WARNING level
warn_logger = setup_logger("myapp.warnings", level="WARNING")
Development
This project uses uv for dependency management.
# Install dependencies
uv sync
# Run tests (when available)
uv run pytest
Requirements
- Python 3.13+
License
MIT
Metadata
Release files for pycommontools 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycommontools-0.0.4.tar.gz | 2.9 kB | Without provenance | Details for pycommontools-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycommontools-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for pycommontools-0.0.4-py3-none-any.whl |
Total release size: 7.7 kB
Release files / pycommontools-0.0.4.tar.gz
| Download URL | pycommontools-0.0.4.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2834a694739fe7b0dace0b894359664d94a6a3868513c76d85a427befa2744b
|
|
BLAKE2b-256 checksum How to use checksums |
a6809b02d6786a32a61d329cdc9ec18320387b3c6820953dfa16f58e90afe9e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pycommontools-0.0.4-py3-none-any.whl
| Download URL | pycommontools-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89435ff0c8c8fd6b06efdfcb79a2c06a9ae532bbda814fba96a07c78f922de3c
|
|
BLAKE2b-256 checksum How to use checksums |
c486a4b577f34d824d2f07f7794648a4760c9870d4425d1cc2b6303464ae7e47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pycommontools 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.