Skip to content

ilyas-kalandar/Durov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐺 Durov

A test task from Hipasus LTD

A core logic is located here

To address the issue of multiple concurrent requests to the /users/{username} endpoint, we implemented a solution using a dictionary of Future objects. This approach ensures that when multiple requests are made for the same user, they all share the result of a single database query, rather than issuing separate queries.

Installation guide

Make sure you have docker installed

Clone repository

git clone https://github.com/ilyas-kalandar/Durov
cd Durov

Create .env file

touch .env

Example of .env file

DB_URL = "mysql+aiomysql://root:password@db/durov"

LOGGING_LVL = "INFO"
LOGGING_FORMAT = "[%(asctime)s] - |%(levelname)s| - %(message)s"

SERVING_HOST = "0.0.0.0"
SERVING_PORT = 8000

🚀 Starting project

docker-compose up --build db web 

🧪 Running tests

docker-compose up --build tests

Docs

Available at /docs

img.png

About

Test task from Hipasus LTD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published