base-flask-structure


Namebase-flask-structure JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryEasily include basic functions on your apps.
upload_time2023-05-16 18:21:04
maintainer
docs_urlNone
author
requires_python>=3.11
licenseMIT License Copyright (c) 2023 Dagito Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords flask sqlalchemy dotenv base
VCS
bugtrack_url
requirements Flask-SQLAlchemy psycopg2 python-dotenv pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "base-flask-structure",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "flask,sqlalchemy,dotenv,base",
    "author": "",
    "author_email": "Jodagito <jodagito@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/07/c1/6f366622d5b35cb4eec9547e7e6effc182679a984aa1b6f909da1123948f/base_flask_structure-1.0.0.tar.gz",
    "platform": null,
    "description": "# Base Flask Structure\r\n\r\nEasily include basic functions on your apps.\r\n\r\n## What Is?\r\n\r\nA collection of basic modules needed for almost every flask application.\r\n\r\n### Settings Module\r\n\r\nThis module contains a way to load a .env file and set different environment vars useful during the app runtime.\r\n\r\n#### .env file\r\n\r\nThis file should contain those environment variables which are going to be declared on the Settings class.\r\n\r\n### Database Module\r\n\r\nThis module contains an abstract class which uses SQLAlchemy to establish connection to a database.\r\n\r\n## How to install?\r\n\r\nCan be easily installed via pip.\r\n\r\n    pip install base_flask_structure\r\n\r\n## How to use?\r\n\r\n    from bfs.config import Settings\r\n    from bfs.database import AbstractDataBase\r\n\r\n    settings = Settings()  # Calls singleton class Settings\r\n\r\n    class DataBase(AbstractDataBase):\r\n        def init_db(self):\r\n            \"\"\"\r\n            Implements init_db method to initialize \r\n            the database and create all the tables.\r\n            \"\"\"\r\n            self.Base.metadata.create_all(bind=self.engine)\r\n\r\n## Version\r\n\r\n1.0.0\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Dagito  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Easily include basic functions on your apps.",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/Jodagito/base_flask_structure"
    },
    "split_keywords": [
        "flask",
        "sqlalchemy",
        "dotenv",
        "base"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "04fb2693af09f95043ef358b4226978a6b4debd6409238b46f68cf2d03b06a2c",
                "md5": "6d5dc79e53485a7ff69c73fb0c454e86",
                "sha256": "81fbf658c68d1cb8eff48bc7a4975de3156a10673b73c193370a04ca1e7fad9e"
            },
            "downloads": -1,
            "filename": "base_flask_structure-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6d5dc79e53485a7ff69c73fb0c454e86",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 6228,
            "upload_time": "2023-05-16T18:21:02",
            "upload_time_iso_8601": "2023-05-16T18:21:02.535109Z",
            "url": "https://files.pythonhosted.org/packages/04/fb/2693af09f95043ef358b4226978a6b4debd6409238b46f68cf2d03b06a2c/base_flask_structure-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07c16f366622d5b35cb4eec9547e7e6effc182679a984aa1b6f909da1123948f",
                "md5": "3aa558a08033a0977f6fd58223f3669b",
                "sha256": "04b2032c8b18497d4822cc09d5892fcb4df7b4e034d3d59cd2cd278307940731"
            },
            "downloads": -1,
            "filename": "base_flask_structure-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3aa558a08033a0977f6fd58223f3669b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 4241,
            "upload_time": "2023-05-16T18:21:04",
            "upload_time_iso_8601": "2023-05-16T18:21:04.927479Z",
            "url": "https://files.pythonhosted.org/packages/07/c1/6f366622d5b35cb4eec9547e7e6effc182679a984aa1b6f909da1123948f/base_flask_structure-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-16 18:21:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Jodagito",
    "github_project": "base_flask_structure",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Flask-SQLAlchemy",
            "specs": [
                [
                    "==",
                    "3.0.3"
                ]
            ]
        },
        {
            "name": "psycopg2",
            "specs": [
                [
                    "==",
                    "2.9.6"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.3.1"
                ]
            ]
        }
    ],
    "lcname": "base-flask-structure"
}
        
Elapsed time: 0.09407s