NAV Navbar
  • Quickstart
  • Authentication
  • Account
  • Flight
  • Quickstart

    from aerospatial import Flight
    import os, glob # python modules
    # 1 Create flight
    flight ='Field Survey 01', {'aircraft': 'drone', 'date':'2018-06-01'})
    print('FlightId: ', # -> 'FlightId: e462e9dc-326f-4287-bf05-3e2cc1765d63'
    # 2 Upload images
    images = glob.glob('*.jpg')
    for image in images:
    # 3 Start build{'orthophoto-resolution': 20.0})

    Import the Flight class from the Python SDK. AeroSpatial will validate against your credentials in ~/.aerospatial/credentials (see Authentication).

    1. Create a new flight, specifying a name and an optional dictionary of metadata. Each flight is assigned a unique id.

    2. Using the Python glob module, upload all the images in the current directory.

    3. Start a build for the flight, passing an optional dictionary of OpenDroneMap arguments (see Build).

    To access the build products:

    # After build, get links to build products
    from aerospatial import Flight
    flight = Flight.load('e462e9dc-326f-4287-bf05-3e2cc1765d63')
    products = flight.products()

    Once the build is complete, use the flight id to access the build products.


    The SDK manages authentication:

    import Account from aerospatial
    account = Account()
    account.listFlights() # -> List all your flights

    AeroSpatial uses JSON Web Tokens to authenticate access to the API using your username and password credentials. This process is managed by the SDK.

    Create a file in ~/.aerospatial/credentials in this format:

    username = 'USERNAME'
    password = 'PASSWORD'


    List flights

    To list all your flights:

    import Account from aerospatial
    # Initialize your account
    my_account = Account()
    # Get a list of your flights and their metadata
    my_flights = my_account.listFlights()

    The account module allows you to query the flights in your account.



    import flight from aerospatial
    import os, glob # required to upload images

    Import the Flight class to access flight methods.


    flight ='Field Survey 01', {'aircraft': 'drone', 'date':'2018-06-01'})

    The above command returns a Python object structured like this:


    The new method accepts a flight name and optional metadata dictionary to create a new flight at

    The resulting flight object has two attriutes, properties and id.


    To upload all images in the current directory:

    import os, glob # python modules
    images = glob.glob('*.jpg')
    for image in images:

    The upload method accepts a file name of an image file (e.g. image.jpg) and uploads it to, returning the status of the upload request.


    To start a build

    odm_arguments = {
      'dtm': True,
      'dem-terrain-type': 'FlatForest'
      'orthophoto-resolution': 20.0,

    The build method accepts a dictionary of OpenDroneMap arguments with the leading dashes removed, and returns the status of the build request.


    To load an existing flight

    flight = Flight.load('flightId')

    The load method accepts the flightId from an existing flight and returns a flight object, which includes the products method for accessing build products.


    To access build products:

    products = flight.products()

    The products method provides links to the build products for a flight.