### Local Development Setup Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Sets up the local development environment by installing dependencies, importing initial data, and starting the API server using uvicorn. The API is accessible at http://localhost:8000/api and documentation at http://localhost:8000/docs. ```bash # Install dependencies curl -LsSf https://astral.sh/uv/install.sh | sh uv python install 3.13 # Import initial data uv run python -m fuelpricesgr.commands.import # Start the API server uv run uvicorn fuelpricesgr.main:app --reload ``` -------------------------------- ### Get Data Availability Date Range Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Queries the start and end dates for available data based on the specified data type (e.g., WEEKLY_COUNTRY, DAILY_PREFECTURE). ```bash curl -X GET "http://localhost:8000/api/dateRange/WEEKLY_COUNTRY" curl -X GET "http://localhost:8000/api/dateRange/DAILY_PREFECTURE" ``` -------------------------------- ### Testing with FastAPI TestClient Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Examples of how to write tests for the Fuel Prices GR API endpoints using FastAPI's TestClient. ```APIDOC ## Testing with FastAPI TestClient ### Description This section provides examples of how to write unit and integration tests for the Fuel Prices GR API endpoints using FastAPI's `TestClient`. It covers testing the status endpoint, fuel types endpoint, and data retrieval endpoints. ### Test Status Endpoint ```python from fastapi.testclient import TestClient from fuelpricesgr.main import app client = TestClient(app) def test_status(): response = client.get("/api/status") assert response.status_code == 200 data = response.json() assert "db_status" in data assert "cache_status" in data ``` ### Test Fuel Types Endpoint ```python from fastapi.testclient import TestClient from fuelpricesgr.main import app client = TestClient(app) def test_fuel_types(): response = client.get("/api/fuelTypes") assert response.status_code == 200 fuel_types = response.json() assert len(fuel_types) > 0 assert all("name" in ft and "description" in ft for ft in fuel_types) ``` ### Test Weekly Country Data Endpoint ```python from fastapi.testclient import TestClient from fuelpricesgr.main import app client = TestClient(app) def test_weekly_country_data(): response = client.get( "/api/data/weekly/country", params={"start_date": "2024-01-01", "end_date": "2024-01-31"} ) assert response.status_code == 200 ``` ### Test Prefecture Data Endpoint ```python from fastapi.testclient import TestClient from fuelpricesgr.main import app client = TestClient(app) def test_weekly_prefecture_data(): response = client.get("/api/data/weekly/prefecture/ATTICA") assert response.status_code == 200 ``` ``` -------------------------------- ### Get Fuel Types Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Returns all available fuel types with their names and descriptions. ```APIDOC ## Get Fuel Types ### Description Returns a list of all available fuel types, including their internal name and a human-readable description. ### Method GET ### Endpoint /api/fuelTypes ### Parameters None ### Request Example None ### Response #### Success Response (200) - **name** (string) - The internal identifier for the fuel type. - **description** (string) - A human-readable description of the fuel type. #### Response Example ```json [ {"name": "UNLEADED_95", "description": "Αμόλυβδη 95"}, {"name": "UNLEADED_100", "description": "Αμόλυβδη 100"}, {"name": "SUPER", "description": "Super"}, {"name": "DIESEL", "description": "Diesel"}, {"name": "DIESEL_HEATING", "description": "Diesel Θέρμανσης"}, {"name": "GAS", "description": "Υγραέριο"} ] ``` ``` -------------------------------- ### Get Weekly Prefecture Data Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Returns weekly fuel price data for a specific Greek prefecture. ```APIDOC ## Get Weekly Prefecture Data ### Description Returns weekly fuel price data for a specific Greek prefecture. It includes prices for different fuel types. By default, it returns data for the last 365 days. ### Method GET ### Endpoint /api/data/weekly/prefecture/{prefectureName} ### Parameters #### Path Parameters - **prefectureName** (string) - Required - The name of the prefecture to retrieve data for (e.g., `ATTICA`, `THESSALONIKI`). #### Query Parameters - **start_date** (string) - Optional - The start date for the data range (YYYY-MM-DD). - **end_date** (string) - Optional - The end date for the data range (YYYY-MM-DD). ### Request Example ```bash # Get weekly data for Attica prefecture curl -X GET "http://localhost:8000/api/data/weekly/prefecture/ATTICA" # Get weekly data for Thessaloniki with date range curl -X GET "http://localhost:8000/api/data/weekly/prefecture/THESSALONIKI?start_date=2024-01-01&end_date=2024-01-31" ``` ### Response #### Success Response (200) - **date** (string) - The date of the data entry (YYYY-MM-DD). - **data** (array) - An array of fuel price data for the given date. - **fuel_type** (string) - The type of fuel. - **price** (string) - The price of the fuel. - **data_file** (string) - URL to the original PDF data file. #### Response Example ```json [ { "date": "2024-01-26", "data": [ {"fuel_type": "UNLEADED_95", "price": "1.819"}, {"fuel_type": "DIESEL", "price": "1.679"}, {"fuel_type": "DIESEL_HEATING", "price": "1.309"}, {"fuel_type": "GAS", "price": "0.929"} ], "data_file": "http://www.fuelprices.gr/files/deltia/EBDOM_DELTIO_26_01_2024.pdf" } ] ``` ``` -------------------------------- ### Get Prefectures Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Returns all Greek prefectures available in the dataset with their names and descriptions. ```APIDOC ## Get Prefectures ### Description Returns a list of all Greek prefectures for which fuel price data is available, including their internal name and a human-readable description. ### Method GET ### Endpoint /api/prefectures ### Parameters None ### Request Example None ### Response #### Success Response (200) - **name** (string) - The internal identifier for the prefecture. - **description** (string) - A human-readable description of the prefecture. #### Response Example ```json [ {"name": "ATTICA", "description": "ΑΤΤΙΚΗΣ"}, {"name": "THESSALONIKI", "description": "ΘΕΣΣΑΛΟΝΙΚΗΣ"}, {"name": "HERAKLION", "description": "ΗΡΑΚΛΕΙΟΥ"} ] ``` ``` -------------------------------- ### Test API Endpoints with FastAPI TestClient Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Provides examples for unit testing API endpoints including status checks, fuel type retrieval, and date-filtered data queries using the FastAPI TestClient. ```python from fastapi.testclient import TestClient from fuelpricesgr.main import app client = TestClient(app) def test_status(): response = client.get("/api/status") assert response.status_code == 200 def test_fuel_types(): response = client.get("/api/fuelTypes") assert response.status_code == 200 def test_weekly_country_data(): response = client.get("/api/data/weekly/country", params={"start_date": "2024-01-01", "end_date": "2024-01-31"}) assert response.status_code == 200 def test_weekly_prefecture_data(): response = client.get("/api/data/weekly/prefecture/ATTICA") assert response.status_code == 200 ``` -------------------------------- ### Get Daily Country Data Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Returns daily fuel price data aggregated at the country level. ```APIDOC ## Get Daily Country Data ### Description Returns daily fuel price data aggregated at the country level, including prices and the number of stations for each fuel type. By default, it returns data for the last 365 days. ### Method GET ### Endpoint /api/data/daily/country ### Parameters #### Query Parameters - **start_date** (string) - Optional - The start date for the data range (YYYY-MM-DD). - **end_date** (string) - Optional - The end date for the data range (YYYY-MM-DD). ### Request Example ```bash # Get daily country data for last 365 days curl -X GET "http://localhost:8000/api/data/daily/country" # Get daily country data for specific date range curl -X GET "http://localhost:8000/api/data/daily/country?start_date=2024-01-15&end_date=2024-01-20" ``` ### Response #### Success Response (200) - **date** (string) - The date of the data entry (YYYY-MM-DD). - **data** (array) - An array of fuel price data for the given date. - **fuel_type** (string) - The type of fuel. - **price** (string) - The price of the fuel. - **number_of_stations** (integer) - The number of stations reporting this fuel type. - **data_file** (string) - URL to the original PDF data file. #### Response Example ```json [ { "date": "2024-01-20", "data": [ {"fuel_type": "UNLEADED_95", "price": "1.795", "number_of_stations": 5198}, {"fuel_type": "DIESEL", "price": "1.655", "number_of_stations": 5145} ], "data_file": "http://www.fuelprices.gr/files/deltia/IMERISIO_DELTIO_PANELLINIO_20_01_2024.pdf" } ] ``` ``` -------------------------------- ### GET /api/data/daily/prefecture/{prefecture} Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Retrieves daily fuel price data for a specified Greek prefecture, optionally filtered by a date range. ```APIDOC ## GET /api/data/daily/prefecture/{prefecture} ### Description Returns a list of daily fuel price records for the requested prefecture. If date parameters are provided, the results are filtered accordingly. ### Method GET ### Endpoint /api/data/daily/prefecture/{prefecture} ### Parameters #### Path Parameters - **prefecture** (string) - Required - The name of the prefecture (e.g., HERAKLION, CHANIA). #### Query Parameters - **start_date** (string) - Optional - Start date in YYYY-MM-DD format. - **end_date** (string) - Optional - End date in YYYY-MM-DD format. ### Request Example GET http://localhost:8000/api/data/daily/prefecture/HERAKLION?start_date=2024-01-15&end_date=2024-01-20 ### Response #### Success Response (200) - **date** (string) - The date of the record. - **data** (array) - List of fuel types and their respective prices. - **data_file** (string) - URL to the official PDF source file. #### Response Example [ { "date": "2024-01-20", "data": [ {"fuel_type": "UNLEADED_95", "price": "1.829"}, {"fuel_type": "DIESEL", "price": "1.689"} ], "data_file": "http://www.fuelprices.gr/files/deltia/IMERISIO_DELTIO_ANA_NOMO_20_01_2024.pdf" } ] ``` -------------------------------- ### Get Application Status Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Returns the current status of the database and cache connections to verify the application is healthy. ```APIDOC ## Get Application Status ### Description Returns the current status of the database and cache connections to verify the application is healthy. ### Method GET ### Endpoint /api/status ### Parameters None ### Request Example None ### Response #### Success Response (200) - **db_status** (string) - Status of the database connection. - **cache_status** (string) - Status of the cache connection. #### Response Example ```json { "db_status": "ok", "cache_status": "ok" } ``` ``` -------------------------------- ### Get Date Range Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Returns the available data date range for a specific data type. ```APIDOC ## Get Date Range ### Description Returns the available data date range for a specific data type. The supported data types are: `WEEKLY_COUNTRY`, `WEEKLY_PREFECTURE`, `DAILY_COUNTRY`, `DAILY_PREFECTURE`. ### Method GET ### Endpoint /api/dateRange/{dataType} ### Parameters #### Path Parameters - **dataType** (string) - Required - The type of data to get the date range for. Accepted values: `WEEKLY_COUNTRY`, `WEEKLY_PREFECTURE`, `DAILY_COUNTRY`, `DAILY_PREFECTURE`. ### Request Example ```bash # Get date range for weekly country data curl -X GET "http://localhost:8000/api/dateRange/WEEKLY_COUNTRY" # Get date range for daily prefecture data curl -X GET "http://localhost:8000/api/dateRange/DAILY_PREFECTURE" ``` ### Response #### Success Response (200) - **start_date** (string) - The earliest date for which data is available for the specified type (YYYY-MM-DD). - **end_date** (string) - The latest date for which data is available for the specified type (YYYY-MM-DD). #### Response Example ```json { "start_date": "2012-04-27", "end_date": "2024-01-26" } ``` ``` -------------------------------- ### Get Weekly Country Data Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Returns weekly fuel price data aggregated at the country level. ```APIDOC ## Get Weekly Country Data ### Description Returns weekly fuel price data aggregated at the country level. It includes prices and the number of stations for each fuel type. By default, it returns data for the last 365 days. ### Method GET ### Endpoint /api/data/weekly/country ### Parameters #### Query Parameters - **start_date** (string) - Optional - The start date for the data range (YYYY-MM-DD). - **end_date** (string) - Optional - The end date for the data range (YYYY-MM-DD). ### Request Example ```bash # Get weekly country data for last 365 days (default) curl -X GET "http://localhost:8000/api/data/weekly/country" # Get weekly country data for specific date range curl -X GET "http://localhost:8000/api/data/weekly/country?start_date=2024-01-01&end_date=2024-01-31" ``` ### Response #### Success Response (200) - **date** (string) - The date of the data entry (YYYY-MM-DD). - **data** (array) - An array of fuel price data for the given date. - **fuel_type** (string) - The type of fuel. - **price** (string) - The price of the fuel. - **number_of_stations** (integer) - The number of stations reporting this fuel type. - **data_file** (string) - URL to the original PDF data file. #### Response Example ```json [ { "date": "2024-01-26", "data": [ {"fuel_type": "UNLEADED_95", "price": "1.789", "number_of_stations": 5234}, {"fuel_type": "DIESEL", "price": "1.649", "number_of_stations": 5189}, {"fuel_type": "DIESEL_HEATING", "price": "1.289", "number_of_stations": 4521}, {"fuel_type": "GAS", "price": "0.899", "number_of_stations": 1234} ], "data_file": "http://www.fuelprices.gr/files/deltia/EBDOM_DELTIO_26_01_2024.pdf" } ] ``` ``` -------------------------------- ### Get Daily Prefecture Fuel Price Data API Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Fetches daily fuel price data for a specified Greek prefecture. Supports date range filtering. Returns data in JSON format, including price details and a link to the source PDF. ```bash # Get daily data for Heraklion prefecture curl -X GET "http://localhost:8000/api/data/daily/prefecture/HERAKLION" # Get daily data for Chania with date range curl -X GET "http://localhost:8000/api/data/daily/prefecture/CHANIA?start_date=2024-01-15&end_date=2024-01-20" ``` -------------------------------- ### Fetch Weekly Country Fuel Data Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Retrieves aggregated weekly fuel price data at the country level. Supports optional start and end date parameters. ```bash curl -X GET "http://localhost:8000/api/data/weekly/country" curl -X GET "http://localhost:8000/api/data/weekly/country?start_date=2024-01-01&end_date=2024-01-31" ``` -------------------------------- ### Initialize and Use Storage API Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Demonstrates programmatic interaction with the storage backend. It shows how to initialize the storage and perform data operations using the fuelpricesgr storage API. ```python from datetime import date from fuelpricesgr import storage, enums # Initialize storage storage.init_storage() ``` -------------------------------- ### Data Retrieval using Context Manager Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Demonstrates how to fetch fuel price data using the storage context manager, including weekly country data, prefecture-specific data, and checking data existence. ```APIDOC ## Data Retrieval using Context Manager ### Description This section shows how to access fuel price data programmatically using a context manager for storage operations. It covers fetching date ranges, weekly country data, prefecture-specific data, and checking for data existence. ### Usage Example ```python from datetime import date from fuelpricesgr import enums from fuelpricesgr.storage import get_storage with get_storage() as s: # Get date range for weekly country data date_range = s.date_range(data_type=enums.DataType.WEEKLY_COUNTRY) print(f"Data available from {date_range.start_date} to {date_range.end_date}") # Fetch weekly country data for January 2024 weekly_data = list(s.weekly_country_data( start_date=date(2024, 1, 1), end_date=date(2024, 1, 31) )) for record in weekly_data: print(f"{record.date}: {record.fuel_type.name} = {record.price} ({record.number_of_stations} stations)") # Fetch weekly prefecture data for Attica for January 2024 attica_data = list(s.weekly_prefecture_data( prefecture=enums.Prefecture.ATTICA, start_date=date(2024, 1, 1), end_date=date(2024, 1, 31) )) for record in attica_data: print(f"{record.date}: {record.fuel_type.name} = {record.price}") # Check if daily country data exists for January 15, 2024 exists = s.data_exists(data_type=enums.DataType.DAILY_COUNTRY, date=date(2024, 1, 15)) print(f"Data exists: {exists}") ``` ``` -------------------------------- ### Retrieve Fuel Data via Storage Manager Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Demonstrates how to use the storage context manager to query weekly country data, prefecture-specific data, and check for data existence within a specified date range. ```python with storage.get_storage() as s: date_range = s.date_range(data_type=enums.DataType.WEEKLY_COUNTRY) weekly_data = list(s.weekly_country_data(start_date=date(2024, 1, 1), end_date=date(2024, 1, 31))) attica_data = list(s.weekly_prefecture_data(prefecture=enums.Prefecture.ATTICA, start_date=date(2024, 1, 1), end_date=date(2024, 1, 31))) exists = s.data_exists(data_type=enums.DataType.DAILY_COUNTRY, date=date(2024, 1, 15)) ``` -------------------------------- ### Environment Variable Configuration Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Configures the application using environment variables. A sample .env file is provided for customization. Key variables include SECRET_KEY, STORAGE_BACKEND, STORAGE_URL, and caching/mail settings. ```bash # Create .env file from sample cp .env.sample .env # Required: Secret key for cryptographic signing SECRET_KEY=your_secret_key_here # Storage backend configuration # SQLite (default) STORAGE_BACKEND=fuelpricesgr.storage.sql_alchemy.SqlAlchemyStorage STORAGE_URL=sqlite:///var/db.sqlite # PostgreSQL STORAGE_BACKEND=fuelpricesgr.storage.sql_alchemy.SqlAlchemyStorage STORAGE_URL=postgresql://user:password@localhost/fuelpricesgr # MySQL/MariaDB STORAGE_BACKEND=fuelpricesgr.storage.sql_alchemy.SqlAlchemyStorage STORAGE_URL=mysql+pymysql://user:password@localhost/fuelpricesgr?charset=utf8mb4 # MongoDB STORAGE_BACKEND=fuelpricesgr.storage.mongo.MongoDBStorage STORAGE_URL=mongodb://user:password@localhost/fuelpricesgr # Maximum days to return from API (default: 365) MAX_DAYS=365 # Show SQL queries for debugging SHOW_SQL=False # Cache configuration (Redis example) CACHE_BACKEND=cachelib.redis.RedisCache CACHE_PARAMETERS=host=localhost,port=6379,db=0 CACHE_TIMEOUT=3600 # Mail configuration for notifications MAIL_BACKEND=fuelpricesgr.mail.ses.SESMailSender MAIL_SENDER=noreply@example.com MAIL_PARAMETERS=region_name=eu-west-1 ``` -------------------------------- ### Import Data CLI Command Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Imports fuel price data from PDF files into the database. Supports various import types (e.g., WEEKLY, DAILY_COUNTRY), date ranges, and options for updating existing data, skipping cache, and verbose output. Use --help for all options. ```bash # Import all data types from the earliest available date to today uv run python -m fuelpricesgr.commands.import # Import only weekly data uv run python -m fuelpricesgr.commands.import --types=WEEKLY # Import only daily country data for a specific date range uv run python -m fuelpricesgr.commands.import --types=DAILY_COUNTRY --start-date=2024-01-01 --end-date=2024-01-31 # Import multiple data types uv run python -m fuelpricesgr.commands.import --types=WEEKLY,DAILY_COUNTRY # Force update existing data uv run python -m fuelpricesgr.commands.import --update # Skip file cache and re-download all PDFs uv run python -m fuelpricesgr.commands.import --skip-cache # Verbose output for debugging uv run python -m fuelpricesgr.commands.import --verbose # View all available options uv run python -m fuelpricesgr.commands.import --help ``` -------------------------------- ### Docker Deployment Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Builds the Docker image for the application and runs it as a container. Docker Compose can also be used for orchestration. The API is exposed on port 8000. ```bash # Build the Docker image docker build -t mavroprovato/fuelpricesgr . # Run the container docker run -p 8000:8000 -e SECRET_KEY=your_secret_key mavroprovato/fuelpricesgr # Or use Docker Compose docker compose up -d ``` -------------------------------- ### Fetch Weekly Prefecture Fuel Data Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Retrieves weekly fuel price data for a specific prefecture. Requires the prefecture name as a path parameter. ```bash curl -X GET "http://localhost:8000/api/data/weekly/prefecture/ATTICA" curl -X GET "http://localhost:8000/api/data/weekly/prefecture/THESSALONIKI?start_date=2024-01-01&end_date=2024-01-31" ``` -------------------------------- ### Create User CLI Command Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Creates administrator users for the SQLAdmin panel. This command is used for setting up access to the administrative interface. ```bash # Create an admin user uv run python -m fuelpricesgr.commands.createuser ``` -------------------------------- ### Running Tests Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Executes the project's test suite using pytest. Includes commands for running all tests, generating code coverage reports (HTML), and performing static code analysis with pylint. ```bash # Run all tests uv run pytest # Run tests with coverage uv run coverage run -m pytest . # Generate HTML coverage report uv run coverage html # View report at htmlcov/index.html # Run pylint for code quality uv run pylint fuelpricesgr ``` -------------------------------- ### Retrieve Available Fuel Types Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Fetches a list of all supported fuel types, including their internal names and human-readable descriptions. ```bash curl -X GET "http://localhost:8000/api/fuelTypes" ``` -------------------------------- ### Import Fuel Data via Importer API Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Shows how to programmatically trigger data imports from government sources. Supports filtering by file type, date ranges, and options for updating records or bypassing cache. ```python from datetime import date from fuelpricesgr import importer, enums importer.import_data() importer.import_data(data_file_types=[enums.DataFileType.WEEKLY], start_date=date(2024, 1, 1), end_date=date(2024, 1, 31)) importer.import_data(data_file_types=[enums.DataFileType.DAILY_COUNTRY, enums.DataFileType.DAILY_PREFECTURE], start_date=date(2024, 1, 1), end_date=date(2024, 1, 31), update=True, skip_cache=True) ``` -------------------------------- ### Importer API Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Details on how to programmatically import fuel price data from the government website using the Importer API. ```APIDOC ## Importer API ### Description Programmatically import data from the government website using the `importer` module. This allows for importing all data types, specific file types within a date range, and includes options for updating existing records and skipping cache. ### Import All Data ```python from fuelpricesgr import importer importer.import_data() ``` ### Import Specific Data Types ```python from datetime import date from fuelpricesgr import importer, enums importer.import_data( data_file_types=[enums.DataFileType.WEEKLY], start_date=date(2024, 1, 1), end_date=date(2024, 1, 31) ) ``` ### Import with Options ```python from datetime import date from fuelpricesgr import importer, enums importer.import_data( data_file_types=[enums.DataFileType.DAILY_COUNTRY, enums.DataFileType.DAILY_PREFECTURE], start_date=date(2024, 1, 1), end_date=date(2024, 1, 31), update=True, # Update existing records skip_cache=True # Re-download PDFs ) ``` ``` -------------------------------- ### Fetch Daily Country Fuel Data Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Retrieves aggregated daily fuel price data at the country level. Supports date range filtering via query parameters. ```bash curl -X GET "http://localhost:8000/api/data/daily/country" curl -X GET "http://localhost:8000/api/data/daily/country?start_date=2024-01-15&end_date=2024-01-20" ``` -------------------------------- ### Retrieve Greek Prefectures Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Returns a list of all Greek prefectures available in the dataset, which can be used as filters for other API endpoints. ```bash curl -X GET "http://localhost:8000/api/prefectures" ``` -------------------------------- ### Check API Application Status Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Retrieves the current health status of the database and cache connections to ensure the API is operational. ```bash curl -X GET "http://localhost:8000/api/status" ``` -------------------------------- ### Clear Cache CLI Command Source: https://context7.com/mavroprovato/fuelpricesgr/llms.txt Clears all cached API responses. This is useful for ensuring that the latest data is served when the cache may be stale. ```bash # Clear the cache uv run python -m fuelpricesgr.commands.clearcache ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.