What is Enferno Framework
Enferno is a python framework based on the popular minimal microframework Flask, but with pre-configured libraries and modules that makes developing any kind of app really easy and fast.
Enferno uses a standard Model-View-Controller and application factory patterns.
Enferno also include the necessary templates to deploy your app in a matter of seconds using Docker.
Features
- Full user management (register, login, logout, reset, roles etc ..) with easy helper set of management commands.
- ORM (with SQL Alchemy)
- Background/scheduled tasks (with Celery)
- In-memory key value store (Redis)
- Un-opinionated front-end with some basic minimal custom css.
- Very easy to customize and build on.
- Deploy easily with Docker Compose.
Prerequisites
- Python 2 or Python 3
- Optional: Redis, Mysql or Postgresql
Installation
# Clone the repository
git clone https://github.com/level09/enferno
# Switch to the app directory
cd enferno
# Create virtual environment
virtualenv env
# Activate the environtment
source env/bin/activate
# Install python requirements
pip install -r requirements.txt
# Export flask variables
export FLASK_APP=run.py && FLASK_DEBUG=1
Edit the settings file located in the 'enferno' dir, and set your database settings
e.g: set the database to a local sqlite file:
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/enferno.db'
Next we need to create the default database tables (mainly the tables for user accounts and auth), run the following command
flask create-db
Optionally you can then create your first admin user with the following command:
flask install
To start the app run:
flask run
Navigate to the following url in your web browser:
http://127.0.0.1:5000/
You should get the default page:
Congratulation, you are ready to build the next big thing on the internet!