https://github.com/anviaan/mc-telemetry
https://github.com/anviaan/mc-telemetry
flask flask-api flask-sqlalchemy python python-3 sqlite telemetry telemetry-server
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anviaan/mc-telemetry
- Owner: anviaan
- License: gpl-3.0
- Created: 2024-12-28T12:30:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-30T03:35:27.000Z (about 1 year ago)
- Last Synced: 2025-04-19T20:53:04.847Z (about 1 year ago)
- Topics: flask, flask-api, flask-sqlalchemy, python, python-3, sqlite, telemetry, telemetry-server
- Language: Python
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telemetry API
## Description
This project is a Flask-based API for managing telemetry data of game mods. It allows you to create mods, receive
telemetry data, and retrieve statistics about mod and game version usage.
## Installation
1. Clone the repository:
```sh
git clone
cd
```
2. Create a virtual environment and activate it:
```sh
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
3. Install the required packages:
```sh
pip install -r requirements.txt
```
4. Create a `.env` file and set the `PASSWORD` environment variable:
```sh
echo "PASSWORD=your_password" > .env
```
5. Run the application:
```sh
python app.py
```
## Usage
The API provides the following endpoints:
### Check API Status
- **URL:** `/telemetry/health`
- **Method:** `GET`
### Get All Mods
- **URL:** `/telemetry/mods`
- **Method:** `GET`
### Create a Mod
- **URL:** `/telemetry/mods`
- **Method:** `POST`
- **Body:**
```json
{
"password": "your_password",
"mod_id": "mod123",
"mod_name": "Example Mod"
}
```
- **Response:**
```json
{
"message": "Mod created successfully"
}
```
### Receive Telemetry Data
- **URL:** `/telemetry/data`
- **Method:** `POST`
- **Body:**
```json
{
"mod_id": "mod123",
"game_version": "1.0",
"mod_version": "1.0",
"loader": "Forge"
}
```
- **Response:**
```json
{
"message": "Data saved successfully"
}
```
### Export Telemetry Data to CSV
- **URL:** `/telemetry/export/csv`
- **Method:** `GET`
- **Query Parameters:** `password`
- **Response:** CSV file download
## License
This project is licensed under the GPL-3.0 License. See the [LICENSE](LICENSE) file for more information.