GithubHelp home page GithubHelp logo

shortfinalapp / avwx-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avwx-rest/avwx-api

0.0 0.0 0.0 2.39 MB

REST API for parsing aviation weather data

Home Page: https://avwx.rest

License: MIT License

Python 26.09% CSS 0.26% HTML 4.45% API Blueprint 69.03% Dockerfile 0.17%

avwx-api's Introduction

AVWX-API

Requirements Status License: MIT

About

The AVWX REST API is built as a Python Quart app which is a Flask-compatible async web backend. It sources METAR and TAF reports from NOAA ADDS and other localized weather sources (where available) via the AVWX-Engine library which I also maintain.

The core benefit of AVWX over other sources is its parsing engine. It provides a more accurate interpretation of the raw report string than aging government sources and includes value-added features like calculating flight-rules, translating report elements into English, and providing text-to-speech representations of the report and its elements.

For more information, go to the hosted version at avwx.rest.

Quickstart

The easiest way to get the app running is to create and run it in Docker.

It should be able to run as is, but it won't have the database-backed features enabled like token authentication, report caching, and metric counting. These features are geared for the production environment, so they won't be an issue for local development. If you want to add them, you'll need a MongoDB connection URI in the environment:

export MONGO_URI="mongodb://db:[email protected]:12345"

Now you should be able to build and run the Docker container:

docker build -t avwx_api .
docker run -p 8000:8000 avwx_api

It should now be available at http://localhost:8000

Setup

First we should install the app requirements and copy the env file. I recommend always installing into a virtual environment. Dotenv is not in the requirements file because it is only used in development.

pip install -r requirements.txt
pip install python-dotenv
cp sample.env .env

For an explanation of the variables in .env, see the quickstart. Feel free to comment or replace these as you see fit.

Before we can run the app, we need to tell Quart where the app is.

export QUART_APP=avwx_api:app
export QUART_ENV=development

Running

Once the app is configured, use the Quart CLI to run it. It will be in development/debug mode.

quart run -p 8000

It should now be available at http://localhost:8000

Develop

Code checked into this repository is expected to be run through the black code formatter first.

# Install black
pip install black

# Format py package files
find avwx_api -iname "*.py" | xargs black

avwx-api's People

Contributors

devdupont avatar janc avatar technicallygio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.