Skip to main content

DarkBot AI Templates

21 production-ready Python code templates: TG bots, scrapers, AI agents, crypto trading, Tor, JWT auth, proxy rotation. Zero dependencies.

Python Dependencies License

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 registrylist_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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

darkbot_templates-1.8.3.tar.gz (89.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

darkbot_templates-1.8.3-py3-none-any.whl (76.7 kB view details)

Uploaded Python 3

File details

Details for the file darkbot_templates-1.8.3.tar.gz.

File metadata

  • Download URL: darkbot_templates-1.8.3.tar.gz
  • Upload date:
  • Size: 89.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for darkbot_templates-1.8.3.tar.gz
Algorithm Hash digest
SHA256 207e02b0652477d2a7d70949205cf2148bd14b8947aa76c88239c506dfe8b14f
MD5 0ea278203f2b3d25ac29dc7ae8175548
BLAKE2b-256 2063957d9cd08cb23b8b87d096239dfe34f9e715202b2adb618f985122c4222e

See more details on using hashes here.

File details

Details for the file darkbot_templates-1.8.3-py3-none-any.whl.

File metadata

File hashes

Hashes for darkbot_templates-1.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1d00276993888507c95618b9a85764610341f2907bf822300a3fcb1a5eebad92
MD5 932ccc57e619abba447888256d555c02
BLAKE2b-256 a500f3e75d0c9626fb4faa97de8f66ceaa9b62bd1bb5dff864487dacc2922ed5

See more details on using hashes here.

Release history Release notifications | RSS feed

1.8.5

2 files

1.8.4

2 files

This release

1.8.3 This release

2 files

1.8.2

2 files

1.8.1

2 files

1.8.0

2 files

1.7.9

2 files

1.7.8

2 files

1.7.7

2 files

1.7.6

2 files

1.7.5

2 files

1.7.4

2 files

1.7.3

2 files

1.7.2

2 files

1.7.1

2 files

1.7.0

2 files

1.6.9

2 files

1.6.8

2 files

1.6.7

2 files

1.6.6

2 files

1.6.5

2 files

1.6.4

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page