This project is a fully asynchronous web server built with FastAPI and HTTPX. Its primary functionality is to retrieve the title and favicon of a given website URL.
- Async Architecture: Fully asynchronous web server using FastAPI.
- HTTP Requests: Handled using HTTPX.
- Caching: Implemented using Redis to cache the results for a limited time, avoiding duplicate requests.
- Favicon: The favicon is fetched, saved, and returned as a file URL.
- Design Pattern: Follows the MVC (Model-View-Controller) design pattern.
- Database: PostgreSQL used as the database.
- Docker: Docker used to manage the application, Redis, and PostgreSQL.
- Request: The server accepts a website URL as input.
- Title: It retrieves and returns the title of the website.
- Favicon: The server fetches and saves the website's favicon, returning a file URL.
- Caching: The URL and its corresponding data are cached in Redis for a limited time to prevent redundant requests.
- Docker: The server runs in a Docker container along with Redis and PostgreSQL.
- Clone the repository:
git clone https://github.com/yourusername/yourproject.git cd yourproject
docker-compose up -d
- Python: Core programming language
- FastAPI: Web framework
- Pydantic: Json Serializer
- SQLAlchemy: ORM
- HTTPX: Asynchronous HTTP requests
- Redis: Caching layer
- PostgreSQL: Database
- Docker: Containerization