Skip to main content

Easily include basic functions on your apps.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

base_flask_structure-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

base_flask_structure-1.0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file base_flask_structure-1.0.0.tar.gz.

File metadata

  • Download URL: base_flask_structure-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for base_flask_structure-1.0.0.tar.gz
Algorithm Hash digest
SHA256 04b2032c8b18497d4822cc09d5892fcb4df7b4e034d3d59cd2cd278307940731
MD5 3aa558a08033a0977f6fd58223f3669b
BLAKE2b-256 07c16f366622d5b35cb4eec9547e7e6effc182679a984aa1b6f909da1123948f

See more details on using hashes here.

File details

Details for the file base_flask_structure-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for base_flask_structure-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81fbf658c68d1cb8eff48bc7a4975de3156a10673b73c193370a04ca1e7fad9e
MD5 6d5dc79e53485a7ff69c73fb0c454e86
BLAKE2b-256 04fb2693af09f95043ef358b4226978a6b4debd6409238b46f68cf2d03b06a2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page