Skip to main content
# lambdagram

lambdagram is the library to help who want to create telegram bot with [official telegram bot api](https://core.telegram.org/bots/api) using webhook on AWS lambda.

## Introduction

Main target of this library is who want to create telegram bot using webhook simply and easily. Especially for AWS lambda platform. Because AWS lambda do not allow to use polling mechanism for infinite loops. Just sending and receiving message through webhook. Not a big deal. But I believe this pretty helpful for someone who telegram and AWS lambda newbies.

## Installing

~~~
pip install lamdbgram
~~~

## Telegram API support

- getMe
- setWebhook
- getWebhookInfo
- deleteWebhook

## Key function the lambdagram support

- send_message(self, event, msg, options...) - Efficient way, but you must set webhook before use this method using web browser.
(https://api.telegram.org/bot{TOKEN}/setWebhook?url={WEBHOOKURL}, remove '{' and '}')
- send_message(self, event, msg, webhook_url, options...) - Inefficient way, but it's useful for beginners.

## How to use

~~~
from lambdagram.bot import Bot


TOKEN = "THE TOKEN YOU GOT FROM @BotFather"

def lambda_handler(event, context): # Basic function signature on AWS lambda

bot = Bot(TOKEN)
bot.send_message(event, "THE MESSAGE YOU WANT TO SEND")
~~~

or

~~~
from lambdagram.bot import Bot


WEBHOOK = "https://YOUR-WEBHOOK-URL"
TOKEN = "THE TOKEN YOU GOT FROM @BotFather"

def lambda_handler(event, context): # Basic function signature on AWS lambda

bot = Bot(TOKEN)
bot.send_message(event, "THE MESSAGE YOU WANT TO SEND", WEBHOOK)
~~~



Metadata

Release files for lambdagram 0.9.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for lambdagram 0.9.4
File Interpreter ABI Platform Actions
lambdagram-0.9.4-py3-none-any.whl Python 3 none any Details for lambdagram-0.9.4-py3-none-any.whl

Release files / lambdagram-0.9.4-py3-none-any.whl

Download URL lambdagram-0.9.4-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f90719f204c3bc4e6607cfff5f50a19b57c8a1f3fca0d86c55af54f8a734c84
BLAKE2b-256 checksum
How to use checksums
ce1637117c757c9e5d3a7ead01bdde271f762e93278341309a21f983411f8c19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for lambdagram 0.9.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page