Coder Social home page Coder Social logo

byzakharova / tg-serverless Goto Github PK

View Code? Open in Web Editor NEW

This project forked from illvart/tg-serverless

0.0 0.0 0.0 24 KB

A Telegram bot Python 3.7+ app use Vercel as Serverless Function!

Home Page: https://tg-serverless.vercel.app

License: MIT License

Shell 3.98% Python 74.41% HTML 21.61%

tg-serverless's Introduction

tg-serverless

CI Status License: MIT

A Telegram bot Python 3.7+ app use Vercel as Serverless Function!

Install dependencies

pip install -r requirements.txt
pip install -r requirements-dev.txt

Develop locally

vercel dev

Or running without vercel.

# without webhook
python -m app
# with webhook
python -m api.bot
# index webpage
python -m api.index

Linting and format code.

./lint.sh

Environment variables

At .env file or configure at vercel.

BOT_API_TOKEN=123456789:AbCdfGhIJKlmNoQQRsTUVwxyZ
WEBHOOK_HOST=https://{project_name}.vercel.app
SERVERLESS=True

Bugs

This bot was built using aiogram. Currently this bot doesn't run perfectly because vercel runtime @vercel/python does not use Python 3.7+. When access /api/bot you got errors:

[GET] /api/bot

Unable to import module 'now__handler__python': Your Python version 3.6.12 is not supported by aiogram, please install Python 3.7+

Why? It's because aiogram required Python 3.7+ and currently vercel use Python 3.6.12.

Stay tune, hopefully this request accepted.

License

This project is licensed under the MIT License. See the LICENSE file for details.

tg-serverless's People

Contributors

illvart avatar byzakharova avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.