Python >= 3.4 , tested with versions 3.4
, 3.5
, 3.6
MongoDB tested with version 3.6.4
Redis tested with version 3.0.7
In order to run exchange project during development you need to do:
Install dependencies on local machine(Fedora example):
dnf install redis mongodb
Clone the repo:
git clone https://github.com/exchangeproject/exchange
cd exchange
Install dependencies, optionally within a virtualenv
Using virtualenvwrapper:
mkvirtualenv --no-site-packages exchange
workon exchange
pip install -r requirements.txt
Or this way(preferred in my case):
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Ensure that mongodb-server is up and running
systemctl start mongod
Once the dependencies are installed, run the app:
For available commands, run:
python manage.py --help
python manage.py runserver
### Settings
Edit `settings.py` with the local settings for redis and mongodb services.
Example:
```shell
MONGOALCHEMY_DATABASE = 'exchange'
MONGOALCHEMY_SERVER = '127.0.0.1'
MONGOALCHEMY_USER = 'dev00XX'
MONGOALCHEMY_PASSWORD = 'f4cyp4assw0rd'
REDIS_URL = 'redis://localhost:6379/0'
Once the dependencies are installed, run the app:
python manage.py runserver
For available commands, run:
python manage.py runserver
In order to run the tests you must install python-nose
package
pip install nose
And then, you should be able to run the tests:
nosetests
Create a branch with the feature's name
git checkout -b new_feature
- flask
- flask-redis
- flask-restful
- flask-pymongo