Giter Site home page Giter Site logo

amirho3inf / aiogram-structured Goto Github PK

View Code? Open in Web Editor NEW
39.0 4.0 4.0 39 KB

Code your aiogram bot faster, easier & modular.

License: Do What The F*ck You Want To Public License

Python 100.00%
python asyncio telegram telegram-bot telegram-bot-api aiogram aiogram-base

aiogram-structured's Introduction

aiogram-structured

This is a structure for bot development with aiogram which I personally use. Indeed, I made this to speed up the development process of my own bots, do wtf you want with it <3

ready to use tools

  • SQLAlchemy (for database)
  • Redis (for cache)
  • APScheduler (for jobs)
  • Context (separate file for texts, multi-language support)

example

There's user model, example jobs and handlers for user registration already implemented in this repository that you can check and run. so don't forget to delete them when you start your project.

how to use

clone the repository, install requirements, create config file and execute ./bot.py --help.

Asciinema below shows the full installation and running of the project

usage

aiogram-structured's People

Contributors

amirho3inf avatar dependabot[bot] avatar sina-e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aiogram-structured's Issues

AttributeError: 'NoneType' object has no attribute 'dev_mode'

I got error when makemigrations:

Optinal: Use -m <msg>, --message=<msg> to give a message string to this migrate script.
Loading user...         loaded
Initiating alembic...
  Creating directory /home/mr/Projects/aiogram-structured/migrations ...  done
  Creating directory /home/mr/Projects/aiogram-structured/migrations/versions ...  done
  Generating /home/mr/Projects/aiogram-structured/migrations/README ...  done
  Generating /home/mr/Projects/aiogram-structured/migrations/script.py.mako ...  done
  Generating /home/mr/Projects/aiogram-structured/migrations/env.py ...  done
  Generating /home/mr/Projects/aiogram-structured/migrations/alembic.ini ...  done
  Please edit configuration/connection/logging settings in '/home/mr/Projects/aiogram-structured/migrations/alembic.ini' before proceeding.
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.autogenerate.compare] Detected added table 'users'
INFO  [alembic.autogenerate.compare] Detected added index 'ix_users_id' on '['id']'
  Generating /home/mr/Projects/aiogram-structured/migrations/versions/7ab567bb891c_2020_04_26_15_03_28.py ...  done
Exception ignored in: <function BaseBot.__del__ at 0x7fbb2531e9e0>
Traceback (most recent call last):
  File "/home/mr/Projects/aiogram-structured/venv/lib/python3.7/site-packages/aiogram/bot/base.py", line 108, in __del__
  File "/usr/lib64/python3.7/asyncio/events.py", line 762, in new_event_loop
  File "/usr/lib64/python3.7/asyncio/events.py", line 660, in new_event_loop
  File "/usr/lib64/python3.7/asyncio/unix_events.py", line 51, in __init__
  File "/usr/lib64/python3.7/asyncio/selector_events.py", line 54, in __init__
  File "/usr/lib64/python3.7/asyncio/base_events.py", line 372, in __init__
  File "/usr/lib64/python3.7/asyncio/coroutines.py", line 28, in _is_debug_mode
AttributeError: 'NoneType' object has no attribute 'dev_mode'
Exception ignored in: <function BaseEventLoop.__del__ at 0x7fbb270113b0>
Traceback (most recent call last):
  File "/usr/lib64/python3.7/asyncio/base_events.py", line 625, in __del__
  File "/usr/lib64/python3.7/asyncio/base_events.py", line 389, in __repr__
  File "/usr/lib64/python3.7/asyncio/base_events.py", line 1805, in get_debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug

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.