Skip to main content

biwipy

Documentation

biwipy is a Python library for cycling performance simulation and route analysis with wind-aware physics.

It combines GPX processing, GRIB weather interpolation, and cyclist physics to replay rides or simulate future scenarios.

The devlopement of biwipy was largely assisted by AI based on an previous conventionally designed wind model.

Features

  • Physics-based speed and power simulation (CdA, Cr, slope, mass, wind)
  • Route preprocessing and segment analysis from GPX files
  • WindScore and scenario comparison utilities
  • GRIB weather integration (GFS/IFS workflows)
  • Interactive map visualization for route and wind exploration

Project layout

biwipy/
├── biwipy/
│   ├── core/
│   ├── analysis/
│   ├── weather/
│   └── visualization/
├── docs/
├── pyproject.toml
└── README.md

Installation

Using Conda

The easiest way to install biwipy and dependencies is via Conda:

conda install-c conda-forge biwipy

From PyPI

pip install biwipy

pygrib is a required dependency of biwipy.

On Windows, you must install pygrib via conda-forge before using pip. This is because pygrib requires the ECCODES C library which conda provides automatically. Therefore, it is preferable to use the conda installation directly for biwipy.

If you encounter boot.def errors, set this environment variable:

conda env config vars set ECCODES_DEFINITION_PATH=$env:CONDA_PREFIX\Library\share\eccodes\definitions
conda deactivate
conda activate biwipy-env

From source

pip install .

Quick start

from datetime import timedelta, datetime, timezone
from zoneinfo import ZoneInfo
import os

from biwipy.core import Simulator
from biwipy.core.cyclist_params import CyclistBehavior
from biwipy.weather import WeatherProvider
from biwipy.weather.grib_finder import build_grib_list
from biwipy.analysis import RouteAnalyzer

# Load and process GPX file
analyzer = RouteAnalyzer()
gpx_result = analyzer.process_gpx("my_ride.gpx")

# Set ride start time and max duration example : (now + 24h)  4h  
start_ride = datetime.now(timezone.utc) + timedelta(hours=24)
duration_hours = 4

# Load weather data (GRIB files from current directory or will auto-download)
gribs_list = build_grib_list(".", start_ride, 1, duration_hours)
weather = WeatherProvider(gribs_list)

# Create cyclist profile and simulator
behavior = CyclistBehavior(uphill='realistic', downhill='realistic', corner='realistic')
sim = Simulator(weather.grib, behavior=behavior, CdA=0.50, Cr=0.005, m=85.0)

# Simulate the ride (v0 in m/s: 30 km/h = 30/3.6 m/s)
result = sim.simulate_future(gpx_result.segments, start_ride, v0=30/3.6)

# Display results
print(f"Average speed: {result.speed.avg:.2f} km/h")
print(f"Average power: {result.power.avg:.2f} W")
print(f"Windscore: {result.wind_score.grade}")

Documentation

Online documentation: https://jacme31.github.io/biwipy/

Build docs from repository root:

cd docs
make html

On Windows (PowerShell):

./build_docs.ps1

With options:

./build_docs.ps1 -Clean              # Clean and rebuild
./build_docs.ps1 -Open               # Build and open in browser
./build_docs.ps1 -Clean -Open        # Clean, rebuild, and open

Main docs entry point is generated at docs/build/html/index.html.

Development

Install development extras:

pip install -e ".[dev]"

To also build the documentation locally:

pip install -e ".[dev,docs]"

Build package artifacts:

python -m build
python -m twine check dist/*

License

This project is released under the MIT License. See LICENSE.

Metadata

Release files for biwipy 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biwipy 0.12.0
File Size Uploaded
biwipy-0.12.0.tar.gz 144.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for biwipy 0.12.0
File Interpreter ABI Platform
biwipy-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 281.0 kB

Release files / biwipy-0.12.0.tar.gz

Download URL biwipy-0.12.0.tar.gz
Size 144.5 kB
Tags Source
SHA-256 checksum
How to use checksums
75c179c2b480b6a541c39c28333903a574c1125f05dda524960b219bdc627410
BLAKE2b-256 checksum
How to use checksums
52ad9184b5d128cbf4c3972d06a5c0eec2b6baf6bbb8140d9d7ff6bfeef51c48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / biwipy-0.12.0-py3-none-any.whl

Download URL biwipy-0.12.0-py3-none-any.whl
Size 136.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
578fd9f326429ecd93c0c053351b5331d0700e1bd6ac101a20647471eb982fd1
BLAKE2b-256 checksum
How to use checksums
586d1984490ec8a34839c81465eb4938b261654b7d1b85e4225550e8f925f432
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files

0.11.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page