1 Star 0 Fork 0

LiShixi / avwx-engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

AVWX

AVWX logo

CircleCI PyPI version Requirements Status License

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
  • 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 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.7 or above

Develop

Download and install the source code and its development dependencies:

git clone https://github.com/avwx-rest/avwx-engine
cd avwx-engine
python -m pip install -Ur requirements.txt
python -m pip install -e .

Code formatting should be handled by hooks in pre-commit. Before committing any code, be should to install pre-commit into the local git project:

pre-commit install

Test

The easiest way to test the package is using the nox library, which is installed as a dev dependency. It will manage all tests, sessions, supported versions (when available), and cleanup. The tests will pick up the local version of avwx.

nox

If you want to run the tests directly, the test suite was built while using the pytest library, which is also installed as a dev dependency.

pytest

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

Docs

AVWX uses mkdocs to build its documentation. It's just another install:

python -m pip install .[docs]

To serve the docs during development:

cd docs
mkdocs serve
The MIT License (MIT) Copyright (c) 2015 Michael duPont Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/loyy77/avwx-engine.git
git@gitee.com:loyy77/avwx-engine.git
loyy77
avwx-engine
avwx-engine
master

搜索帮助