⚗️ This application provide API create purchase requests for some books.
- Create virtual enviroment for application
python3 -m venv myvenv
- Download packages from requirements.txt
pip install -r requirements.txt
- Configure your redis-server configuration inside
BookSeling.settings
- REDIS_HOST - Host of redis
- REDIS_PORT = Port of redis
Execute redis-server on your local machine
redis-server --port REDIS_PORT
python manage.py runserver
This service use Joser authentication system and provide ability to log in to system by JWT Token.
After server was uped go to /auth/users/
url and register new user by sending post request:
$ curl -X POST {YOUR_ADDRESS}/auth/users/ --data 'username=test_user&password=password_example'
After that try to log in:
curl -X POST {YOUR_ADDRESS}/auth/jwt/create/ --data 'username=test_user&password=password_example'
Now you have Authorization Token to call some private requests. (use access
token for it)
python manage.py test
- ✅ Add tests for every view
- 🐳 Create docker-compose for app
- 🔧 Configure nginx and add gunicorn server
This project is MIT licensed.