Future work:
- Move to an async framework; apart from encoding/decoding tokens (HMAC + SHA256) this service does nothing significant, it may as well do I/O async so it can handle more incoming connections. A possible stack could be (asyncio uvloop aiohttp) | tornado + asyncpg + requests-futures. OR GEVENT.
Found a bug or want to work on the code? You can branch the repository on GitHub or file an issue at its issue tracker.
$ pip install -e .[dev]
Note: the [dev]
refers to extra requirements for development and is
specified in setup.py
. You don't need to install them as the make test
and make coverage
targets work fine without having them in the virtualenv.
The only reason you might want to install them is so for example pytest
and
responses
can be resolved in you IDE.
In config.yml
you can see an example configuration. You can either:
- make a copy of
config.yml
, adjust it to your needs and point to it using export CONFIG=`pwd`/my_config.yml - or export values for the environment variables referenced in
config.yml
.
If you have docker installed then you can start a Postgres instance with:
$ docker-compose up -d database
You can use the authorization CLI to set up a user. Note that this will also silently create the needed tables, if they don't exist.
$ authz user [username] assign [DEFAULT | EMPLOYEE | EMPLOYEE_PLUS]
Now you can develop, run and test code!