Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gitkodev/fastapi-notes-service
Notes microservice REST API created with Python and FastAPI
https://github.com/gitkodev/fastapi-notes-service
fastapi fastapi-template python repository-pattern
Last synced: 19 days ago
JSON representation
Notes microservice REST API created with Python and FastAPI
- Host: GitHub
- URL: https://github.com/gitkodev/fastapi-notes-service
- Owner: gitkoDev
- Created: 2024-09-07T07:30:19.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T07:22:33.000Z (2 months ago)
- Last Synced: 2024-10-17T03:27:24.694Z (about 1 month ago)
- Topics: fastapi, fastapi-template, python, repository-pattern
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastAPI Notes Microservice
Python + `FastAPI` asynchronous REST API. Authentication is implemented using JWT. Each user can add, modify and access their own notes ONLY using a valid JSON Web Token## Tools used
- `Database` **=>** Postgres + [asyncpg](https://github.com/MagicStack/asyncpg)
- `Database migrations` **=>** [Alembic](https://github.com/sqlalchemy/alembic)
- `Data validation` **=>** [Pydantic](https://github.com/pydantic/pydantic)
- `ORM` **=>** [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy)
- `Authentication and authorization` **=>** [Python Jose](https://github.com/mpdavis/python-jose)## Startup
Run `make run` or `docker compose up --build `in root folder to apply all necessary migrations and start the project.
## Endpoints
### *Swagger documentation with request/response body examples available at `http://127.0.0.1:8000/docs` after project startup*
### Authorization
- ```0.0.0.0:8080/auth ``` `=>` **POST** `=>` Create new user
- ```0.0.0.0:8080/auth/token``` `=>` **POST** `=>` Log in to get access token### API
- ```0.0.0.0:8080/api/v1``` `=>` **POST** `=>` Add note to user
- ```0.0.0.0:8080/api/v1``` `=>` **GET** `=>` Get all notes for user
- ```0.0.0.0:8080/api/v1/{note_id}``` `=>` **GET** `=>` Get user's note by note id
- ```0.0.0.0:8080/api/v1/{note_id}``` `=>` **PUT** `=>` Update user's note by node id
- ```0.0.0.0:8080/api/v1/{note_id}``` `=>` **DELETE** `=>` Delete user's note by note id