Giter Club home page Giter Club logo

flask-backbone's Introduction

Flask-Backbone

Your Next Flask Boilerplate

Create sitemaps with Sitemapa

UPD: March 15, 2023

  • Removed alembic from the codebase. You can install by yourself.
  • Removed SQLAlchemy extensions to avoid unnecessary complexity in the blueprint.
  • Added .env support for the application config with from_prefixed_env. Check app.py for the details.
    • Access FLASK_MY_CONFIG_PROP as app.config.get("MY_CONFIG_PROP").
    • Priorities: .env > config/{env}.py > instance/config.py. Instance folder config is top priority.
  • SQLAlchemy 2 support
  • Added Python Typing
  • Moved to Python 3.11

Features

  • Predefined basic structure, so you'll end up with a clean architecture.
  • Database support via SQLAlchemy. However, you can skip database setup and use Flask-Backbone without the database. I also do not use Flask-SQLAlchemy, but you can.
  • Development/Production/You own configs with instance_relative_config.
  • Cache support via flask_caching. Setup easily with configuration.
  • Flask-Debug
  • Sentry support. Just add your DSN, and you're good to go.
  • Jinja filters and custom variables.
  • Designed to be blueprint-first. Keep your structure clean and steady with blueprints. Everything is a blueprint. Your future self will thank you.
  • Interactive commands to create your next blueprint. Define your blueprint skeletons to speed up your development. To create your next blueprint simply run flask app create-blueprint. It's up to you and you can completely ignore or remove this part and everything will work perfectly fine.
  • Initial setup with a configuration script.
  • WSGI config

Getting Started

Note: Tested with Python 3.11

1 — Clone flask-backbone.

git clone https://github.com/abstractkitchen/flask-backbone.git .

2 — As a rule of thumb, make sure that you use a virtual environment. For example python3 -m venv pythonenv. This will create an environment in the folder pythonenv. I prefer to name my python environment as a pythonenv, because it's more descriptive.

python3 -m venv pythonenv

. pythonenv/bin/activate

pip install -r requirements.txt

3 — Launch configure.py. It will ask you some question about your future setup. python configure.py

This utility will create: .env and instance/config.py.

Usage

Please read this article. You'll learn more details about the boilerplate and Flask.

Read about usage on my website.

Contacts

License

MIT

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.