Plan

Table of permitted plan return types

Plan format

Key

Native dataclass format

native

JSON formatted plan

json

XML formatted plan

xml

CSV formatted plan

csv

PDF formatted plan

pdf

Google Earth KML formatted plan

kml

X-Plane FMS (8, 9 & 10) formatted plan

xplane

X-Plane 11 formatted plan

xplane11

FS2004/FS9 formatted plan

fs9

FSX XML formatted plan

fsx

Squawkbox formatted plan

squawkbox

X-FMC formatted plan

xfmc

PMDG rte formatted plan

pmdg

Airbus X formatted plan

airbusx

QualityWings formatted plan

qualitywings

iFly 747 (.route) formatted plan

ifly747

FlightGear formatted plan (version 2 XML)

flightgear

TFDi Design 717 (version 1 XML)

tfdi717

Infinite Flight

infiniteflight

Flightplan-related commands.

async flightplandb.plan.fetch(id_: int, return_format: Literal['native'] = 'native', key: str | None = None) Plan
async flightplandb.plan.fetch(id_: int, return_format: Literal['pdf'], key: str | None = None) bytes
async flightplandb.plan.fetch(id_: int, return_format: Literal['json', 'xml', 'csv', 'kml', 'xplane', 'xplane11', 'fs9', 'fsx', 'squawkbox', 'xfmc', 'pmdg', 'airbusx', 'qualitywings', 'ifly747', 'flightgear', 'tfdi717', 'infiniteflight'], key: str | None = None) str

Fetches a flight plan and its associated attributes by ID. Returns it in specified format.

Parameters:
  • id_ (int) -- The ID of the flight plan to fetch

  • return_format (str) -- The API response format, defaults to "native". Must be one of the keys in the Table of permitted plan return types.

  • key (str, optional) -- API authentication key.

Returns:

Plan of the specified plan if "native" is specified as the return_format (default).

bytes if PDF was specified as the return_format.

str if a different return_format was specified.

Return type:

Union[Plan, Dict, bytes, str]

Raises:

NotFoundException -- No plan with the specified id was found.

async flightplandb.plan.create(plan: Plan, return_format: Literal['native'] = 'native', key: str | None = None) Plan
async flightplandb.plan.create(plan: Plan, return_format: Literal['pdf'], key: str | None = None) bytes
async flightplandb.plan.create(plan: Plan, return_format: Literal['json', 'xml', 'csv', 'kml', 'xplane', 'xplane11', 'fs9', 'fsx', 'squawkbox', 'xfmc', 'pmdg', 'airbusx', 'qualitywings', 'ifly747', 'flightgear', 'tfdi717', 'infiniteflight'], key: str | None = None) str

Creates a new flight plan.

Requires authentication.

Parameters:
  • plan (Plan) -- The Plan object to register on the website

  • return_format (str) -- The API response format, defaults to "native". Must be one of the keys in the Table of permitted plan return types.

  • key (str, optional) -- API authentication key.

Returns:

Plan of the registered plan created on Flight Plan Database if "native" is specified as the return_format (default).

bytes if PDF was specified as the return_format.

str if a different return_format was specified.

Return type:

Union[Plan, Dict, bytes, str]

Raises:

BadRequestException -- The plan submitted had incorrect arguments or was otherwise unusable.

async flightplandb.plan.edit(plan: Plan, return_format: Literal['native'] = 'native', key: str | None = None) Plan
async flightplandb.plan.edit(plan: Plan, return_format: Literal['pdf'], key: str | None = None) bytes
async flightplandb.plan.edit(plan: Plan, return_format: Literal['json', 'xml', 'csv', 'kml', 'xplane', 'xplane11', 'fs9', 'fsx', 'squawkbox', 'xfmc', 'pmdg', 'airbusx', 'qualitywings', 'ifly747', 'flightgear', 'tfdi717', 'infiniteflight'], key: str | None = None) str

Edits a flight plan linked to your account.

Requires authentication.

Parameters:
  • plan (Plan) -- The new Plan object to replace the old one associated with that ID

  • return_format (str) -- The API response format, defaults to "native". Must be one of the keys in the Table of permitted plan return types.

  • key (str, optional) -- API authentication key.

Returns:

Plan of the registered flight plan created on flight plan database, corresponding to the route after being edited if "native" is specified as the return_format (default).

bytes if PDF was specified as the return_format.

str if a different return_format was specified.

Return type:

Union[Plan, Dict, bytes, str]

Raises:
async flightplandb.plan.delete(id_: int, key: str | None = None) StatusResponse

Deletes a flight plan that is linked to your account.

Requires authentication.

Parameters:
  • id_ (int) -- The ID of the flight plan to delete

  • key (str, optional) -- API authentication key.

Returns:

OK 200 means a successful delete

Return type:

StatusResponse

Raises:

NotFoundException -- No plan with the specified id was found.

async flightplandb.plan.search(plan_query: PlanQuery, sort: str = 'created', include_route: bool | None = False, limit: int = 100, key: str | None = None) AsyncIterable[Plan]

Searches for flight plans. A number of search parameters are available. They will be combined to form a search request.

Requires authentication if route is included in results

Parameters:
  • plan_query (PlanQuery) -- A dataclass containing multiple options for plan searches

  • sort (str) -- Sort order to return results in. Valid sort orders are created, updated, popularity, and distance

  • limit (int) -- Maximum number of plans to return, defaults to 100

  • include_route (bool, optional) -- Include route in response, defaults to False

  • key (str, optional) -- API authentication key.

Yields:

AsyncIterable[Plan] -- An iterable containing Plan objects.

async flightplandb.plan.has_liked(id_: int, key: str | None = None) bool

Fetches your like status for a flight plan.

Requires authentication.

Parameters:
  • id_ (int) -- ID of the flightplan to be checked

  • key (str, optional) -- API authentication key.

Returns:

True/False to indicate that the plan was liked / not liked

Return type:

bool

async flightplandb.plan.like(id_: int, key: str | None = None) StatusResponse

Likes a flight plan.

Requires authentication.

Parameters:
  • id_ (int) -- ID of the flightplan to be liked

  • key (str, optional) -- API authentication key.

Returns:

message=Created means the plan was successfully liked. message=OK means the plan was already liked.

Return type:

StatusResponse

Raises:

NotFoundException -- No plan with the specified id was found.

async flightplandb.plan.unlike(id_: int, key: str | None = None) bool

Removes a flight plan like.

Requires authentication.

Parameters:
  • id_ (int) -- ID of the flightplan to be unliked

  • key (str, optional) -- API authentication key.

Returns:

True for a successful unlike

Return type:

bool

Raises:

NotFoundException -- No plan with the specified id was found, or the plan was found but wasn't liked.

async flightplandb.plan.generate(gen_query: GenerateQuery, include_route: bool | None = False, key: str | None = None) Plan

Creates a new flight plan using the route generator.

Requires authentication.

Parameters:
  • gen_query (GenerateQuery) -- A dataclass with options for flight plan generation

  • include_route (bool, optional) -- Include route in response, defaults to False

  • key (str, optional) -- API authentication key.

Returns:

The registered flight plan created on flight plan database, corresponding to the generated route

Return type:

Plan

async flightplandb.plan.decode(route: str, key: str | None = None) Plan

Creates a new flight plan using the route decoder.

Requires authentication.

Parameters:
  • route (str) -- The route to decode. Use a comma or space separated string of waypoints, beginning and ending with valid airport ICAOs (e.g. KSAN BROWS TRM LRAIN KDEN). Airways are supported if they are preceded and followed by valid waypoints on the airway (e.g. 06TRA UL851 BEGAR). SID and STAR procedures are not currently supported and will be skipped, along with any other unmatched waypoints.

  • key (str, optional) -- API authentication key.

Returns:

The registered flight plan created on flight plan database, corresponding to the decoded route

Return type:

Plan

Raises:

BadRequestException -- The encoded plan submitted had incorrect arguments or was otherwise unusable.