PYPI PACKAGE AUDIT
v0.1.0
Gesundes Paket
binal
Deklarative, typsichere Binärmodellierung für Python.
755
/ 1000
Schnellinstallation
pip install binal
1. Governance
100/200
2. PEP-Metadaten
150/200
3. Sicherheit
200/200
4. Doku & SEO
105/200
5. CI-Engineering
200/200
📣 Prüfung teilen:
Teilen Sie diesen Bericht und die Vorschau in der aktuellen Sprache
PYPI-TELEMETRIE
Downloads & Community-Verbreitung
Letzte 30 Tage (ohne Spiegelserver)
Letzte 7 Tage
287
Letzte 30 Tage
287
Gesamt (180 Tage)
287
Gesundheits- & Engineering-Analyse (5 Säulen)
1. Governance & Community100 / 200 ▾
LICENSE✓ 50 pts
SECURITY.md✕ 0 pts
CONTRIBUTING.md✓ 50 pts
CODE_OF_CONDUCT.md✕ 0 pts
2. PEP-Metadaten & Paketierung150 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✓ 50 pts
Project URLs✓ 50 pts
Trove Classifiers✕ 0 pts
3. Sicherheit & Lieferkette200 / 200 ▾
Null CVEs (OSV)✓ 60 pts
Trusted Publishing (OIDC)✓ 50 pts
Snyk / Audit Link✓ 40 pts
HTTPS-Repository✓ 50 pts
4. Dokumentation, SEO & Ökosystem105 / 200 ▾
Strukturierte README✓ 60 pts
Read the Docs✕ 0 pts
Django Packages✕ 0 pts
Webseite / Fachartikel✓ 45 pts
5. Engineering, CI & Qualität200 / 200 ▾
Automatisierte Tests✓ 65 pts
GitHub Actions CI✓ 65 pts
CHANGELOG.md✓ 35 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✓ 35 pts
README & DOCS
PyPI Metadata v0.1.0
Offizielle Dokumentation & Nutzungsleitfaden — binal
Vollständige Originaldokumentation anzeigen (Englisches README) ▾
Binal
Declarative, type-safe binary modeling for Python.
Binal is a pure-Python library for defining, encoding, decoding, validating, and composing binary data structures using native Python classes and type annotations.
It provides a unified binary modeling system that eliminates repetitive serialization logic, manual buffer management, offset calculations, bitwise operations, and structural validation.
The data model serves as the single source of truth for both Python objects and their binary representations.
Installation
Requires Python 3.11+.
uv add binal
pip install binal
Quick Start
from typing import Annotated
from binal import BinaryModel, Prefixed, UInt8, UInt16
class Packet(BinaryModel, byte_order="big"):
version: UInt8
payload: Annotated[bytes, Prefixed(UInt16)]
packet = Packet(version=1, payload=b"Hello")
data = packet.encode()
# b'\x01\x00\x05Hello'
packet = Packet.decode(data)
# Packet(version=1, payload=b'Hello')
Features
- Declarative models with native type annotations
- Integers (including custom widths), floats, booleans, bytes, strings, and bit fields
- Nested models, collections, enums, and tagged unions
- Length-prefixed, fixed-length, null-terminated, and length-dependent fields
- Derived lengths, counts, and checksums (CRC32, CRC16, Adler32)
- Conditional and dependent fields
- Variable-length integers: ULEB128, SLEB128, ZigZag
- Schema introspection with field offsets and sizes
- File, buffer, stream, and asynchronous I/O
- Structured errors with field paths and byte offsets
- Zero runtime dependencies, pure Python
See the documentation and examples/ for more.
Development
uv sync --locked
uv run ruff format
uv run ruff check
uv run pyright
uv run pytest
uv run pytest --cov=binal
uv build
License
MIT. See LICENSE.