Perquisites
Before the installation of Aurora, make sure you have Python installed on your machine.
You can check it simply by running the following command in your CLI program:
$ python3 --version
Aurora framework needs Python version 3 or higher to run.
For windows users use py
instead of python3
for all CLI commands in this documentation.
If you don't have Python, first download & install it from its official website:
Installation
Now that you have Python installed on your machine, you can install Aurora framework using the following command:
$ python3 -m pip install aurora-mvc
It will install Aurora framework globally on your machine. You can install it on your local environement by:
$ pip install aurora-mvc
If you are new to python and don't know how to install a package, visit the following link:
Dependecies
Aurora uses several dependencies to run and work correctly:
Aurora needs flask to be installed on your environment. You can install it by:
$ pip install flask
Aurora uses WTForms package to produce CSRF tokens. You can install it by:
$ pip install WTForms
Aurora uses flask_compress package for compressing the responses. Install it by:
$ pip install flask_compress
You can also install all Aurora dependencies at once by running:
$ pip install flask WTForms flask_compress
Usage
To get started with Aurora simply do the following steps:
- Create the project (root app) directory:
$ [sudo] mkdir my_app
Here my_app
is a variable name. Change it to anything of your choice at any time you want.
- Create a python virtual environment in the same path the project directory exists:
Linux / Mac
$ python3 -m venv venv
Windows
$ py -m venv venv
- Activate the virtual environment:
Linux / Mac
$ source venv/bin/activate
Windows
$ venv\scripts\activate
If you are using Git Bash as your CLI program you shoud use:
$ . venv/scripts/activate
- Navigate to the project directory:
(venv) cd my_app
The project directory must be empty, otherwise you will get an error on the next step.
- Initialize the root app with Aurora via python shell:
Linux / Mac
(venv) python3
Windows
(venv) py
Then run:
>>> from aurora import init
>>> init.start()
It will create all the required directories, modules and packages in the project directory.
Congratulations!
You initialized the root app successfully. Now you are ready to run your Aurora application.
- Finally, to start the root app run the following command:
Linux / Mac
(venv) python3 -m app
Windows
(venv) py -m app
Now you can visit the following address in your browser to make sure everything is fine:
This is the default configuration for the URL of your app.
You will learn how to modify it in section.