Python Bots
Build Telegram bots in Python with the NxCreator Python runtime.
Python bots on NxCreator
NxCreator supports Python bots in addition to JavaScript. Python bots run in an isolated sandbox with a curated set of standard-library modules and a Telegraf-like bot API. Use the dashboard to create a Python bot and write handlers in the Python editor.
Runtime & sandbox
Python code executes in a locked-down worker: no network access, no host filesystem, uid 65534, seccomp-filtered syscalls, and a RestrictedPython layer. All outside-world actions go through an allowlisted RPC bridge (data, Telegram, HTTP, broadcast, webhook).
Rich & new Telegram methods
The Python runtime exposes the latest Bot API features:
- richMessage / rich message sending — formatted text with entities, media and reply markup.
- starPayments — create invoices in Telegram Stars (XTR) and handle pre-checkout queries.
- Premium emoji sending — send messages containing premium (custom) emoji entities.
- Premium emoji in inline keyboards — use premium emoji in button labels.
- Inline keyboards, callbacks, scenes, database, HTTP, broadcast, webhook URLs — all available.
Full Python reference
For the complete Python handler reference (commands, scenes, database, Telegram methods, sandbox limits), open the dedicated Python docs: