Giter VIP home page Giter VIP logo

vroncevic / flask_func_struct Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 6.55 MB

Flask Monolith Project Template - Class-Functional Structure

Home Page: https://vroncevic.github.io/flask_func_struct

License: GNU General Public License v3.0

Python 87.86% CSS 0.04% HTML 8.33% Dockerfile 1.83% Shell 1.94%
python flask project flask-migrate flask-script coverage wtforms flask-login flask-bcrypt flask-bootstrap flask-debugtoolbar flask-sqlalchemy flask-testing flask-wtf

flask_func_struct's Introduction

Flask Functional-Structured Framework

โ˜ฏ๏ธ flask_func_struct is framework for managing Flask App.

Developed in ๐Ÿ python code.

The README is used to introduce the modules and provide instructions on how to install the modules, any machine dependencies it may have and any other information that should be provided before the modules are installed.

flask_func_struct python checker flask_func_struct package checker GitHub issues open GitHub contributors

Table of Contents

Installation

Used next development environment

debian linux os

Navigate to release page download and extract release archive ๐Ÿ“ฆ.

To install flask_func_struct ๐Ÿ“ฆ type the following

tar xvzf flask_func_struct-x.y.z.tar.gz
cd flask_func_struct-x.y.z/
pip install -r requirements.txt
cp manage.py /FlaskApp/
cp -R /manage_commands/ /FlaskApp/
cp -R /app_server/ /Flask/

Or You can use Dockerfile to create image/container ๐Ÿšข.

flask_func_struct docker checker

Usage

Create databse

$ python manage.py create_db
Create database/tables
Done

Init databse and prepare alembic table

$ python manage.py db init
  Creating directory /data/dev/python/flask_func_struct/github/flask_func_struct/migrations ...  done
  Creating directory /data/dev/python/flask_func_struct/github/flask_func_struct/migrations/versions ...  done
  Generating /data/dev/python/flask_func_struct/github/flask_func_struct/migrations/env.pyc ...  done
  Generating /data/dev/python/flask_func_struct/github/flask_func_struct/migrations/env.py ...  done
  Generating /data/dev/python/flask_func_struct/github/flask_func_struct/migrations/alembic.ini ...  done
  Generating /data/dev/python/flask_func_struct/github/flask_func_struct/migrations/README ...  done
  Generating /data/dev/python/flask_func_struct/github/flask_func_struct/migrations/script.py.mako ...  done
  Please edit configuration/connection/logging settings in
  '/data/dev/python/flask_func_struct/github/flask_func_struct/migrations/alembic.ini' before proceeding.

Generate a migration script that makes the database match the models

$ python manage.py db migrate
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.env] No changes in schema detected.

Create super user

$ python manage.py createsuperuser
Creating superuser account
Insert username of superuser: adroot
Insert email of superuser: [email protected]
Insert password of superuser: 
Done

Run application

$ python manage.py runserver
 * Serving Flask app "app_server" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 226-526-932

Dependencies

flask_func_struct requires other modules and libraries (Python 2.x)

alembic                           1.6.5
Flask                             1.1.4
Flask-Bcrypt                      1.0.1
Flask-Bootstrap                   3.3.7.1
Flask-Cors                        3.0.10
Flask-DebugToolbar                0.13.1
Flask-Login                       0.5.0
Flask-Mail                        0.9.1
Flask-Migrate                     2.6.0
Flask-Script                      2.0.6
Flask-SQLAlchemy                  2.5.1
Flask-Testing                     0.8.1
Flask-WTF                         0.14.3
SQLAlchemy                        1.4.27
Werkzeug                          1.0.1
WTForms                           2.3.3

Package structure

๐Ÿงฐ Expected framework structure

app_server/
โ”œโ”€โ”€ configuration/
โ”‚ย ย  โ”œโ”€โ”€ database/
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ development_config.py
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ production_config.py
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ test_config.py
โ”‚ย ย  โ”œโ”€โ”€ development_config.py
โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ”œโ”€โ”€ mail/
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ development_config.py
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ production_config.py
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ test_config.py
โ”‚ย ย  โ”œโ”€โ”€ production_config.py
โ”‚ย ย  โ””โ”€โ”€ test_config.py
โ”œโ”€โ”€ forms/
โ”‚ย ย  โ”œโ”€โ”€ base/
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ contact.py
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ __init__.py
โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ””โ”€โ”€ user/
โ”‚ย ย      โ”œโ”€โ”€ edit.py
โ”‚ย ย      โ”œโ”€โ”€ __init__.py
โ”‚ย ย      โ”œโ”€โ”€ login.py
โ”‚ย ย      โ””โ”€โ”€ register.py
โ”œโ”€โ”€ __init__.py
โ”œโ”€โ”€ models/
โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ””โ”€โ”€ model_user.py
โ”œโ”€โ”€ static/
โ”‚ย ย  โ”œโ”€โ”€ base.css
โ”‚ย ย  โ””โ”€โ”€ favicon.ico
โ”œโ”€โ”€ templates/
โ”‚ย ย  โ”œโ”€โ”€ base/
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ about.html
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ contact.html
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ home.html
โ”‚ย ย  โ”œโ”€โ”€ _base.html
โ”‚ย ย  โ”œโ”€โ”€ errors/
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ 401.html
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ 403.html
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ 404.html
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ 500.html
โ”‚ย ย  โ”œโ”€โ”€ footer.html
โ”‚ย ย  โ”œโ”€โ”€ header.html
โ”‚ย ย  โ””โ”€โ”€ user/
โ”‚ย ย      โ”œโ”€โ”€ administration.html
โ”‚ย ย      โ”œโ”€โ”€ edit.html
โ”‚ย ย      โ”œโ”€โ”€ login.html
โ”‚ย ย      โ”œโ”€โ”€ members.html
โ”‚ย ย      โ””โ”€โ”€ register.html
โ””โ”€โ”€ views/
    โ”œโ”€โ”€ base/
    โ”‚ย ย  โ”œโ”€โ”€ about.py
    โ”‚ย ย  โ”œโ”€โ”€ contact.py
    โ”‚ย ย  โ”œโ”€โ”€ home.py
    โ”‚ย ย  โ””โ”€โ”€ __init__.py
    โ”œโ”€โ”€ __init__.py
    โ””โ”€โ”€ user/
        โ”œโ”€โ”€ administration.py
        โ”œโ”€โ”€ edit.py
        โ”œโ”€โ”€ __init__.py
        โ”œโ”€โ”€ login.py
        โ”œโ”€โ”€ logout.py
        โ”œโ”€โ”€ members.py
        โ””โ”€โ”€ register.py

Docs

Documentation Status

๐Ÿ“— More documentation and info at

Contributing

๐ŸŒŽ ๐ŸŒ ๐ŸŒ Contributing to config_flask

Copyright and licence

License: GPL v3 License

Copyright (C) 2017 by vroncevic.github.io/flask_func_struct

flask_func_struct is free software; you can redistribute it and/or modify it under the same terms as Python itself, either Python version 2.x or, at your option, any later version of Python 2 you may have available.

Lets help and support PSF.

Python Software Foundation

Donate

flask_func_struct's People

Contributors

vroncevic avatar

Watchers

 avatar  avatar  avatar

flask_func_struct's Issues

[flask_func_struct] New platform

Platform base packages:

aiosmtpd==1.4.4.post2
alembic==1.12.1
atpublic==4.0
attrs==23.1.0
Babel==2.13.1
blinker==1.7.0
certifi==2023.11.17
charset-normalizer==3.3.2
click==8.1.7
defusedxml==0.7.1
dnspython==2.4.2
elastic-transport==8.10.0
elasticsearch==8.11.0
email-validator==2.1.0.post1
Flask==3.0.0
flask-babel==4.0.0
Flask-HTTPAuth==4.8.0
Flask-Login==0.6.3
Flask-Mail==0.9.1
Flask-Migrate==4.0.5
Flask-Moment==1.0.5
Flask-SQLAlchemy==3.1.1
Flask-WTF==1.2.1
greenlet==3.0.1
gunicorn==21.2.0
httpie==3.2.2
idna==3.4
itsdangerous==2.1.2
Jinja2==3.1.2
langdetect==1.0.9
Mako==1.3.0
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.2
multidict==6.0.4
packaging==23.2
psycopg2-binary==2.9.9
Pygments==2.17.1
PyJWT==2.8.0
PySocks==1.7.1
python-dotenv==1.0.0
pytz==2023.3.post1
redis==5.0.1
requests==2.31.0
requests-toolbelt==1.0.0
rich==13.7.0
rq==1.15.1
setuptools==68.2.2
six==1.16.0
SQLAlchemy==2.0.23
typing_extensions==4.8.0
urllib3==2.1.0
Werkzeug==3.0.1
WTForms==3.1.1

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.