Skip to content

ttnsy/fastapi-csv-upload

Repository files navigation

📦 Simple CSV Storage API

A FastAPI-based service that lets users upload, store, and download CSV files.

This project is built with:

  • FastAPI – for the web API
  • uv – for Python dependency and environment management
  • Alembic – for database migrations
  • Taskfile – to simplify common commands (like setup, running, and testing)

‼️ You don’t need to worry about installing or configuring those manually as Taskfile takes care of everything for you 👉 Follow the steps in 🚀 Getting Started

🚀 Getting Started

  • ✅ 1. Install Task (if you haven’t already). Installation guide → https://taskfile.dev/installation
  • ✅ 2. Run setup to install all dependencies and prepares database:
task setup
  • ✅ Once the project is initialized, you can run the app with:
task dev

Pre-commit (Pre-push) Setup

This repository uses pre-commit to run CI-like checks locally before pushing code. The checks mirror the GitHub Actions workflow and help catch issues early.

To install pre-commit hooks (one-time setup):

# Make sure project dependencies installed:
uv sync --locked --all-extras --dev

# Install pre-commit:
uv run pre-commit install --hook-type pre-push

To manually run the pre-push (without pushing):

uv run pre-commit run --hook-stage pre-push --all-files

🧪 Run Tests

Tests are written with pytest and can be run with:

task test

📚 API Endpoints

Full interactive API docs are available at:

📊 Log Telemetry Analysis

A helper script is included to analyze performance telemetry logs saved by the app. By default, the script reads all .jsonl log files in the logs/ directory and compute request count and average processing time per endpoint. Run the script directly from the project root:

uv run scripts/log_telemetry_stats.py

About

A Simple FastAPI-based service that lets users upload, store, and download CSV files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •