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 mongodbClone the repo:
git clone https://github.com/exchangeproject/exchange
cd exchangeInstall dependencies, optionally within a virtualenv
Using virtualenvwrapper:
mkvirtualenv --no-site-packages exchange
workon exchange
pip install -r requirements.txtOr this way(preferred in my case):
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtEnsure that mongodb-server is up and running
systemctl start mongodOnce the dependencies are installed, run the app:
For available commands, run:
python manage.py --helppython 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 runserverFor available commands, run:
python manage.py runserverIn order to run the tests you must install python-nose package
pip install noseAnd then, you should be able to run the tests:
nosetestsCreate a branch with the feature's name
git checkout -b new_feature- flask
- flask-redis
- flask-restful
- flask-pymongo