Skip to content

Commit ed1d2e1

Browse files
author
Systemaker
committed
Update README easy-to-understand
1 parent d8f06fb commit ed1d2e1

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
Python Flask WEB API DEMO
22
========================
3-
3+
A full working flask demo api, exhaustive examples of common web services that we can made with this great micro-framework flask.
4+
A kind of one-size-fits-all which can be too complicated for beginners and also too opinionated for advanced uses but first-of-all it's a full working example of common use cases in web api services featuring authentication and backoffice admin, resources CRUD and query pagination, modular structure, REST json responses or Html renders, bootstrap custom themes, some utils like config files for Nginx (as a frontend reverse proxy), Tornado or Gunicorn (as the application server) and much more features.
45

56
#### This is an advanced demo app forked from AndreiD/Flask-Easy-Template : https://github.com/AndreiD/Flask-Easy-Template
67
#### Additional reference sources - mbithenzomo/project-dream-team-three : https://github.com/mbithenzomo/project-dream-team-three
78

89

910
### Features:
1011
- configuration files, environment variables and sensitive variables (in private folder)
11-
- Utils for server production setups
12+
- Production environment config : REDIS (as a server-side session storage), Nginx (as a frontend reverse proxy), Tornado or Gunicorn (as the application server) and some supervisor (upstart or supervisord) config file examples in utils folder
13+
- Utils for server production setups (nginx and supervisor config files for redis, tornado or gunicorn)
1214
- Latest bootstrap, bootswatch, modernizer, jquery, moment.js, tinymcs, etc. served from content delivery networks.
1315
- Module Sample PAGES, with home page full-screen layout
1416
- Module Sample database SECTIONS with SQLALchemy, relational models and Pagination
@@ -26,7 +28,7 @@ Python Flask WEB API DEMO
2628
- Session based authentication or Basic HTTP authentication or Token based authentication (with active SSL recommended in production environement)
2729
- Password hash and password-check with werkzeug.security (bcrypt-like approach) (with active SSL recommended in production environment)
2830
- password base64 encoding for remote ajax-based app client (optional)
29-
- Role management (is_admin, is_owner, is_member), control access and Dashboard sample page
31+
- Role management (is_admin, is_owner, is_member), control access and Dashboard sample page.
3032
- SQLite or MySQL database configuration option
3133
- SQL schema files and SQL populate files for SQLite or MySQL
3234
- ORM Schema relationships samples with SQLAlchemy :
@@ -145,11 +147,11 @@ Python Flask WEB API DEMO
145147
or for windows users `del /S *.pyc`
146148

147149
---------------------------------------------------------------------------------------------------------
148-
-------------- SECTION PRODUCTION ENVIRONMENT SETTING
150+
-------------- SECTION PRODUCTION ENVIRONMENT SETTING WITH REDIS, NGINX AND TORNADO OR GUNICORN
149151
---------------------------------------------------------------------------------------------------------
150152

151153
##### Extra configs for your server production environment : ./utils
152-
with nginx, gunicorn, tornado and supervisor (upstart or supervisord) configuration files
154+
with nginx config files and supervisor (upstart or supervisord) configuration files for tornado or gunicorn
153155

154156
#### PRODUCTION CONFIG with GUNICORN : Use it for production with GUNICORN Upstart script and NGINX config from utils directory :
155157

@@ -182,12 +184,6 @@ Python Flask WEB API DEMO
182184
Nginx server config script
183185
Redis server-side session config script
184186

185-
186-
#### CORS CONFIG FOR FRONTEND WEB APP :
187-
- edit origins url in "register cors" section in __init__.py file :
188-
CORS(app, resources={r"/*": {"origins": "http://localhost:3000"}})
189-
190-
191187
### REDIS CONFIG FOR SERVER-SIDE SESSION WITH FLASK SESSION :
192188
- Install, configure and secure Redis in your server : https://redis.io/
193189
- Add in your config.py file or prod-config.py file :
@@ -197,6 +193,11 @@ Python Flask WEB API DEMO
197193
SESSION_REDIS = redis.from_url('127.0.0.1:6379')
198194

199195

196+
#### CORS CONFIG FOR FRONTEND WEB APP :
197+
- edit origins url in "register cors" section in __init__.py file :
198+
CORS(app, resources={r"/*": {"origins": "http://localhost:3000"}})
199+
200+
200201
---------------------------------------------------------------------------------------------------------
201202
-------------- SECTION SQL DATABASE
202203
---------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)