$ sudo apt-get install libass-dev libpq-dev postgresql \
build-essential redis-server redis-tools
$ sudo apt-get install python3-pip python3-dev
$ sudo pip3 install virtualenvwrapper
$ echo "export VIRTUALENVWRAPPER_PYTHON=`which python3.6`" >> ~/.bashrc
$ echo "alias v.activate=\"source $(which virtualenvwrapper.sh)\"" >> ~/.bashrc
$ source ~/.bashrc
$ v.activate
$ mkvirtualenv --python=$(which python3.6) --no-site-packages ursa
$ workon ursa
$ pip install -U pip setuptools wheel
So, your changes will affect instantly on the installed version
$ cd /path/to/workspace
$ git clone git@github.com:pylover/nanohttp.git
$ cd nanohttp
$ pip install -e .
$ cd /path/to/workspace
$ git clone git@github.com:pylover/restfulpy.git
$ cd restfulpy
$ pip install -e .
$ cd /path/to/workspace
$ git clone git@github.com:Carrene/ursa.git
$ cd ursa
$ pip install -e .
$ pip install -U -r requirement.txt
$ echo "eval \"\$(register-python-argcomplete ursa)\"" >> $VIRTUAL_ENV/bin/postactivate
$ deactivate && workon ursa
Create a file named ~/.config/ursa.yml
db:
url: postgresql://postgres:postgres@localhost/ursa_dev
test_url: postgresql://postgres:postgres@localhost/ursa_test
administrative_url: postgresql://postgres:postgres@localhost/postgres
$ ursa admin create-db --drop --basedata [or instead of --basedata, --mockup]
$ ursa [-c path/to/config.yml] admin drop-db
$ ursa [-c path/to/config.yml] admin create-db
Or, you can add --drop
to drop the previously created database: TAKE CARE ABOUT USING THAT
$ ursa [-c path/to/config.yml] admin create-db --drop
$ ursa [-c path/to/config.yml] admin setup-db
$ ursa migrate upgrade head
$ ursa [-c path/to/config.yml] admin base-data
$ ursa [-c path/to/config.yml] dev mockup-data
$ nosetests
- Using python builtin http server
$ ursa [-c path/to/config.yml] serve
- Gunicorn
$ ./gunicorn
$ ursa serve-notifications
- Gunicorn
$ ./gunicorn-notifications