Compare commits

..

1 commit

Author SHA1 Message Date
c952a45aec WIP: linter setup 2025-08-30 12:19:36 -04:00

View file

@ -1,43 +1,61 @@
# trmnl weather & pollen report
# TRMNL Weather & Pollen Report
a custom trmnl plugin that fetches and displays weather and pollen data.
A custom TRMNL plugin that fetches and displays weather and pollen data.
## setup
## Setup
1. set up a virtual environment and install dependencies:
1. Set up a virtual environment and install dependencies:
```bash
python -m venv .venv
source .venv/bin/activate
uv sync
```
2. set required environment variables:
2. Set required environment variables:
```bash
export WEATHER_API_KEY="your_openweathermap_api_key"
export AUTH_TOKEN="your_chosen_auth_token"
```
3. run the application:
3. Run the application:
```bash
fastapi run main.py --port 8887
```
## development
## Development
### install development dependencies
### Install Development Dependencies
```bash
make dev-install
```
## docker
### Code Quality
build and run with docker:
This project uses [Ruff](https://docs.astral.sh/ruff/) for linting and formatting.
**Available commands:**
```bash
make lint
make format
make lint-fix
make check
make clean
```
## Docker
Build and run with Docker:
```bash
docker build -t trmnl-report .
docker run -p 8887:8887 -e WEATHER_API_KEY=your_key -e AUTH_TOKEN=your_token trmnl-report
```
## api
## API
access the api at `http://localhost:8887/?token=your_auth_token`
Access the API at `http://localhost:8887/?token=your_auth_token`