Skip to content

AminovE99/BookSelling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BookSelling App

⚗️ This application provide API create purchase requests for some books.

🚧 Install

  • 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

🚀 Usage

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)

✅ Run tests

python manage.py test

👤 Authors

⚡ Possible Enhancement

  • ✅ Add tests for every view
  • 🐳 Create docker-compose for app
  • 🔧 Configure nginx and add gunicorn server

📄 License

This project is MIT licensed.

About

Service for selling books

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages