darkob
Fast, stable async Python for the Rubika & Shad platforms.
Build bots and userbots that stay up.
Documentation · AI context · PyPI · Issues
pip install darkob
from darkob import Bot, Keyboard
bot = Bot(token="YOUR_BOT_TOKEN")
@bot.on_command("start")
async def start(bot, event):
await event.reply("Welcome 👋")
@bot.on_new_message()
async def echo(bot, event):
await event.reply(event.text, inline_keypad=Keyboard().row("Yes", "No"))
bot.run()
Why darkob
A fork of maxrubika, rebuilt so failures are visible and the fast paths are actually fast.
| Inherited problem | What darkob does |
|---|---|
| Contacted PyPI at import time | Importing performs no network I/O |
| TLS verification disabled everywhere | Verification on by default, opt out explicitly |
Bare except: swallowed KeyboardInterrupt |
Narrowed to Exception and logged |
| Background handler crashes vanished at GC | Logged the moment they happen |
| Every event scanned all handlers | Indexed dispatch, built once |
Retries were endpoints × max_retries |
Bounded budget with jitter and 429 handling |
| A new TLS handshake per file download | Pooled sessions per host |
| Saved sessions were opened but never read back | Credentials restored; sessions survive restarts |
| A corrupt session file was deleted | Quarantined, never destroyed |
What's inside
|
Two surfaces, one library
|
Async first, sync friendly Every method works with |
|
Composable handlers Decorators, 42 filters with |
Conversations that survive restarts
|
|
Shortcuts that save lines
|
Keyboards and formatting
|
|
Message builder
|
Retries you can reason about
|
Documentation
Full site: manitheferfri.github.io/darkob
| Quickstart | Install to running bot in five minutes |
| Handlers | Every decorator and what triggers it |
| Filters | All 42 constraints and how to compose them |
| Routers | Split a bot into modules |
| Conversations | Multi-step flows |
| Keyboards | Keypads and text formatting |
| Composing messages | Builder and formatting together |
| Errors | Exception hierarchy and retries |
| Bot API · Messenger API | Generated from the package |
| Roadmap | What ships next, and what will not |
Built for AI-assisted development
Most darkob bots are written by an assistant, so the docs are built to be read by a model.
https://manitheferfri.github.io/darkob/llms-full.txt
That single file is the whole thing: hard rules, every guide, and the full API with complete docstrings for all 688 methods — 318 KB, one fetch, no follow-up links.
llms.txt— curated mapapi.json— every method as JSON- Every page is also served as raw Markdown: append
.mdto any URL - The API reference is generated from the installed package, so it cannot drift from the code
Development
git clone https://github.com/ManiTheFerfri/darkob.git
cd darkob
pip install -e ".[dev]"
pytest --cov=darkob # 290 tests, no network required
ruff check . # lint
The suite never opens a socket: HTTP goes through fake transports, and a
subprocess test asserts that importing darkob cannot reach the network.
License
MIT. Derived from maxrubika, copyright MEHRAB Farahmand; the original MIT notice is preserved in LICENSE.
Maintained by Mani Keikhosravi.
Not affiliated with Rubika or Shad. Use responsibly and in line with the platforms' terms of service.
Metadata
Release files for darkob 0.6.0
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 | Actions |
|---|---|---|---|---|
| darkob-0.6.0.tar.gz | 217.5 kB | With provenance | Details for darkob-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| darkob-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for darkob-0.6.0-py3-none-any.whl |
Total release size: 586.3 kB
Release files / darkob-0.6.0.tar.gz
| Download URL | darkob-0.6.0.tar.gz |
|---|---|
| Size | 217.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8355e655424a448500aaa90d20a7983c1453452bae853a170bcd60c33643b26
|
|
BLAKE2b-256 checksum How to use checksums |
5ce3e360ae766687568f3d17da69a5493d5980839de21ccdaeada87f05fd7828
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / darkob-0.6.0-py3-none-any.whl
| Download URL | darkob-0.6.0-py3-none-any.whl |
|---|---|
| Size | 368.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2eac8aa6d53016a828db3dc77e277dfdb6d57628951da361beffb0ccc7bc8363
|
|
BLAKE2b-256 checksum How to use checksums |
85c6909d3cb41d4900be4bacdcf075c7503d61c1ef3de7ff2ff0412bd19e092c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for darkob 0.6.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for darkob-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA 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.