Skip to main content

Flydenity

PyPI version made-with-python PyPI license PyPI pyversions PyPI download month

Flydenity - Aircraft Identification Library

Flydenity is a callsign identification library to help match tail numbers or callsigns to origin nations. The library is a python wrapper on top of a curated dataset containing a set of regular expressions generated from the International Telecommunications Union (ITU) International Call Sign prefixes. The registration codes in this dataset are separated by country post The Paris Convention in 1929. The database also contains a description of each codeset with 2 and 3 letter ISO country codes following the ISO-3166 standard.

Installation

Flydenity is on PyPi, simply install it with PIP

pip3 install flydenity

Running the library

To run, you can simply include it in your python library using the following

>>> from flydenity import Parser
>>> parser = Parser()
>>> parser.parse("AF1234")
{'nation': 'United States', 'description': 'general', 'iso2': 'US', 'iso3': 'USA'}

You can also run it from the command line (multiple arguments allowed)

$ python -m flydenity AF1234 D-1234
{'AF1234': {'nation': 'United States', 'description': 'general', 'iso2': 'US', 'iso3': 'USA'},
 'D-1234': {'nation': 'Germany', 'description': 'gliders', 'iso2': 'DE', 'iso3': 'DEU'}}

Stats

In total, the dataset contains a total of 408 unique regular expressions to describe aircraft tail numbers across 217 unique countries.

Using the Data

Of course, everyone has a programming language of choice. Mine for this effort was Python. I've including a wrapper class classed "ARP" which you can use to parse through the expressions.

Maritime

Since the ITU International Call Sign prefexies are universal across Aircraft and Maritime Call Signs, we include functions within out API to parse Maritime Call Signs as well.

Testing

To evaluate how well the regular expressions work, we extracted unique tail numbers from a years worth of air traffic from FlightRadar24.com In total, we evaluated over 250k unique tail numbers against the regular expressions to minimize duplicate tags. In total, the parser was around 98% accurate in matching tail numbers to a specific country. Of course this could be improved, but that's why this library is open-source :)

Registration Numbers

All data was collected using open sources across the web, specifically using the links below.

Country Codes Extracted From

Datasets

I constructed two datasets (as of right now) for this effort.

  1. processed_itu_countries_regex.csv
  2. processed_itu_organizations_regex.csv

Countries, Regions or Territories with No Standard

Compared to country list at https://countrycode.org/, there are a total of that are not included

Some of these countries or regions could have a standard that is not within this database. Please update the list if you make changes.

  • Aland Islands (AX)
  • American Samoa (AS)
  • Antarctica(AQ)
  • Bouvet Island (BV)
  • British Indian Ocean Territory (IO)
  • Christmas Island (CX)
  • Cocos (Keeling) Islands (CC)
  • Curacao (CW)
  • French Guiana (GF)
  • French Southern Territories (TF)
  • Guadeloupe (GP)
  • Guam (GU)
  • Heard and Mcdonald Islands (HM)
  • Jersey (JE)
  • Martinique (MQ)
  • Mayotte (YT)
  • New Caledonia (NC)
  • Niue (NU)
  • Norfolk Island (NF)
  • Northern Mariana Islands (MP)
  • Pitcairn (PN)
  • Puerto Rico (PR)
  • Saint-Barthélemy (BL)
  • Saint Martin (MF)
  • Saint Pierre and Miquelon (PM)
  • South Georgia and the South Sandwich Islands (GS)
  • Svalbard and Jan Mayen Islands (SJ)
  • Tokelau (TK)
  • U.S. Outlying Islands (UM)
  • U.S. Virgin Islands (VI)
  • Wallis and Futuna (WF)
  • Western Sahara (EH)

Contact

Collen Roller collen.roller@gmail dot com

Metadata

Release files for flydenity 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flydenity 0.1.6
File Size Uploaded Provenance Actions
flydenity-0.1.6.tar.gz 34.8 kB Without provenance Details for flydenity-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flydenity 0.1.6
File Interpreter ABI Platform Actions
flydenity-0.1.6-py3-none-any.whl Python 3 none any Details for flydenity-0.1.6-py3-none-any.whl

Total release size: 69.4 kB

Release files / flydenity-0.1.6.tar.gz

Download URL flydenity-0.1.6.tar.gz
Size 34.8 kB
Tags Source
SHA-256 checksum
How to use checksums
888c1adb0330b7494356b90a0feb4bb59da223adcc5809a97e7ab9fb2b990591
BLAKE2b-256 checksum
How to use checksums
449459d93d59688e8fb86e83595c1aed5295b7bb8c259c7b0880e33043414bbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4

Release files / flydenity-0.1.6-py3-none-any.whl

Download URL flydenity-0.1.6-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fde50d87bf1c11ef8de8388b4251235854377f4d9c8ea5ebb9e13cd60d740400
BLAKE2b-256 checksum
How to use checksums
37843ef92790b84987df3d7c3ea74f2bf686cbdf146adff7c62cd754f201b9a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4

Security for flydenity 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page