Skip to main content

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


Download files

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

Source Distribution

zerodep-0.2.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

zerodep-0.2.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file zerodep-0.2.1.tar.gz.

File metadata

  • Download URL: zerodep-0.2.1.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

Hashes for zerodep-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d8c78377b62fb0bbcb9648b62a69d344b2a309fe4e94d4ec3c7f8a9543a72b64
MD5 6fcdb4e7a85e86a7e63c07ceb2f54436
BLAKE2b-256 41a258527ae3dd5161824e8032763146ce4715e583ef82d20bd487aa2565f4ce

See more details on using hashes here.

File details

Details for the file zerodep-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: zerodep-0.2.1-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

Hashes for zerodep-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20104549b1ee1f9b16464c08e49557cbd2d7441a25cab20213ba994580a893c7
MD5 e3761ddaa19232c773c58705a2fae7c8
BLAKE2b-256 212d6ebb899adbea0cf5e9058c745233a777933fec24cb6303606095412f6346

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