https://github.com/mrehanlm/fastapi-snowflake-challenge
Python/FastAPI/SnowFlake Challenge
https://github.com/mrehanlm/fastapi-snowflake-challenge
fastapi python snowflake
Last synced: 3 months ago
JSON representation
Python/FastAPI/SnowFlake Challenge
- Host: GitHub
- URL: https://github.com/mrehanlm/fastapi-snowflake-challenge
- Owner: mrehanlm
- License: mit
- Created: 2024-11-08T11:48:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-08T22:57:33.000Z (over 1 year ago)
- Last Synced: 2025-01-08T15:24:32.494Z (over 1 year ago)
- Topics: fastapi, python, snowflake
- Language: Python
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastapi-snowflake-challenge
This repository provides a RESTful API built with FastAPI and Snowflake, implementing basic CRUD operations for a clients table. It’s a simple, unprotected API for managing client data, ideal for learning FastAPI and Snowflake integration.
## Getting started
This guides you through setting up this project in your local environment.
### Prerequisites
- Docker – https://docs.docker.com/engine/install/
- Docker Compose – https://docs.docker.com/compose/install/
- Make utility – `sudo apt-get -y install make`
You just need to run the following command in order to start web server which will be live at http://localhost:8888/docs.
```bash
make up
```
Next, you can visit http://localhost:8888/docs for API docs and try out the APIs.
The `make up` will:
1. start fast api service
2. initialize snowflake connection
3. apply database migrations
We are using `alembic` for declarative database migrations and `snowflake-sqlalchemy` as an ORM for snowflake transactions.
This project also has pretty good unit tests coverage via `pytest` and you can run them by:
```bash
make pytest
```
Moreover, this uses `pre-commit` hooks to enforce code linting and formatting and you can install them by `make pre-commit` and finally, please have a look at `makefile` in project root directory for convenient shortcut commands.
[Database schema](./docs/dev/database.md)
Thank you!