FlightRadarAPI 1.3.26__tar.gz → 1.3.27__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,4 +5,5 @@ dist
5
5
  .idea/
6
6
  venv/
7
7
  node_modules/
8
- .env
8
+ .env
9
+ .cache
@@ -13,7 +13,7 @@ https://www.flightradar24.com/terms-and-conditions
13
13
  """
14
14
 
15
15
  __author__ = "Jean Loui Bernard Silva de Jesus"
16
- __version__ = "1.3.26"
16
+ __version__ = "1.3.27"
17
17
 
18
18
  from .api import FlightRadar24API, FlightTrackerConfig
19
19
  from .entities import Airport, Entity, Flight
@@ -0,0 +1,48 @@
1
+ Metadata-Version: 2.3
2
+ Name: FlightRadarAPI
3
+ Version: 1.3.27
4
+ Summary: SDK for FlightRadar24
5
+ Project-URL: Homepage, https://github.com/JeanExtreme002/FlightRadarAPI
6
+ Author-email: Jean Loui Bernard Silva de Jesus <jeanextreme002@gmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Keywords: aircraft,airlines,airports,api,aviation,flightradar24,flights,radar
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Requires-Python: >=3.7
18
+ Requires-Dist: brotli
19
+ Requires-Dist: requests
20
+ Provides-Extra: tests
21
+ Requires-Dist: pytest; extra == 'tests'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # FlightRadarAPI
25
+ Unofficial SDK for [FlightRadar24](https://www.flightradar24.com/) for Python 3 and NodeJS.
26
+
27
+ If you want to use the data collected using this SDK commercially, you need to subscribe to the [Business plan](https://www.flightradar24.com/premium/).</br>
28
+ See more information at: https://www.flightradar24.com/terms-and-conditions
29
+
30
+ [![Python Package](https://github.com/JeanExtreme002/FlightRadarAPI/workflows/Python%20Package/badge.svg)](https://github.com/JeanExtreme002/FlightRadarAPI/actions)
31
+ [![Pypi](https://img.shields.io/pypi/v/FlightRadarAPI?logo=pypi)](https://pypi.org/project/FlightRadarAPI/)
32
+ [![License](https://img.shields.io/pypi/l/FlightRadarAPI)](https://github.com/JeanExtreme002/FlightRadarAPI)
33
+ [![Python Version](https://img.shields.io/badge/python-3.7+-8A2BE2)](https://pypi.org/project/FlightRadarAPI/)
34
+ [![Npm](https://img.shields.io/npm/v/flightradarapi?logo=npm&color=red)](https://www.npmjs.com/package/flightradarapi)
35
+ [![Downloads](https://static.pepy.tech/personalized-badge/flightradarapi?period=total&units=international_system&left_color=grey&right_color=orange&left_text=downloads)](https://pypi.org/project/FlightRadarAPI/)
36
+ [![Frequency](https://img.shields.io/pypi/dm/flightradarapi?style=flat&label=frequency)](https://pypi.org/project/FlightRadarAPI/)
37
+ ## Installing FlightRadarAPI
38
+ **For Python with pip:**
39
+ ```
40
+ pip install FlightRadarAPI
41
+ ```
42
+ **For NodeJS with npm:**
43
+ ```
44
+ npm install flightradarapi
45
+ ```
46
+
47
+ ## Documentation
48
+ Explore the documentation of FlightRadarAPI package, for Python or NodeJS, through [this site](https://JeanExtreme002.github.io/FlightRadarAPI/).
@@ -0,0 +1,25 @@
1
+ # FlightRadarAPI
2
+ Unofficial SDK for [FlightRadar24](https://www.flightradar24.com/) for Python 3 and NodeJS.
3
+
4
+ If you want to use the data collected using this SDK commercially, you need to subscribe to the [Business plan](https://www.flightradar24.com/premium/).</br>
5
+ See more information at: https://www.flightradar24.com/terms-and-conditions
6
+
7
+ [![Python Package](https://github.com/JeanExtreme002/FlightRadarAPI/workflows/Python%20Package/badge.svg)](https://github.com/JeanExtreme002/FlightRadarAPI/actions)
8
+ [![Pypi](https://img.shields.io/pypi/v/FlightRadarAPI?logo=pypi)](https://pypi.org/project/FlightRadarAPI/)
9
+ [![License](https://img.shields.io/pypi/l/FlightRadarAPI)](https://github.com/JeanExtreme002/FlightRadarAPI)
10
+ [![Python Version](https://img.shields.io/badge/python-3.7+-8A2BE2)](https://pypi.org/project/FlightRadarAPI/)
11
+ [![Npm](https://img.shields.io/npm/v/flightradarapi?logo=npm&color=red)](https://www.npmjs.com/package/flightradarapi)
12
+ [![Downloads](https://static.pepy.tech/personalized-badge/flightradarapi?period=total&units=international_system&left_color=grey&right_color=orange&left_text=downloads)](https://pypi.org/project/FlightRadarAPI/)
13
+ [![Frequency](https://img.shields.io/pypi/dm/flightradarapi?style=flat&label=frequency)](https://pypi.org/project/FlightRadarAPI/)
14
+ ## Installing FlightRadarAPI
15
+ **For Python with pip:**
16
+ ```
17
+ pip install FlightRadarAPI
18
+ ```
19
+ **For NodeJS with npm:**
20
+ ```
21
+ npm install flightradarapi
22
+ ```
23
+
24
+ ## Documentation
25
+ Explore the documentation of FlightRadarAPI package, for Python or NodeJS, through [this site](https://JeanExtreme002.github.io/FlightRadarAPI/).
@@ -1,157 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: FlightRadarAPI
3
- Version: 1.3.26
4
- Summary: SDK for FlightRadar24
5
- Project-URL: Homepage, https://github.com/JeanExtreme002/FlightRadarAPI
6
- Author-email: Jean Loui Bernard Silva de Jesus <jeanextreme002@gmail.com>
7
- License-Expression: MIT
8
- License-File: LICENSE
9
- Keywords: aircraft,airlines,airports,api,aviation,flightradar24,flights,radar
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3 :: Only
12
- Classifier: Programming Language :: Python :: 3.7
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Programming Language :: Python :: 3.9
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Requires-Python: >=3.7
18
- Requires-Dist: brotli
19
- Requires-Dist: requests
20
- Provides-Extra: tests
21
- Requires-Dist: pytest; extra == 'tests'
22
- Description-Content-Type: text/markdown
23
-
24
- # FlightRadarAPI
25
- Unofficial SDK for [FlightRadar24](https://www.flightradar24.com/) written in Python 3.
26
-
27
- If you want to use the data collected using this SDK commercially, you need to subscribe to the [Business plan](https://www.flightradar24.com/premium/).</br>
28
- See more information at: https://www.flightradar24.com/terms-and-conditions
29
-
30
- [![Python Package](https://github.com/JeanExtreme002/FlightRadarAPI/workflows/Python%20Package/badge.svg)](https://github.com/JeanExtreme002/FlightRadarAPI/actions)
31
- [![Pypi](https://img.shields.io/pypi/v/FlightRadarAPI?logo=pypi)](https://pypi.org/project/FlightRadarAPI/)
32
- [![License](https://img.shields.io/pypi/l/FlightRadarAPI)](https://github.com/JeanExtreme002/FlightRadarAPI)
33
- [![Python Version](https://img.shields.io/badge/python-3.7+-8A2BE2)](https://pypi.org/project/FlightRadarAPI/)
34
- [![Npm](https://img.shields.io/npm/v/flightradarapi?logo=npm&color=red)](https://www.npmjs.com/package/flightradarapi)
35
- [![downloads](https://static.pepy.tech/personalized-badge/flightradarapi?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pypi.org/project/FlightRadarAPI/)
36
- [![Frequency](https://img.shields.io/pypi/dm/flightradarapi?style=flat&label=frequency)](https://pypi.org/project/FlightRadarAPI/)
37
-
38
- ## Installing FlightRadarAPI:
39
- ```
40
- pip install FlightRadarAPI
41
- ```
42
-
43
- ## Basic Usage:
44
- Import the class `FlightRadar24API` and create an instance of it.
45
- ```py
46
- from FlightRadar24 import FlightRadar24API
47
- fr_api = FlightRadar24API()
48
- ```
49
-
50
- **Getting flights list:**
51
- ```py
52
- flights = fr_api.get_flights(...) # Returns a list of Flight objects
53
- ```
54
-
55
- **Getting airports list:**
56
- ```py
57
- airports = fr_api.get_airports(...) # Returns a list of Airport objects
58
- ```
59
-
60
- **Getting airlines list:**
61
- ```py
62
- airlines = fr_api.get_airlines()
63
- ```
64
-
65
- **Getting zones list:**
66
- ```py
67
- zones = fr_api.get_zones()
68
- ```
69
-
70
- ### Getting flight and airport details
71
- You can also get more information about a specific flight such as: estimated time, trail, aircraft details, etc.
72
- ```py
73
- flight_details = fr_api.get_flight_details(flight)
74
- flight.set_flight_details(flight_details)
75
-
76
- print("Flying to", flight.destination_airport_name)
77
- ```
78
-
79
- Or get more information about a specific airport such as: runways, weather, arrived flights, etc.
80
- ```py
81
- airport_details = fr_api.get_airport_details(icao)
82
- ```
83
- Arrivals and departures can have a limit `flight_limit` (max value is 100) to display. When you need to reach more than 100 flights you can use additional parameter `page` to view other pages.
84
-
85
-
86
- ## Get flights above your position:
87
- The `get_bounds_by_point(...)` method has parameters `latitude` and `longitude` for your position and `radius` for the distance in meters from your position to designate a tracking area.
88
- ```py
89
- # Your point is 52°34'04.7"N 13°16'57.5"E from Google Maps and radius 2km
90
- bounds = fr_api.get_bounds_by_point(52.567967, 13.282644, 2000)
91
-
92
- flights = fr_api.get_flights(bounds = bounds)
93
- ```
94
-
95
- ## Filtering flights and airports:
96
- The `get_flights(...)` method has some parameters to search for flights by: area line, bounds (customized coordinates
97
- or obtained by the `get_zones()` method), aircraft registration or aircraft type. See the example below:
98
- ```py
99
- airline_icao = "UAE"
100
- aircraft_type = "B77W"
101
-
102
- # You may also set a custom region, such as: bounds = "73,-12,-156,38"
103
- zone = fr_api.get_zones()["northamerica"]
104
- bounds = fr_api.get_bounds(zone)
105
-
106
- emirates_flights = fr_api.get_flights(
107
- aircraft_type = aircraft_type
108
- airline = airline_icao,
109
- bounds = bounds
110
- )
111
- ```
112
- There are more configurations that you may set by using the `set_flight_tracker_config(...)` method. See the method documentation
113
- for more information.
114
-
115
- **Getting airport by ICAO or IATA:**
116
- ```py
117
- lukla_airport = fr_api.get_airport(code = "VNLK", details = True)
118
- ```
119
-
120
- ## Getting the distance between flights and airports:
121
- The `Flight` and `Airport` classes inherit from `Entity`, which contains the `get_distance_from(...)` method. That method
122
- returns the distance between the self instance and another entity in kilometers. Example:
123
- ```py
124
- airport = fr_api.get_airport("KJFK")
125
- distance = flight.get_distance_from(airport)
126
-
127
- print(f"The flight is {distance} km away from the airport.")
128
- ```
129
-
130
- ## Downloading Flight Data
131
- *Note*: This requires a premium subscription and for you to be logged in.
132
-
133
- ```py
134
- history_data = fr_api.get_history_data(flight, file_type="csv", time=1706529600)
135
-
136
- with open("history_data.csv", "w") as file:
137
- file.write(history_data)
138
- ```
139
-
140
- `flight_id` - The ID of the flight. Can be gotten from any other function that returns flight details.
141
- `file_type` - Either CSV or KML.
142
- `time` - The STD/scheduled time of deperature in UTC of the flight as a Unix timestamp. Putting an invalid time will return a blank document.
143
-
144
- ## Setting and getting Real-time Flight Tracker parameters:
145
- Set it by using the `set_flight_tracker_config(...)` method. It receives a `FlightTrackerConfig` dataclass instance, but
146
- you can also use keyword arguments directly to the method.
147
-
148
- Get the current configuration with the `get_flight_tracker_config()` method, that returns a `FlightTrackerConfig`
149
- instance. Note: creating a new `FlightTrackerConfig` instance means resetting all parameters to default.
150
- ```py
151
- flight_tracker = fr_api.get_flight_tracker_config()
152
- flight_tracker.limit = 10
153
-
154
- fr_api.set_flight_tracker_config(flight_tracker, ...)
155
-
156
- flights = fr_api.get_flights(...) # Returns only 10 flights
157
- ```
@@ -1,134 +0,0 @@
1
- # FlightRadarAPI
2
- Unofficial SDK for [FlightRadar24](https://www.flightradar24.com/) written in Python 3.
3
-
4
- If you want to use the data collected using this SDK commercially, you need to subscribe to the [Business plan](https://www.flightradar24.com/premium/).</br>
5
- See more information at: https://www.flightradar24.com/terms-and-conditions
6
-
7
- [![Python Package](https://github.com/JeanExtreme002/FlightRadarAPI/workflows/Python%20Package/badge.svg)](https://github.com/JeanExtreme002/FlightRadarAPI/actions)
8
- [![Pypi](https://img.shields.io/pypi/v/FlightRadarAPI?logo=pypi)](https://pypi.org/project/FlightRadarAPI/)
9
- [![License](https://img.shields.io/pypi/l/FlightRadarAPI)](https://github.com/JeanExtreme002/FlightRadarAPI)
10
- [![Python Version](https://img.shields.io/badge/python-3.7+-8A2BE2)](https://pypi.org/project/FlightRadarAPI/)
11
- [![Npm](https://img.shields.io/npm/v/flightradarapi?logo=npm&color=red)](https://www.npmjs.com/package/flightradarapi)
12
- [![downloads](https://static.pepy.tech/personalized-badge/flightradarapi?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads)](https://pypi.org/project/FlightRadarAPI/)
13
- [![Frequency](https://img.shields.io/pypi/dm/flightradarapi?style=flat&label=frequency)](https://pypi.org/project/FlightRadarAPI/)
14
-
15
- ## Installing FlightRadarAPI:
16
- ```
17
- pip install FlightRadarAPI
18
- ```
19
-
20
- ## Basic Usage:
21
- Import the class `FlightRadar24API` and create an instance of it.
22
- ```py
23
- from FlightRadar24 import FlightRadar24API
24
- fr_api = FlightRadar24API()
25
- ```
26
-
27
- **Getting flights list:**
28
- ```py
29
- flights = fr_api.get_flights(...) # Returns a list of Flight objects
30
- ```
31
-
32
- **Getting airports list:**
33
- ```py
34
- airports = fr_api.get_airports(...) # Returns a list of Airport objects
35
- ```
36
-
37
- **Getting airlines list:**
38
- ```py
39
- airlines = fr_api.get_airlines()
40
- ```
41
-
42
- **Getting zones list:**
43
- ```py
44
- zones = fr_api.get_zones()
45
- ```
46
-
47
- ### Getting flight and airport details
48
- You can also get more information about a specific flight such as: estimated time, trail, aircraft details, etc.
49
- ```py
50
- flight_details = fr_api.get_flight_details(flight)
51
- flight.set_flight_details(flight_details)
52
-
53
- print("Flying to", flight.destination_airport_name)
54
- ```
55
-
56
- Or get more information about a specific airport such as: runways, weather, arrived flights, etc.
57
- ```py
58
- airport_details = fr_api.get_airport_details(icao)
59
- ```
60
- Arrivals and departures can have a limit `flight_limit` (max value is 100) to display. When you need to reach more than 100 flights you can use additional parameter `page` to view other pages.
61
-
62
-
63
- ## Get flights above your position:
64
- The `get_bounds_by_point(...)` method has parameters `latitude` and `longitude` for your position and `radius` for the distance in meters from your position to designate a tracking area.
65
- ```py
66
- # Your point is 52°34'04.7"N 13°16'57.5"E from Google Maps and radius 2km
67
- bounds = fr_api.get_bounds_by_point(52.567967, 13.282644, 2000)
68
-
69
- flights = fr_api.get_flights(bounds = bounds)
70
- ```
71
-
72
- ## Filtering flights and airports:
73
- The `get_flights(...)` method has some parameters to search for flights by: area line, bounds (customized coordinates
74
- or obtained by the `get_zones()` method), aircraft registration or aircraft type. See the example below:
75
- ```py
76
- airline_icao = "UAE"
77
- aircraft_type = "B77W"
78
-
79
- # You may also set a custom region, such as: bounds = "73,-12,-156,38"
80
- zone = fr_api.get_zones()["northamerica"]
81
- bounds = fr_api.get_bounds(zone)
82
-
83
- emirates_flights = fr_api.get_flights(
84
- aircraft_type = aircraft_type
85
- airline = airline_icao,
86
- bounds = bounds
87
- )
88
- ```
89
- There are more configurations that you may set by using the `set_flight_tracker_config(...)` method. See the method documentation
90
- for more information.
91
-
92
- **Getting airport by ICAO or IATA:**
93
- ```py
94
- lukla_airport = fr_api.get_airport(code = "VNLK", details = True)
95
- ```
96
-
97
- ## Getting the distance between flights and airports:
98
- The `Flight` and `Airport` classes inherit from `Entity`, which contains the `get_distance_from(...)` method. That method
99
- returns the distance between the self instance and another entity in kilometers. Example:
100
- ```py
101
- airport = fr_api.get_airport("KJFK")
102
- distance = flight.get_distance_from(airport)
103
-
104
- print(f"The flight is {distance} km away from the airport.")
105
- ```
106
-
107
- ## Downloading Flight Data
108
- *Note*: This requires a premium subscription and for you to be logged in.
109
-
110
- ```py
111
- history_data = fr_api.get_history_data(flight, file_type="csv", time=1706529600)
112
-
113
- with open("history_data.csv", "w") as file:
114
- file.write(history_data)
115
- ```
116
-
117
- `flight_id` - The ID of the flight. Can be gotten from any other function that returns flight details.
118
- `file_type` - Either CSV or KML.
119
- `time` - The STD/scheduled time of deperature in UTC of the flight as a Unix timestamp. Putting an invalid time will return a blank document.
120
-
121
- ## Setting and getting Real-time Flight Tracker parameters:
122
- Set it by using the `set_flight_tracker_config(...)` method. It receives a `FlightTrackerConfig` dataclass instance, but
123
- you can also use keyword arguments directly to the method.
124
-
125
- Get the current configuration with the `get_flight_tracker_config()` method, that returns a `FlightTrackerConfig`
126
- instance. Note: creating a new `FlightTrackerConfig` instance means resetting all parameters to default.
127
- ```py
128
- flight_tracker = fr_api.get_flight_tracker_config()
129
- flight_tracker.limit = 10
130
-
131
- fr_api.set_flight_tracker_config(flight_tracker, ...)
132
-
133
- flights = fr_api.get_flights(...) # Returns only 10 flights
134
- ```
File without changes
File without changes