Zero-dependency, single-file Python implementations of popular libraries
Project description
zerodep
Zero-dependency, single-file Python implementations of popular libraries — stdlib only, Python 3.10+.
零依赖、单文件的 Python 常用库实现 —— 仅使用标准库,支持 Python 3.10+。
Modules
Web & Networking
| Module | Description | Benchmark Against |
|---|---|---|
httpclient/ |
Sync + async REST client with connection pooling, proxy, and auth | httpx |
sse/ |
Server-Sent Events client with auto-reconnect | httpx-sse |
Data Formats
| Module | Description | Benchmark Against |
|---|---|---|
yaml/ |
YAML parser and serializer (common subset) | PyYAML |
jsonc/ |
JSONC parser (JSON with comments and trailing commas) | commentjson |
toon/ |
TOON (Token-Oriented Object Notation) encoder/decoder | toon_format |
frontmatter/ |
Frontmatter parser and serializer (YAML/TOML/JSON file-header metadata) | python-frontmatter |
Data Validation
| Module | Description | Benchmark Against |
|---|---|---|
validate/ |
Runtime TypedDict/dataclass validator with JSON Schema generation | pydantic |
Text & Markup
| Module | Description | Benchmark Against |
|---|---|---|
markdown/ |
Markdown to HTML renderer (CommonMark subset + GFM tables) | mistune |
soup/ |
HTML parser with BeautifulSoup-like API (find, select, CSS selectors) | beautifulsoup4 |
diff/ |
Unified diff parser, patch apply/reverse, three-way merge | unidiff |
Search & Retrieval
| Module | Description | Benchmark Against |
|---|---|---|
search/ |
BM25/BM25+/BM25L/BM25F + TF-IDF full-text search engine | rank-bm25 |
Configuration
| Module | Description | Benchmark Against |
|---|---|---|
dotenv/ |
.env file parser (load_dotenv, dotenv_values) | python-dotenv |
CLI & Terminal
| Module | Description | Benchmark Against |
|---|---|---|
ansi/ |
ANSI terminal styling: colors, attributes, detection, strip/visible_len | — |
tabulate/ |
Table formatting with multiple output styles | tabulate |
prompt/ |
Interactive CLI prompts (confirm, select, text) | questionary |
Security & Encoding
| Module | Description | Benchmark Against |
|---|---|---|
aes/ |
AES encryption: ECB, CBC, CTR, GCM modes (pure Python + OpenSSL via ctypes) | pycryptodome |
qr/ |
QR Code generation with terminal rendering | qrcode |
Infrastructure & Tools
| Module | Description | Benchmark Against |
|---|---|---|
retry/ |
Retry decorator with configurable backoff strategies | tenacity |
scheduler/ |
In-process task scheduler with cron, interval, one-shot triggers | APScheduler |
structlog/ |
Structured logging with pretty console output | structlog |
vcs/ |
Git/Hg/Jujutsu CLI wrapper (diff, status, log, blame) | — |
Usage
Each module is a self-contained single file that you can copy directly into your project. No installation required.
Some modules have optional sibling dependencies on other zerodep modules (e.g. structlog can use ansi for color support). These are loaded via guarded imports — if the sibling module is absent, the module falls back to inline constants and remains fully functional.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zerodep-0.2.2.tar.gz.
File metadata
- Download URL: zerodep-0.2.2.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
138cfac85eb0cd22425904b959ff92275f9a75cdf6a4da37831a744f81af48ce
|
|
| MD5 |
c8f4026c298eced6f56b9ffc86030afe
|
|
| BLAKE2b-256 |
3573c9be82c3ced1023e79477480d7f3d2f8e8ce864fa40bc292ef9a8402aef0
|
File details
Details for the file zerodep-0.2.2-py3-none-any.whl.
File metadata
- Download URL: zerodep-0.2.2-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faf7b95704c2dc4479be2a34cbaf6ae764930fe41f4e0dffba4e4473ac95de15
|
|
| MD5 |
49b101d0607e4d83890f70c62d275c83
|
|
| BLAKE2b-256 |
bbac644e11cc2790398d3446e928ca0254f0d8ecf96350136de274f37728ed3c
|