danielutils
Python utilities for day-to-day development — type safety, async helpers, database abstractions, retry executors, data structures, and DX tools in one MIT-licensed package.
Requires Python 3.11+.
Why danielutils?
Common scripting and library work often re-implements the same helpers. danielutils packages the ones used across projects so you can validate types at runtime, talk to several DB backends behind one API, retry flaky calls, and ship progress/logging/reflection utilities without reinventing them.
- Type safety —
isoftype,@validate,@overload, typed collections (tlist, …) - Async — worker pools and async utilities
- Database abstractions — SQLite, Redis, and in-memory backends via one factory
- Retry — configurable executors with backoff strategies
- Data structures & algorithms — graphs, heaps, and related helpers
- DX — progress bars, logging, reflection, debugging aids
- Academic — probability / statistics helpers under
university
Install
pip install danielutils
# or
uv add danielutils
Quick start
from danielutils import isoftype, validate, tlist
from danielutils.abstractions.db import DatabaseFactory
from danielutils.abstractions.db.database_definitions import TableSchema, TableColumn, ColumnType
numbers = tlist[int]([1, 2, 3, 4, 5])
@validate
def greet(name: str, age: int) -> str:
return f"Hello {name}, you are {age} years old"
db = DatabaseFactory.get_database("memory")
with db:
schema = TableSchema(
name="users",
columns=[
TableColumn(name="id", type=ColumnType.AUTOINCREMENT, primary_key=True),
TableColumn(name="name", type=ColumnType.TEXT, nullable=False),
TableColumn(name="age", type=ColumnType.INTEGER),
],
)
db.create_table(schema)
db.insert("users", {"name": "Alice", "age": 30})
if isoftype(numbers, list[int]):
print("Numbers is a list of integers!")
Docs by feature
Deep dives live under READMES/:
| Topic | Doc |
|---|---|
| Runtime type checks | isoftype |
| Function overloading | @overload |
| Argument validation | @validate |
| Typed lists | tlist |
| Interfaces | Interface |
| DB abstraction | database_abstraction |
| Retry | retry_executor |
| Progress bars | progress_bar |
| Async workers | async_worker_pool |
| Singleton | singleton |
Contributing & development
Agent/developer workflow (uv, tests, CI/CD labels, secrets, __version__): see AGENTS.md.
Report security issues privately via GitHub advisories — please do not open a public issue for vulnerabilities.
License
MIT — see LICENSE.
Metadata
Release files for danielutils 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| danielutils-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for danielutils-1.2.0-py3-none-any.whl |
Release files / danielutils-1.2.0-py3-none-any.whl
| Download URL | danielutils-1.2.0-py3-none-any.whl |
|---|---|
| Size | 276.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc673e71aec3107644607f2375ea4ef45f50e26a329c732e7182d238d6346abc
|
|
BLAKE2b-256 checksum How to use checksums |
db08ff9165ae04eb5d82f868f7921d08a423aa5014d09541ce1e3716f92d0b5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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 danielutils 1.2.0
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.