Code Monkey home page Code Monkey logo

aeroapi-python's Introduction

Pytest

AeroApi Python

Python wrapper for the FlightAware's AeroAPI

Description

AeroAPI (formerly FlightXML) is FlightAware's live flight data API that provides powerful, reliable information about real-time and historical flight information. This Python wrapper allows for easier interaction with the AeroAPI from Python applications.

FlightAware AeroAPI Reference

AeroAPI

Installation

pip install aeroapi-python

Using test pypi, install with this command.

pip install --index-url https://pypi.org/simple/ --extra-index-url https://test.pypi.org/simple/ aeroapi-python

Usage

AeroAPI Class

The AeroAPI class is the main class for interacting with the FlightAware AeroAPI. It provides access to various resources such as airports, operators, flights, and more.

Initialization

To use the AeroAPI class, you need to create an instance of it by passing your API key as an argument to the constructor:

from AeroAPI import AeroAPI

api_key = 'your-api-key'
aeroapi = AeroAPI(api_key)

Airports

The Airports class provides methods for retrieving information about airports. You can access an instance of the Airports class through the airports attribute of the AeroAPI instance:

airports = aeroapi.airports

Methods

  • get_airport_info(airport_code: str) -> dict: Returns information about the specified airport.

    airport_info = airports.get_airport_info('KLAX')
  • search_airports(query: str) -> list: Searches for airports that match the specified query.

    airport_list = airports.search_airports('Los Angeles')
  • get_nearby_airports(latitude: float, longitude: float, radius: int) -> list: Returns a list of airports near the specified latitude and longitude within the specified radius.

    airport_list = airports.get_nearby_airports(33.9425, -118.408056, 10)

Example Usage

from AeroAPI import AeroAPI

api_key = 'your-api-key'
aeroapi = AeroAPI(api_key)

airports = aeroapi.airports
airport_info = airports.get_airport_info('KLAX')

print(airport_info)

License

MIT

Authors

aeroapi-python's People

Contributors

andrechang avatar derens99 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

andrechang

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.