Code Monkey home page Code Monkey logo

cinemax_flixx's Introduction

CineMax_Flixx

The program is a generally of a movie ranking platform "Cinemania" and performs various operations related to movies. It uses Django, Django-ninja, and MongoDB for database management. The program includes the following functionalities:

  1. Creation of a movie: When a POST request is made to "/movies", the program creates a new movie entry based on the provided data. If the movie's status is "coming-up", it assigns a random ranking between 0 and 5. Otherwise, it sets the ranking to 50. The movie details are stored in both the Django database and MongoDB.

  2. Retrieval of movies: A GET request to "/movies" returns a list of all movies with their respective details from the Django database.

  3. Deletion of a movie: A DELETE request to "/movies/{id}" deletes a movie with the specified ID from both the Django database and MongoDB.

  4. Retrieval of trending movies: A GET request to "/trending_movies" fetches all movies from MongoDB that have a status of "running". The movies are sorted in descending order based on their ranking.

The program utilizes various modules and libraries such as datetime, pymongo, Django, Celery, pydantic, and more to handle data manipulation, serialization, and API endpoints.

Running:

To start the program, run the following command in the directory where the YAML file is located: docker-compose up -d. It will build the webapi service using the provided Dockerfile, set up PostgreSQL, MongoDB, and RabbitMQ, and start the Cinemania program on http://localhost:8000.

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.