https://github.com/race-tech/f1-api
A Formula1 API build in Rust.
https://github.com/race-tech/f1-api
docker ergast formula1 graphql mysql rust
Last synced: 6 months ago
JSON representation
A Formula1 API build in Rust.
- Host: GitHub
- URL: https://github.com/race-tech/f1-api
- Owner: race-tech
- License: gpl-3.0
- Created: 2024-01-22T04:36:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-11-29T18:14:17.000Z (7 months ago)
- Last Synced: 2025-11-30T20:12:59.189Z (7 months ago)
- Topics: docker, ergast, formula1, graphql, mysql, rust
- Language: Rust
- Homepage: https://f1-api.thibault-cne.fr
- Size: 1.05 MB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/race-tech/f1-api/blob/master/.github/workflows/rust.yml)
[](https://circleci.com/gh/race-tech/f1-api)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
[](https://rust-reportcard.xuri.me/report/github.com/race-tech/f1-api)
# F1 API
This is a Fomula One API build in Rust and currently under development. The goal is to provide a simple and easy to use API to access the ergast database and in the end, provide a new maintained database after the 2024 season.
## Prerequisites
To build and run the API, you need to have the following tools installed on your system:
- [Rust](https://www.rust-lang.org/tools/install)
- [Docker](https://docs.docker.com/get-docker/)
## Development
### Using Docker
To run the API locally, follow these steps:
1. Clone the repository: `git clone https://github.com/race-tech/f1-api.git`
2. Run the project using the docker compose file: `docker-compose -f docker-compose.dev.yml up -d --build`
## Configuration
You can configure the API using a yaml file. This file should be named `config.yaml` and should be placed in the root of the project. The following configuration options are available:
```yaml
port: 8000
database:
name: f1db
hostname: database
port: 3306
user: user
password: password
middlewares:
- graphiql:
enabled: true
route: /
```
You can also change the file name and location by setting the `F1_API_CONFIG` environment variable.
## License
This project is licensed under the [GPL-3.0 License](https://github.com/race-tech/f1-api/blob/master/LICENSE).
## Notice
This project is unofficial and is not associated in any way with the Formula 1 companies. F1, FORMULA ONE, FORMULA 1, FIA FORMULA ONE WORLD CHAMPIONSHIP, GRAND PRIX and related marks are trade marks of Formula One Licensing B.V