DarkBot AI Templates
21 production-ready Python code templates: TG bots, scrapers, AI agents, crypto trading, Tor, JWT auth, proxy rotation. Zero dependencies.
What's New in 1.6.0
- JWT Auth template — HMAC-SHA256/384/512 token generation, verification, refresh tokens. Pure stdlib (hmac, hashlib, json, base64).
- Proxy Rotation Manager — round-robin, random, least-failed, fastest strategies with health checking and EMA latency tracking.
- Template registry —
list_templates(),get_template(name),manifest()for programmatic discovery. - Importable templates — templates ship as Python modules, not just text files.
Available Templates
| # | Template | Description |
|---|---|---|
| 1 | jwt_auth | JWT token generation/verification with HMAC-SHA256/384/512 |
| 2 | proxy_rotation | Proxy pool with health checks, 4 rotation strategies, failover |
| 3-20 | (existing) | TG bots, scrapers, AI agents, crypto trading, Tor, and more |
Quick Start
pip install darkbot-templates
JWT Authentication
from darkbot_templates.templates.jwt_auth import JWTAuth
auth = JWTAuth(secret="your-secret-key")
# Generate token
token = auth.encode({"user_id": 42, "role": "admin"})
# eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# Verify and decode
payload = auth.decode(token)
print(payload["user_id"]) # 42
print(payload["role"]) # admin
# Refresh expired token
new_token = auth.refresh(token)
# Create 7-day refresh token
refresh = auth.create_refresh_token("user_42")
Proxy Rotation
from darkbot_templates.templates.proxy_rotation import ProxyRotationManager
manager = ProxyRotationManager(
proxies=["http://proxy1:8080", "http://proxy2:8080", "http://proxy3:3128"],
strategy="round_robin", # or: random, least_failed, fastest
max_failures=3,
timeout=10,
)
# Get next proxy
proxy = manager.get_proxy()
# Fetch with automatic failover
content = manager.fetch("https://httpbin.org/ip")
# Check pool health
stats = manager.stats()
print(f"{stats['healthy']}/{stats['total_proxies']} healthy")
Template Registry
from darkbot_templates.registry import list_templates, get_template, manifest
# List all templates
for t in list_templates():
print(f" {t['name']}: {t['description']}")
# Get template source code
source = get_template("jwt_auth")
# Full manifest
m = manifest()
print(f"Version {m['version']}, {m['template_count']} templates")
License
MIT
Freelance portfolio: https://ameobius-space.github.io/kwork-portfolio/
Hire on LaborX: https://laborx.com/gigs/python-automation-telegram-bots-cdp-api-integrations-105867
Real-World Use Cases
- LaborX automation: 270+ job applications via JWT API + SOCKS proxy
- Kwork monitoring: Real-time dialog tracking across 6+ active clients
- Telegram bot deployment: aiogram 3.x bots with rate limiting + proxy rotation
- CDP automation: Chrome DevTools Protocol scraping with network interception
- Freelance pipeline: End-to-end bid/apply/track system with portfolio
Articles
Metadata
Release files for darkbot-templates 1.8.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| darkbot_templates-1.8.5.tar.gz | 90.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| darkbot_templates-1.8.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 167.8 kB
Release files / darkbot_templates-1.8.5.tar.gz
| Download URL | darkbot_templates-1.8.5.tar.gz |
|---|---|
| Size | 90.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b2707243acb1afeb6cc5e5af553ba4d4bc429bad0442c1c9be442dc370c1bf9
|
|
BLAKE2b-256 checksum How to use checksums |
5e833b0133d00f4175cd65a2df7e7e8971dd473c2607161a2fd71fd23c5dfb66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / darkbot_templates-1.8.5-py3-none-any.whl
| Download URL | darkbot_templates-1.8.5-py3-none-any.whl |
|---|---|
| Size | 77.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af710f713936ce74c78d4e49d0118060a0c7ed0eeb3deca27f87aee890a50ef3
|
|
BLAKE2b-256 checksum How to use checksums |
8b5d6b6eed7c9b82aa34b95bbb6271c08a3fda4230739ef37d464eaceb3dd8e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for darkbot-templates 1.8.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.