This project allows user to add and manage bookmarks using FastAPI. It uses uv, an extremely fast Python package and project manager, written in Rust.
- Pyhton 3.12
- uv for package management
- SQLite as the database
- SQLAlchemy
- Alembic for data migration
-
Clone the repository.
git clone https://github.com/mdauthentic/linkcrate cd linkcrate -
Start the application
uv run fastapi dev
Creates a new bookmark from a link. The response include the metadata about the link.
curl -H "Content-Type: application/json" \
-X POST http://localhost:8000/bookmarks
-d '{ "url": "https://wwww.example.com/" }'
## Returns
{
"title": "",
"description": "",
"url": "https://www.example.com",
"id": 1
}curl -H "Content-Type: application/json" \
-X GET http://localhost:8000/bookmarks/1
## Returns
{
"title": "Link title",
"description": "the description of the link",
"url": "https://www.example.com/",
"id": 1
}Retrieves a list of all links.
curl -H "Content-Type: application/json" \
-X GET http://localhost:8000/bookmarks
## Returns
[
{
"title": "Link title",
"description": "the description of the link",
"url": "https://www.example.com/",
"id": 1
},
{
"title": "Link title 2",
"description": "the description2 of the link",
"url": "https://www.example2.com/",
"id": 2
}
]curl -X DELETE http://localhost:8000/bookmarks