The purpose of this project is to implement an asynchronous API for full-text movie search. To achieve this, an application was developed based on the specialized framework FastAPI. Elasticsearch is used as the storage engine. To avoid unnecessary load on the full-text search system, data caching is applied using Redis. The project is run under the control of an ASGI server (uvicorn) in conjunction with the HTTP server NGINX. Functional tests using the pytest library have been written to verify the API's performance.
Python
FastAPI
Elasticsearch
Redis
NGINX
Gunicorn
PyTest
Docker
Clone the repository and navigate to the /infra
directory:
git clone https://github.com/temirovazat/cinemax-async-api.git
cd cinemax-async-api/infra/
Create a .env
file and add project settings:
nano .env
# Elasticsearch
ELASTIC_HOST=elastic
ELASTIC_PORT=9200
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
Deploy and run the project in containers:
docker-compose up
The API documentation will be available at:
http://127.0.0.1/openapi