Skip to content

Latest commit

 

History

History
26 lines (26 loc) · 1.3 KB

README.md

File metadata and controls

26 lines (26 loc) · 1.3 KB

Movies API

An API to simulate the backend system of a movie renting service.

Table of Contents

  1. About
  2. Database
  3. Docs
  4. Setup
  5. Tests

About

An API to simulate the backend system of a movie renting service. Written using FAST API.
It allows users to register themselves, login for token. Then they can make purchases, see movies that are available and so on.
Some endpoints require admin permissions.

Database

The database is represented by this ERD diagram. API uses a sqlite database.
database picture

Docs

Click here to see the docs. I think the docs are self-explanatory.
There you can also play around with the api right away.
To play around with it use the acc:

  • username: test_mail
  • password: test

Setup

The API is written in Python 3.8.1 ant there are some dependencies. Run this command to install them: pip install -r /path/to/requirements.txt.
You need to fill SECRET_KEY in config file. To get that key use openssl rand -hex 32 command. To run it locally use uvicorn main:app.

Tests

There are some tests to ensure the endpoints behave how they should even if the code is changed. To run them simply use pytests command.