Skip to content

Conversation

@harikcecaps4-max
Copy link
Contributor

Summary

This PR implements issue #18 by adding a FlightCategory enumeration to the SDK.

Changes

  • Created flight_category.py with the FlightCategory enum class
  • Added all flight category mappings (PASSENGER, CARGO, MILITARY_AND_GOVERNMENT, etc.)
  • Updated __init__.py to export FlightCategory

Details

The FlightCategory enum maps character literals used by the FR24 API to identify different types of aircraft and flight operations:

  • P: PASSENGER
  • C: CARGO
  • M: MILITARY_AND_GOVERNMENT
  • J: BUSINESS_JETS
  • T: GENERAL_AVIATION
  • H: HELICOPTERS
  • B: LIGHTER_THAN_AIR
  • G: GLIDERS
  • D: DRONES
  • V: GROUND_VEHICLES
  • O: OTHER
  • N: NON_CATEGORIZED

Fixes #18

Defines an enumeration for flight categories used in the Flightradar24 SDK.
@harikcecaps4-max harikcecaps4-max requested a review from a team as a code owner November 16, 2025 10:00
Copy link
Member

@DamianS21 DamianS21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Looks good.

Although to make it even better I suggest to add the new class to Position method resource e.g.

For example:
categories: Optional[list[Union[FlightCategory, str]]] = None
This is similar to how AltitudeRange is currently handled and would allow IDEs to provide better autocompletion for the available categories while maintaining backward compatibility with strings.

DamianS21 added a commit that referenced this pull request Nov 24, 2025
DamianS21 added a commit that referenced this pull request Nov 25, 2025
* Add FlightCategory enumeration for flight types

Defines an enumeration for flight categories used in the Flightradar24 SDK.

* Update __init__.py

* Supersedes #19

---------

Co-authored-by: harikcecaps4-max <harikcecaps4@gmail.com>
@DamianS21
Copy link
Member

Thank you again for the changes. It has been continued and merged in #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Enumerate the FlightRadar24 Flight Categories

2 participants