Giter Site home page Giter Site logo

pyfast's Introduction

Code style: black Imports: isort

Aiogram-Django Template

Features

  1. Custom and configurable app template
  2. Fully typed Django
  3. Async ORM (Django 4.1+)
  4. aiogram3 as Telegram Bot API
  5. pre-commit hooks for code formatting and linting

Installation

  1. Clone the Template:

    • git clone https://github.com/MaximZayats/aiogram-django-template
  2. Install Requirements

    • pip install -r requirements.txt
    • pip install -r requirements-dev.txt
  3. Change the configuration:

    • Copy .env.dist
    • Rename it to .env
    • Insert your values
  4. Make migrations:

    • make makemigrations or python manage.py makemigrations
    • make migrate or python manage.py migrate
  5. Run bot:

    • make run-bot or python -m app.delivery.bot
  6. Run server (Django):

    • Collect static: python manage.py collectstatic
    • Run server (local): make run-local-server or python -m uvicorn app.delivery.web.asgi:application
    • Run server (prod): make run-prod-server
  7. Run app (Bot + Server):

    • make -j3 run-bot run-local-server

Usage

  1. Create new app

    • python manage.py startapp APP_NAME
      • Apps are created using a template: app/config/__app_template__
      • You can use your template: python manage.py startapp APP_NAME --template TEMPLATE_PATH
      • Or without template: python manage.py startapp APP_NAME --no-template
  2. Register app

  3. Check your apps

    • Run bot
    • Type /apps:
      • You should get a list of all your apps
    • Type /APP_NAME:
      • You should get a message from your app

pyfast's People

Contributors

rustamkakhramanov avatar

Watchers

 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.