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.0.tar.gz (9.6 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.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zerodep-0.2.0.tar.gz
  • Upload date:
  • Size: 9.6 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.0.tar.gz
Algorithm Hash digest
SHA256 f91c9138df8440a46870a0385f6e273ea4e775ba2f7462bb17fbdb67ab47bbbe
MD5 9439f21c5a1a697b30c30bf5d17a4b62
BLAKE2b-256 87e8752762d1a167dc6c3780132623a8fe0acc6e0ccedb2b97e8a2be4acb76b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zerodep-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 367cf95367c75d1a340b7097c94015ba64d3070534cbd85e3b459c39f0139e59
MD5 3255bab29089caa78b323ba3fd0737a1
BLAKE2b-256 ad44350093cb29e396be864f583d21597dbd6bd601fef999046137f41ebe2b18

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