https://github.com/jstacoder/flask-apps
give your flask application a setting similar to django INSTALLED_APPS, but with more features
https://github.com/jstacoder/flask-apps
Last synced: about 2 months ago
JSON representation
give your flask application a setting similar to django INSTALLED_APPS, but with more features
- Host: GitHub
- URL: https://github.com/jstacoder/flask-apps
- Owner: jstacoder
- Created: 2015-07-27T00:26:35.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T21:14:23.000Z (7 months ago)
- Last Synced: 2025-05-03T12:02:54.360Z (2 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/jstacoder/flask-apps)
##flask-appsthis gives flask applications a setting similar to djangos `INSTALLED_APPS`,
called `INSTALLED_BLUEPRINTS`- to use:
- first install:
- pip install flask-apps- in your settings file add:
```python
INSTALLED_BLUEPRINTS = [
'path.to.the.bp',
'path.to.next.bp'
]
```- then when you create your app do
```python
from flask_apps import FlaskAppsapp = Flask(__name__)
flask_apps = FlaskApps(app)
```- or use the factory pattern
```python
flask_apps = FlaskApps()
```- then later
```python
flask_apps.init_app(app)
```And thats it, from there FlaskApps will import and register all of the blueprints from the `INSTALLED_BLUEPRINTS` setting, as well as any modules inside the blueprints, ie: models, views, filters, anything