NepTLS
NepTLS is a dependency-light Python HTTP client and TLS research toolkit. It combines a requests-style API with structured TLS configuration, browser network profiles, local fingerprint analysis, diagnostics, pools, and a generic proof-of-work framework.
Developed by Diwas Khatri (@diwaskhatri07).
Security boundary
NepTLS is for networking research, browser compatibility, API testing, protocol interoperability, performance testing, debugging, authorized automation, and defensive security research. It is not designed to bypass CAPTCHAs, authentication, payment security, access controls, or anti-abuse systems, and it does not include session theft or credential attack features. Fingerprint objects describe and compare configurations; they do not spoof browser security signals.
Installation
python -m pip install neptls
NepTLS has no runtime dependencies and supports Python 3.10+.
Quick start
import neptls
response = neptls.get("https://example.com", timeout=10)
response.raise_for_status()
print(response.status_code)
print(response.text[:80])
Reusable clients retain cookies and configuration:
client = neptls.Client(
profile="chrome",
headers={"X-Research-Client": "neptls"},
retries=2,
)
response = client.post("https://httpbin.org/post", json={"hello": "world"})
print(response.json())
Async calls use the same public API:
import asyncio
from neptls import AsyncClient
async def main():
async with AsyncClient(timeout=10) as client:
response = await client.get("https://example.com")
print(response.status_code)
asyncio.run(main())
TLS and profiles
TLSConfig creates standard-library ssl.SSLContext objects and can be
serialized for experiments:
from neptls import TLSConfig, TLSFingerprint
config = TLSConfig(minimum_version="TLSv1.2", alpn_protocols=("h2", "http/1.1"))
print(config.to_json())
print(TLSFingerprint.from_config(config).digest)
Profiles are structured metadata, not browser impersonation:
client = neptls.Client(profile="firefox")
print(client.fingerprint().to_dict())
print(neptls.profiles.get_profile("chrome").to_json())
Fingerprints and user agents
profile = neptls.fingerprint.generate(browser="chrome", platform="windows", seed=7)
print(profile.validate().to_json())
print(neptls.ua.chrome())
print(neptls.user_agents.parse(neptls.ua.random()))
The built-in user-agent catalog is intentionally curated. Load a properly
licensed dataset into UserAgentDatabase when your application needs a
larger pool; NepTLS does not bundle a copied 40,000-entry third-party list.
Diagnostics
inspect() performs read-only DNS, TCP, TLS, and HTTP observations:
report = neptls.inspect("https://example.com")
print(report["tls"]["version"])
Pools, proxies, hashing, and generic PoW
from neptls import Proxy
from neptls.crypto import sha256
from neptls.pools import Pool
from neptls.pow import Challenge, solve
pool = Pool(["profile-a", "profile-b"])
print(pool.next())
client = neptls.Client(proxy="http://127.0.0.1:8080")
print(sha256("protocol message"))
result = solve(Challenge("demo", difficulty=3))
The PoW implementation is generic and intentionally not tied to any anti-abuse or security system.
CLI
neptls version
neptls get https://example.com
neptls inspect https://example.com
neptls profile chrome
neptls ua mobile
neptls hash "protocol message" --algorithm sha256
neptls pow demo --difficulty 3
Development
python -m unittest discover -s tests -v
python -m compileall -q src
python -m build
The project is organized into focused modules for HTTP transport, TLS models, profiles, fingerprints, user agents, pools, proxy data, diagnostics, crypto, PoW, and the CLI. Features that depend on native HTTP/2 or HTTP/3 stacks are kept out of the initial dependency-free release until their transport and platform behavior can be tested reliably.
License and credits
NepTLS is released under the MIT License. See LICENSE.
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 neptls-0.1.0.tar.gz.
File metadata
- Download URL: neptls-0.1.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a738de3d9a9690f0b158bd196cbdfaaa22b83a533ae9d9ab679657a5964aae72
|
|
| MD5 |
14200af45c2b2be063be1618d0f92cfe
|
|
| BLAKE2b-256 |
916aec1b472e725835853b5f894507cc81a43ca54b99b32d497b932965ab9bc2
|
File details
Details for the file neptls-0.1.0-py3-none-any.whl.
File metadata
- Download URL: neptls-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dc4c52ce404af8705c1984d9e5c71a7db8a41f5f7c043b8bd627cf1df16fc57
|
|
| MD5 |
2e070a8f70500afe1a0a231860169015
|
|
| BLAKE2b-256 |
a1bdb70cc219ca2709558e331859b70d868df99248e062695fff9307c89f0908
|