Skip to main content

A framework for python bots for telegram

Project description

Pyxgram

NEW!!!

In the versions 2 or higher you can delete the context for all you calls to bot, excepts the commands.

Spanish

A bit of history... Pyxgram was born when i create the Reisub Bot, my code it was very unreadable, but i have the idea of create a framework for fix my code and help the python community.

The pyxgram framework works thanks the python-telegram-bot library, wich has a big comunity, but that library its hard to use for some people, but you can use the code of this library with update and context objects or self.dispatcher and self.updater

More info

You can see the wiki here. Wiki.

Examples

This is a code example for the people has no knowedge about this framework. Works in the 1.1 Versions or higher

from pyxgram.bot import Basebot

bot=Basebot('mytoken')

@bot.normal_command
def start(update,context):
  bot.send_text('Hello',update,context)

bot.start()

You need to replace the 'mytoken' string to your bot token

Other example, this only works in versions 1.2 or higher

from pyxgram import BaseBot

bot=BaseBot('mytoken')

@bot.normal_command
def start(update,context):
  bot.send_text('Hello',update,context)

bot.start()

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

pyxgram-2.1.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

pyxgram-2.1-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file pyxgram-2.1.tar.gz.

File metadata

  • Download URL: pyxgram-2.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for pyxgram-2.1.tar.gz
Algorithm Hash digest
SHA256 966ed27b370031a32645fbebf7dae9ed7ea2ecfa3186b97e044405e5319e0dfb
MD5 ce287f58d9bee8210a4f548cda46f18c
BLAKE2b-256 12dfe6fe3b00b12bc18eec7537b49135867d2454a80f229996f0bc23ac442cf6

See more details on using hashes here.

File details

Details for the file pyxgram-2.1-py3-none-any.whl.

File metadata

  • Download URL: pyxgram-2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for pyxgram-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1c8587a3ed3ed16a961010db3ecb05569cbbb661a9165c7e55439b99aecb05f
MD5 1d816a81113fe63360713d55b60a605a
BLAKE2b-256 8c045c1162eef6c3298816d50267cfb958112b64605590d5bd39143d414be8ab

See more details on using hashes here.

Supported by

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