FlightRadar客户端库。

flightradar-client的Python项目详细描述


python flightradar客户端

Build StatusCoverage Status

此库提供对本地Flightradar24源的方便访问。

安装

pip install flightradar-client

用法

这个库目前支持两种不同风格的飞行数据, 由fr24feeddump1090-mutability服务提供 在构建自己的系统时自动安装 Pi24 ADS-B receiver

对于每种口味,图书馆提供两种访问模式。*Feed类 调用update时获取一次数据并将其转换为FeedEntry。 物体。*FeedAggregator类保留了一点历史,并且 随后的update调用它试图填补任何空白(坐标和callsign 目前)在最新获取的数据集中丢失。

飞行雷达馈送

flightradar feed模式使用由fr24feed提供的json数据。 服务(通常在http://localhost:8754/flights.json下)。

FlightradarFlightsFeedFlightradarFlightsFeedAggregator支持 相同的参数:

NameTypeDescription
^{}required, tuple of latitude and longitudeUsed to calculate the distance to each aircraft.
^{}optional, float value in kilometres, default: don't filter by distanceOnly aircrafts within this radius around the home coordinates are included in the result set.
^{}optional, full url to access the Pi24 ADS-B receiver JSON, default: construct with hostname and portDefine if you have customised access to Pi24 ADS-B receiver or use HTTPS for example.
^{}optional, hostname of the Pi24 ADS-B receiver, default: ^{}Define if you are not running this library on your Pi24 ADS-B receiver.
^{}optional, port of the Pi24 ADS-B receiver's flights service, default: ^{}Define if you have configured a different port on your Pi24 ADS-B receiver.

进给

importasyncioimportaiohttpfromflightradar_client.fr24feed_flightsimportFlightradarFlightsFeedsession=aiohttp.ClientSession()# Home Coordinates: Latitude: -33.5, Longitude: 151.5feed=FlightradarFlightsFeed((-33.5,151.5),session)LOOP=asyncio.get_event_loop()status,entries=LOOP.run_until_complete(feed.update())

提要聚合器
importasyncioimportaiohttpfromflightradar_client.fr24feed_flightsimportFlightradarFlightsFeedAggregatorsession=aiohttp.ClientSession()# Home Coordinates: Latitude: -33.5, Longitude: 151.5feed_aggregator=FlightradarFlightsFeedAggregator((-33.5,151.5),session)LOOP=asyncio.get_event_loop()status,entries=LOOP.run_until_complete(feed_aggregator.update())

转储1090馈送

dump1090提要模式使用由dump1090-mutability提供的json数据。 服务(通常在http://localhost:8888/data/aircraft.json下)。

Dump1090AircraftsFeedDump1090AircraftsFeedAggregator支持 相同的参数:

NameTypeDescription
^{}required, tuple of latitude and longitudeUsed to calculate the distance to each aircraft.
^{}optional, float value in kilometres, default: don't filter by distanceOnly aircrafts within this radius around the home coordinates are included in the result set.
^{}optional, full url to access the Pi24 ADS-B receiver JSON, default: construct with hostname and portDefine if you have customised access to Pi24 ADS-B receiver or use HTTPS for example.
^{}optional, hostname of the Pi24 ADS-B receiver, default: ^{}Define if you are not running this library on your Pi24 ADS-B receiver.
^{}optional, port of the Pi24 ADS-B receiver's dump1090 service, default: ^{}Define if you have configured a different port on your Pi24 ADS-B receiver.

进给

importasyncioimportaiohttpfromflightradar_client.dump1090_aircraftsimportDump1090AircraftsFeedsession=aiohttp.ClientSession()# Home Coordinates: Latitude: -33.5, Longitude: 151.5feed=Dump1090AircraftsFeed((-33.5,151.5),session)LOOP=asyncio.get_event_loop()status,entries=LOOP.run_until_complete(feed.update())

提要聚合器
importasyncioimportaiohttpfromflightradar_client.dump1090_aircraftsimportDump1090AircraftsFeedAggregatorsession=aiohttp.ClientSession()# Home Coordinates: Latitude: -33.5, Longitude: 151.5feed_aggregator=Dump1090AircraftsFeedAggregator((-33.5,151.5),session)LOOP=asyncio.get_event_loop()status,entries=LOOP.run_until_complete(feed_aggregator.update())

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java检查服务器端广告查看(php)   Java将注释的使用限制在某些类型的方法上?   java使用gson重用顶级模型   当Java Spring作为Docker容器运行时,它不会与Concur对话   通过Java在不使用新URL()的情况下加载文件   Dicom4che调用的java结果不显示umlaut字符   java Updatea使用php/codeigniter使用ajax/javascript映射标记   Java8中的javaspringboot@ExceptionHandler未被访问   java如何读取长度未知的用户输入?   EclipseJava在MacBook和OSX上的性能非常差,而在Windows下在同一个单元上的性能就不那么差了,为什么?   java在Lucene查询语法中与+有什么区别   使用Spark和Cassandra Java驱动程序时检测到番石榴问题#1635   java工具栏标题未显示在选项卡式活动中