Skip to content

Урок 5. Продаём рыбу в Telegram

License

Notifications You must be signed in to change notification settings

sibeardev/pontus

Repository files navigation

pontus

MIT License

Telegram store bot. Based on the CMS Moltin. The bot will show a list of products, details of each product separately. From the selected products to form a shopping cart and place an order. Example: store of fish.

Screenshots

App Screenshot

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

  • TELEGRAM_TOKEN - token telegram bot. Get it from @BotFather.
  • TG_CHAT_ID - Telegram id administrator for system alerts. You can find out by messaging a special bot in Telegram: @userinfobot

You'll need your API keys (Client ID and Client Secret) when making requests to the API.

  • MOLTIN_CLIENT_ID - Client id of your store in cms moltin
  • MOLTIN_CLIENT_SECRET - Client secret of your store in cms moltin

Register at redis for the database address, its port and password.

  • REDIS_HOST - Redis database address Example: redis-13965.f18.us-east-4-9.wc1.cloud.redislabs.com
  • REDIS_PORT - Redis database port
  • REDIS_PASSWORD - Redis database password

Run Locally

Clone the project

  git clone https://github.com/dad-siberian/pontus.git

Go to the project directory

  cd pontus

Install dependencies

  pip install -r requirements.txt

Start the server

  pytnon bot.py

Deployment

To deploy this project run Heroku. Manual.

To set the config var on Heroku, execute the following:

heroku config:set TELEGRAM_TOKEN={telegram token}

Project Objectives

The code is written for educational purposes on an online course for web developers dvmn.org.

Releases

No releases published

Packages

No packages published