Portfolio FastAPI is a modern web application that provides user management and task management APIs. This project is built using FastAPI and PostgreSQL and supports full-fledged RESTful APIs for user and task management. The goal is to provide users with the ability to easily manage projects and tasks.
- FastAPI – A modern, fast web application framework.
- SQLAlchemy – ORM for database processing.
- PostgreSQL – Relational database.
- Docker – Creating and managing containerized environments.
- Poetry – Python dependency management.
The following instructions will help you get your project up and running locally:
If you don't have Poetry installed yet, you can install it as follows:
- Windows:
curl -sSL https://install.python-poetry.org | python3 -- macOS/Linux:
curl -sSL https://install.python-poetry.org | python3 -Clone this project from GitHub:
git clone https://github.com/Llaamari/portfolio-fastapi.git
cd portfolio-fastapiInstall project dependencies using Poetry:
poetry installThe application can be run with Docker using the following commands. This command creates and starts the Docker containers:
docker-compose up --buildAfter this, the application will be available at http://localhost:8000.
The API's main pages and documentation are available at the following URL:
http://localhost:8000/docs
FastAPI provides automatically generated Swagger UI documentation for API endpoints.
- POST /auth/login: Log in using your email address and password.
- GET /users/me: Retrieve information about the logged-in user.
- POST /tasks/: Create a new task.
- GET /tasks/: Retrieve all tasks.
- GET /tasks/{task_id}: Retrieve a single task based on its ID.
The tests are written using the pytest testing framework. You can run all tests with the following command:
poetry run pytestdocker-compose exec api pytestYou can participate in the project and make improvements or corrections by submitting a pull request on GitHub. All contributions are welcome.
This project is licensed under the MIT License. See the license for more details.