Skip to content

TRINITY-21/briefkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

briefkit

A REST API aggregating weather, crypto prices, and news headlines — with API keys, rate limiting, TTL caching, and auto-generated Swagger docs.

Designed as a clean reference implementation of "production-shaped" API patterns: not a toy, not enterprise-bloated.

Live: web-production-59874.up.railway.app Docs: /docs

Endpoints

Endpoint Description
GET /weather?city=... Current weather + short forecast
GET /crypto?symbol=... Live price, 24h change, market cap
GET /news?topic=... Latest headlines on a topic

All require an API key (free tier available — see /docs).

What's interesting about it

  • API key auth with per-key rate limiting (sliding window, Redis-backed in production, in-memory locally).
  • TTL caching at the data-source level — weather refreshes every 10 minutes, crypto every 30 seconds, news every 15 minutes.
  • Auto-generated Swagger via FastAPI's /docs and /redoc.
  • Pydantic schemas for both request validation and response shape — no untyped JSON in or out.
  • Deployed on Railway with a Postgres-backed key store and a single Dockerfile.

Run locally

git clone https://github.com/TRINITY-21/briefkit.git
cd briefkit
cp .env.example .env  # add your data-source API keys
pip install -r requirements.txt
uvicorn briefkit.main:app --reload

Open localhost:8000/docs.

Stack

Python · FastAPI · SQLAlchemy · httpx · Pydantic · Railway

Why

I wanted a small, real-shape FastAPI codebase to point people at when they ask "what does production-ish FastAPI look like?" Briefkit is that.

License

MIT


Built by Joseph Yaw Agyeman · @TRINITY-21

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors