Logo Lanfrica

samankwah/gmet-api

Domain:

environment and energy

Record type:

software
Creator:
sam
Host:
A RESTful Weather Data API for the Ghana Meteorological Agency (GMet) built with FastAPI, PostgreSQL, and modern Python practices. # GMet Weather Data API A RESTful Weather Data API for the Ghana Meteorological Agency (GMet) built with FastAPI, PostgreSQL, and modern Python practices. ## Features - **FastAPI Framework**: High-performance async API with automatic OpenAPI documentation - **PostgreSQL Database**: Robust data storage with SQLAlchemy ORM - **API Key Authentication**: Secure access control with API keys - **Weather Data Management**: Current weather, forecasts, and historical data - **Docker Support**: Containerized deployment with Docker Compose - **Database Migrations**: Alembic for schema versioning - **Production Ready**: CORS, rate limiting, logging, and error handling ## Project Structure ``` gmet-weather-api/ ├── app/ │ ├── __init__.py │ ├── main.py # FastAPI application instance │ ├── config.py # Pydantic settings configuration │ ├── database.py # SQLAlchemy database setup │ ├── models/ # SQLAlchemy database models │ │ ├── __init__.py │ │ ├── base.py # Base model with common fields │ │ └── weather_data.py # Weather-related models │ ├── schemas/ # Pydantic schemas for requests/responses │ │ ├── __init__.py │ │ ├── base.py # Base schemas │ │ ├── auth.py # Authentication schemas │ │ └── weather.py # Weather data schemas │ ├── crud/ # CRUD operations │ │ ├── __init__.py │ │ ├── base.py # Base CRUD operations │ │ ├── user.py # User CRUD │ │ └── weather.py # Weather data CRUD │ ├── routers/ # API route handlers │ │ ├── __init__.py │ │ ├── auth.py # Authentication endpoints │ │ └── weather.py # Weather data endpoints │ ├── dependencies/ # Dependency injection │ │ ├── __init__.py │ │ └── auth.py # Authentication dependencies │ └── utils/ # Utility functions │ ├── __init__.py │ └── security.py # …