Skip to content

igc-net/igc-net-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

igc-net (Python)

Python bindings for the igc-net flight log exchange protocol, wrapping the Rust reference implementation via PyO3.

Installation

Install from PyPI:

pip install igc-net

Project links:

If no matching wheel is available for your platform, pip will build the extension from source. That requires a local Rust toolchain.

For unreleased local development, use a checkout and maturin develop; see Development below.

Quick start

from igc_net import IgcNode, FlightMetadata
from pathlib import Path

# Inspect an IGC file (offline, no network needed)
meta = FlightMetadata.from_igc(Path("flight.igc").read_bytes())
print(meta.pilot_name, meta.duration_s)

# Publish to the network
with IgcNode(str(Path.home() / ".igc-net")) as node:
    result = node.publish(Path("flight.igc").read_bytes(), filename="flight.igc")
    print(result.igc_hash)

CLI

igc-net announce flight.igc       # Publish an IGC file
igc-net runindex --policy eager   # Run an indexer node
igc-net fetch <igc_hash>          # Retrieve by hash
igc-net inspect flight.igc        # Analyze offline
igc-net list                      # Show local index

Development

Requires Rust toolchain and Python 3.12+.

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
make test

Useful targets:

make help
make fmt
make vet
make itest
make compliance

Cross-language compliance tests require the Rust CLI binary and do not assume a local sibling checkout. Install it separately and point the tests at it:

cargo install igc-net-cli
IGCNET_RS_BIN="$HOME/.cargo/bin/igc-net" make compliance

About

igc-net library wrapper in Python with CLI

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors