Code Monkey home page Code Monkey logo

fr24's Introduction

fr24

Download and parse data from flightradar24.com (gRPC and JSON).

Installation

Clone the repository and run in the directory:

pip install .

For a development version, you may want to use Poetry:

poetry install
poetry shell

Once installed, a few endpoints are available (use --help for more information):

  • Dump the current state vectors in a tidy parquet file:

    fr24 feed live
    fr24 feed playback --timestamp 1702839380
    fr24 feed playback --time 2023-12-17T18:56:00
  • TUI:

    fr24 tui
  • You may want to be authenticated to access more history: set the environment variables fr24_username and fr24_password, then check that you are properly authenticated with the following:

    fr24 auth show
  • You may also create a configuration file in the config directory: you may find its location with:

    fr24 dirs

    On Linux, copy the content of fr24.example.conf to $HOME/.config/fr24/fr24.conf.

Usage

Most code is developed in asynchronous mode: if you are not familiar with that programming style, wrap your code in an async function called async_main, and

  • run asyncio.run(main()) in a Python script;
  • run await main() in a Jupyter notebook.

You can find usage examples in the scripts/ folder.

Caching

To avoid repeated requests, a simple file-based cache saves parquet files under the cache directory ($HOME/.cache/fr24 on Linux).

License

Important

This code has been developed for educational purposes ONLY. Do not abuse it.

{
  "copyright": "Copyright (c) 2014-2023 Flightradar24 AB. All rights reserved.",
  "legalNotice": "The contents of this file and all derived data are the property of Flightradar24 AB for use exclusively by its products and applications. Using, modifying or redistributing the data without the prior written permission of Flightradar24 AB is not allowed and may result in prosecutions."
}

Notes

https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md

Generate stubs for pyarrow

stubgen -p pyarrow -o $PATH_TO_SITE_PACKAGES

fr24's People

Contributors

xoolive avatar cathaypacific8747 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.