Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 2.6 KB

File metadata and controls

56 lines (39 loc) · 2.6 KB

NepTLS

NepTLS is a dependency-light Python HTTP client and TLS research toolkit for authorized networking, compatibility, and diagnostics work.

Run & Operate

  • pnpm --filter @workspace/api-server run dev — run the API server (port 5000)
  • pnpm run typecheck — full typecheck across all packages
  • pnpm run build — typecheck + build all packages
  • PYTHONPATH=src python3 -m unittest discover -s tests -v — run the NepTLS test suite
  • python3 -m build --sdist --wheel — build the Python distributions
  • python3 -m twine check dist/* — validate package metadata before upload
  • pnpm --filter @workspace/api-spec run codegen — regenerate API hooks and Zod schemas from the OpenAPI spec
  • pnpm --filter @workspace/db run push — push DB schema changes (dev only)
  • Required env: DATABASE_URL — Postgres connection string

Stack

  • pnpm workspaces, Node.js 24, TypeScript 5.9
  • Python 3.10+ package under src/neptls
  • API: Express 5
  • DB: PostgreSQL + Drizzle ORM
  • Validation: Zod (zod/v4), drizzle-zod
  • API codegen: Orval (from OpenAPI spec)
  • Build: esbuild (CJS bundle)

Where things live

  • src/neptls/ — NepTLS source package
  • tests/ — standard-library unittest coverage
  • pyproject.toml — package metadata and PyPI entry point
  • README.md — user-facing Python package documentation

Architecture decisions

  • The initial release uses only Python's standard library at runtime, keeping installation portable and making the transport easy to audit.
  • TLS and fingerprint modules model and compare configuration; they do not implement browser impersonation or security-control bypasses.
  • Async requests wrap the same synchronous transport with asyncio.to_thread, so sync and async behavior remain consistent without an untested second transport.
  • HTTP/2 and HTTP/3 are optional native transports selected explicitly; missing platform dependencies must raise a clear error instead of silently masquerading as HTTP/1.1.

Product

NepTLS provides a reusable HTTP client, async client, TLS/profile models, local fingerprint analysis, UA parsing, diagnostics, pools, hashing helpers, generic PoW, and a CLI.

User preferences

Populate as you build — explicit user instructions worth remembering across sessions.

Gotchas

  • Do not claim the curated UA catalog is a copied large third-party dataset; callers can provide their own licensed dataset to UserAgentDatabase.
  • Build and upload tooling is development-only; it must not appear in project.dependencies.

Pointers

  • See the pnpm-workspace skill for workspace structure, TypeScript setup, and package details