Giter Site home page Giter Site logo

georgepavlej / cinema-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vasyl-poremchuk/cinema-api

0.0 0.0 0.0 19 KB

Service providing REST API for a cinema. Written in Python using the Django Rest Framework and Docker technology.

Python 99.25% Dockerfile 0.75%

cinema-api's Introduction

Cinema API Service


API service for cinema management written on DRF.

Features


  • JWT authenticated;
  • Admin panel/admin/;
  • Documentation is located at /api/doc/swagger/ or /api/doc/redoc/;
  • Managing orders and tickets;
  • Creating movies with genres, actors;
  • Creating cinema halls;
  • Adding movie sessions;
  • Filtering movies and movie sessions.

Installing using GitHub


Install PostgresSQL and create DB.

Run the commands below:

git clone https://github.com/Vasyl-Poremchuk/cinema-api
cd cinema-api
python -m venv venv
venv\Scripts\activate (Windows) or source venv/bin/activate (Linux or macOS)
pip install -r requirements.txt

Create an .env file in which write the commands below:

set DB_HOST=<your DB host>
set DB_NAME=<your DB name>
set DB_USER=<your DB username>
set DB_PASSWORD=<your DB user password>
set DJANGO_SECRET_KEY=<your secret key>

Run migrations and run server:

python manage.py migrate
python manage.py runserver

Getting access


  • Create user via/api/user/register/
  • Get access token via/api/user/token/

Also, you can run project using docker container


Docker should be installed on your machine.

docker-compose build
docker-compose up

Follow the instructions below to access the docker container


  • Go to 127.0.0.1:8000/api/ and check project endpoints via DRF interface;
  • Create new admin user. Enter container docker exec -it <container_name> bash, and create in from there.

cinema-api's People

Contributors

vasyl-poremchuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.