KO
|
EN
gitlite — search
Search
#ai
#typescript
#python
#claude-code
#agent-skills
#rust
#linux
#mcp
#skills
#productivity
#cli
#react
fuelpricesgr
★ 23
Open GitHub ↗
Database of fuel prices in Greece
Download README (.md)
Explore Similar Repositories
ha-gasbuddy
:
Component to integrate with GasBuddy fuel price tracker.
lovelace-tankerkoenig-card
:
A Lovelace card to display German fuel prices from Tankerkönig.
ha-custom-component-precoscombustiveis
:
Preços dos Combustíveis Online - DGEG
Fuel-Prices-UK
:
Find the cheapest fuel prices per by location in the UK! A Home Assistant custom component HACS integration based on the UK Government collected Fuel Price open data scheme: https://www.gov.uk/guidance/access-fuel-price-data
fuel_prices_sweden
:
Fuel Prices in Sweden
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
fuelpricesgr
?
Download (.md)
# Fuel Prices The purpose of this project is to create a database of fuel prices in Greece. Daily and weekly data about fuel prices are regularly uploaded at the [Παρατηρητήριο Τιμών Υγρών Καυσίμων](http://www.fuelprices.gr) website by the Greek Government, but the data are published as PDF files. In order to process the data more easily, this project fetches those PDF files, extracts the data from them, inserts them in a database, and exposes them in an API. Data are available since: * 2012-04-27 for weekly country data * 2012-05-04 for weekly prefecture data * 2017-08-28 for daily country data * 2017-03-14 for daily prefecture data ## Running the API The backend API is a [Python](https://www.python.org) based project, built with [FastAPI](https://fastapi.tiangolo.com), that uses [uv](https://docs.astral.sh/uv/) for dependency management. In order to install uv, you need to run: ```shell curl -LsSf https://astral.sh/uv/install.sh | sh ``` If you don't have the required Python version install, you need to run ```shell uv python install `cat .python-version` ``` By default, the data are stored in an [SQLite](https://www.sqlite.org) database. In order to fetch the data you need to run: ``` uv run python -m fuelpricesgr.commands.import ``` This command accepts various parameters to limit the data to be fetched. You can see them by running ``` uv run python -m fuelpricesgr.commands.import --help ``` Now you can launch the API by running the command: ``` uv run uvicorn fuelpricesgr.main:app ``` The API is now available at http://localhost:8000/api. The documentation for the API is available at http://localhost:8000/docs. ## Running the administration interface An administration interface is provided for the application data, but only if SQLAlchemy is used to manage the application data. Before using it, an administrator user must be created. You can create it by running the following command: ``` uv run python -m fuelpricesgr.commands.createuser --admin <user_email> ``` The command will ask you for a password for the user. After successful creation, you can log in to the administration interface at http://localhost:8000/admin and manage the data. ## Running with docker In order to build the Docker image run ``` docker build -t mavroprovato/fuelpricesgr . ``` In order to run the docker image run ``` docker run -p 8000:8000 mavroprovato/fuelpricesgr ``` ## Development In order to run the application tests, run ``` uv run pytest ``` In order to get the test coverage report, run ``` uv run coverage run -m pytest . ``` This will generate an HTML coverage report in `htmlcov/index.html` In order to get a pylint report, run ``` uv run pylint fuelpricesgr ```