Skip to main content

Simple framework for building Telegram agents with Django

Project description

Botnetics Agent

A simple framework for building Telegram agents with Django.

Installation

pip install botnetics-agent

Quick Start

botnetics init my-agent
cd my-agent
python agent.py

Test your agent:

curl -X POST http://localhost:8000/message/ \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello", "chat_id": "123", "user_id": "456"}'

Features

  • Simple message handling with decorators
  • Built-in Django web server
  • REST API endpoint for message processing
  • Easy project scaffolding
  • Docker support

Usage

Create a new agent:

from botnetics import BotneticsApp, Message

app = BotneticsApp(api_key="your-key")

@app.on_message
def handle_message(message: Message):
    return Message(
        text=f"You said: {message.text}",
        chat_id=message.chat_id,
        user_id=message.user_id
    )

app.run()

License

MIT License

Project details


Download files

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

Source Distribution

botnetics_agent-0.1.8.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

botnetics_agent-0.1.8-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file botnetics_agent-0.1.8.tar.gz.

File metadata

  • Download URL: botnetics_agent-0.1.8.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for botnetics_agent-0.1.8.tar.gz
Algorithm Hash digest
SHA256 93298ac973f4d1808919caf3ba3afd8406a745deeff372ac4d2311e9b39fc30e
MD5 1f69c87a0687c2d84111a9d8a74033e6
BLAKE2b-256 7cf412348b3d0c53a42fdac49ccd266d9f59d671e1b01b95f703386ab03a6769

See more details on using hashes here.

Provenance

The following attestation bundles were made for botnetics_agent-0.1.8.tar.gz:

Publisher: publish.yml on Behokus/botnetics-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file botnetics_agent-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for botnetics_agent-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 64fbca876bd991cfa0322cfb072c518b76b14ce2f9b1e0c8a70f0aa3ce940104
MD5 c473f683bd2ab4471a4be1f7ddd3d3b2
BLAKE2b-256 3e070b8a0f26f385a571b2f87d6c22132cf4b8b7db4a311d34dd0ea3f9fddcc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for botnetics_agent-0.1.8-py3-none-any.whl:

Publisher: publish.yml on Behokus/botnetics-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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