Giter Site home page Giter Site logo

jjj3sadler / flask-scaffold Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kigawas/flask-scaffold

0.0 0.0 0.0 417 KB

A scaffold to speed up launching a flask project.

License: MIT License

Shell 1.01% Python 90.60% Mako 3.38% Dockerfile 5.00%

flask-scaffold's Introduction

flask-scaffold

Codacy Badge Github Actions Docker Build Status License

A scaffold to speed up launching a flask project, set up with minimal dependencies.

You can just remove LICENSE, .git/, and .vscode/ files if you don't need them.

There is no silver bullet, so if other libraries or practice are preferred, you can add or change anything as you like.

Prerequisites

  • Python 3.10+

  • Poetry

  • (Optional) Docker and docker compose

Main features

  • APIFlask
  • Blueprint templates to organize directory structure
  • Colorful logger in terminals, stolen from tornado
  • Gunicorn aiohttp server for production use
  • Integrated with static analysis and lint tools like mypy, black, flake8 and git hook tool pre-commit
  • Default Github Actions and Heroku configuration

Common tasks

Create virtual environment with dependencies

python3 -m venv .venv && source .venv/bin/activate && poetry install

Run development flask server

flask run --debug

Run development gunicorn server with aiohttp worker

gunicorn -b :5000 aioapp:aioapp -k aiohttp.worker.GunicornWebWorker --reload

Run production gunicorn server

./boot.sh

Build docker image

docker build .

Run with docker compose

docker-compose up --build

Run git pre-commit hooks

pre-commit run --all-files

flask-scaffold's People

Contributors

dependabot[bot] avatar kigawas avatar codacy-badger 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.