Superdesk Server provides a REST API server for Superdesk project. It's a python app, built on top of eve/flask framework.
There is some basic infrastructure plus app modules for users, authentication, ingest, archive, etc.
We support python version 3.3+.
Other requirements are mongodb server and elasticsearch instance. Both can be configured via environment variables (see settings.py).
Using virtualenv is recommended for installing python requirements. So once activated, run:
$ pip install -r requirements.txtFor image processing you will need some extra packages:
- mongodb
- elasticsearch
- redis
Use nosetests for unit tests:
$ nosetestsBehave for behaviour testing:
$ behaveFlake8 for style check:
$ flake8Use honchu to run the app - it will start api server on port 5000, websocket server on port 5100 and celery.
$ honcho startFig is configured to create and start Docker container not only for Superdesk application itself but also for the depended services (mongodb, redis, elasticsearch).
It will mount git repo root inside the container so all the local changes will be reflected there.
So after running this command server will start listening on localhost:5000 for REST API and on localhost:5100 for WebSockets:
$ fig upTo create user you can run that command (it will start container instance for command execution and start depended service if needed):
fig run web python3 manage.py users:create -u admin -p admin -e "admin@example.com" --admin=trueTo rebuild environment(ie changes to environemnt or dependencies):
fig build && fig upFor more commandline magic go to their docs: http://www.fig.sh/cli.html
You can see API Documentation on apiary.
$ python manage.pyThis will give you list of available commands.
This command will create an administrator user.
$ python manage.py users:create -u <username> -p <password> -e <email>