Hotel Booking API 

FEATURES

  • JWT Authentication

    The API endpoints require user authentication. This authentication is performed by verifying the tokens generated during user login.

  • Pagination

    The API has pagination of 100 results per page, sorted by 'id' in ascending order.

  • Users role

    ANONYMOUS USER can't access the API, NORMAL USER has access to the CRUD of all views.

  • Automatic booking

    The API has the functionality that when a reservation is made, the 'is_reserved' field of the room changes its value to True.

  • Automatic booking cancellation

    The API has the functionality that when a reservation is cancelled, the 'is_reserved' field of the room changes its value to False.

TECHNOLOGIES

  • Python (Source)

    Version: 3.11.2

    Python is a clear and powerful object-oriented programming language, comparable to Perl, Ruby, Scheme, or Java.

  • Django (Source)

    Version: 4.2.1

    Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel. It's free and open source.

  • Django Rest Framework (Source)

    Version: 3.14.0

    Django REST framework is a powerful and flexible toolkit for building Web APIs. Used and trusted by internationally recognised companies including Mozilla, Red Hat, Heroku, and Eventbrite.

  • Simple JWT (Source)

    Version: 5.2.2

    Simple JWT provides a JSON Web Token authentication backend for the Django REST Framework. It aims to cover the most common use cases of JWTs by offering a conservative set of default features. It also aims to be easily extensible in case a desired feature is not present.

  • Django Cors Headers (Source)

    Version: 4.0.0

    A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses. This allows in-browser requests to your Django application from other origins.

  • DRF-YASG (Source)

    Version: 1.21.5

    DRF-YASG is a Python package that generates OpenAPI (Swagger) documentation for Django REST framework APIs. It allows developers to automatically generate API documentation from their Django code, making it easy to maintain up-to-date documentation for their APIs. DRF-YASG provides an easy-to-use interface for configuring API documentation, including specifying endpoints, request/response formats, authentication, and more. The resulting documentation can be viewed in a web browser and can be used by other developers to understand how to interact with the API.

  • Docker (Source)

    Version: 3.8

    Docker is a popular platform for developing, packaging, and deploying software applications. It uses containerization technology to create lightweight, portable, and self-sufficient software containers that can run on any system with the Docker engine installed. Docker allows developers to package their applications and dependencies into a single unit called a container, which can then be easily moved between development, testing, and production environments. It also provides tools for managing and orchestrating containers, making it easier to deploy and scale applications in a distributed environment.