Skip to main content

Aviation weather report parsing library

Project description

AVWX

AVWX logo

PyPI PyPI - Python Version GitHub - Test Suite Status Hatch project Checked with mypy License: MIT


Documentation: https://engine.avwx.rest

Source Code: https://github.com/avwx-rest/avwx-engine

PyPI: https://pypi.org/project/avwx-engine/


AVWX is a global aviation weather fetching and parsing engine. It sources reports from a variety of government sources, parses individual elements, and calculates additional information like flight rules and time range interpolation.

AVWX currently supports:

  • Station data and search
  • METAR
  • TAF
  • PIREP
  • AIRMET / SIGMET
  • NOTAM
  • NBM (NBH, NBS, NBE)
  • GFS (MAV, MEX)

Install

The easiest way to get started is to download the library from pypi using pip:

python -m pip install avwx-engine

Basic Usage

Reports use ICAO, IATA, or GPS idents when specifying the desired station. Exceptions are thrown if a potentially invalid ident is given.

>>> import avwx
>>>
>>> metar = avwx.Metar('KJFK')
>>> metar.station.name
'John F Kennedy International Airport'
>>> metar.update()
True
>>> metar.data.flight_rules
'IFR'

You can learn more by reading the project documentation

Note: This library requires Python 3.10 or above

Development

Download and install the source code and its development dependencies:

  • Clone this repository
git clone https://github.com/avwx-rest/avwx-engine
cd avwx-engine
  • Requirements:

  • Create a virtual environment and install the dependencies

hatch env create
  • Activate the virtual environment
hatch shell

Formatting and Code Checks

hatch handles all of the formatting and linting for us. The library and test suite are fully typed and formatted. Make sure to run these checks before submitting PRs because the workflows will fail if errors are found.

Typing with mypy:

hatch run types:check

Code formatting and linting:

hatch fmt

Testing

Testing is managed by hatch which uses pytest and coverage under the hood.

hatch test

The end-to-end test files were generated using util/build_tests.py and placed into tests/{report}/data. Because Timestamp generation interprets the text based on the current date, Timestamp objects are nullified in the end-to-end tests.

Documentation

The documentation is automatically generated from the content of the docs directory and from the docstrings of the public signatures of the source code. The documentation is updated and published to engine.avwx.rest automatically as part each release.

You can also preview local changes during development:

hatch run docs:serve

Releasing

Trigger the Draft release workflow (press Run workflow). This will update the changelog & version and create a GitHub release which is in Draft state.

Find the draft release from the GitHub releases and publish it. When a release is published, it'll trigger release workflow which creates PyPI release and deploys updated documentation.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

avwx_engine-1.9.7.tar.gz (3.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

avwx_engine-1.9.7-py3-none-any.whl (3.8 MB view details)

Uploaded Python 3

File details

Details for the file avwx_engine-1.9.7.tar.gz.

File metadata

  • Download URL: avwx_engine-1.9.7.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for avwx_engine-1.9.7.tar.gz
Algorithm Hash digest
SHA256 6593fb674085cb1f40398ce87b07ad7fa7c63c6852862459c7ae71dab6e981fe
MD5 b797b8de2c89a6f285be4e4e6bd41f33
BLAKE2b-256 d75ee82574f673aad1f2e4ee0569e4f04de048cd56708702da0d611a85561421

See more details on using hashes here.

Provenance

The following attestation bundles were made for avwx_engine-1.9.7.tar.gz:

Publisher: release.yml on avwx-rest/avwx-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file avwx_engine-1.9.7-py3-none-any.whl.

File metadata

  • Download URL: avwx_engine-1.9.7-py3-none-any.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for avwx_engine-1.9.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0715adbbdef259cf5b2f5f43bb123bd3ee12d71f5b048c21f9ecdefafe19d398
MD5 74ffbe4bfd63957f497cf998a8d92806
BLAKE2b-256 f06ed7e0a185c8393035e162bcc6c381c17c449bc67e7c9f4135cc2c4f1a2ad0

See more details on using hashes here.

Provenance

The following attestation bundles were made for avwx_engine-1.9.7-py3-none-any.whl:

Publisher: release.yml on avwx-rest/avwx-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page