Base Flask Structure
Easily include basic functions on your apps.
What Is?
A collection of basic modules needed for almost every flask application.
Settings Module
This module contains a way to load a .env file and set different environment vars useful during the app runtime.
.env file
This file should contain those environment variables which are going to be declared on the Settings class.
Database Module
This module contains an abstract class which uses SQLAlchemy to establish connection to a database.
How to install?
Can be easily installed via pip.
pip install base_flask_structure
How to use?
from bfs.config import Settings
from bfs.database import AbstractDataBase
settings = Settings() # Calls singleton class Settings
class DataBase(AbstractDataBase):
def init_db(self):
"""
Implements init_db method to initialize
the database and create all the tables.
"""
self.Base.metadata.create_all(bind=self.engine)
Version
1.0.0
Metadata
Release files for base-flask-structure 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| base_flask_structure-1.0.0.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| base_flask_structure-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 kB
Release files / base_flask_structure-1.0.0.tar.gz
| Download URL | base_flask_structure-1.0.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04b2032c8b18497d4822cc09d5892fcb4df7b4e034d3d59cd2cd278307940731
|
|
BLAKE2b-256 checksum How to use checksums |
07c16f366622d5b35cb4eec9547e7e6effc182679a984aa1b6f909da1123948f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / base_flask_structure-1.0.0-py3-none-any.whl
| Download URL | base_flask_structure-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81fbf658c68d1cb8eff48bc7a4975de3156a10673b73c193370a04ca1e7fad9e
|
|
BLAKE2b-256 checksum How to use checksums |
04fb2693af09f95043ef358b4226978a6b4debd6409238b46f68cf2d03b06a2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|