galileo_sdk.sdk.missions.MissionsSdk.upload

MissionsSdk.upload(mission_id, payload, rename=None, verbose=False)[source]

Upload a file or directory to the specified Mission. If the payload is a file, this function will place the file in the top level of the Mission file tree. If the payload is a directory, files in the first level of the payload directory will appear in the top level of the Mission file tree and subfolders of the payload will appear as subfolders in the Mission file tree.

Parameters
  • mission_id – str: Target Mission UUID

  • payload – str: Path to folder or file to upload to targeted Mission

  • rename – str: Used when uploading a single file to specify the desired path within the Mission context (i.e. rename=’/data/mydata.csv’).

  • verbose – bool: Verbosity flag, default is False

Returns

bool

Example:
>>> my_missions = galileo.missions.list_missions() # get the UUID of the mission you want
>>> UUID = my_missions[0].mission_id
>>> payload = 'C:\Users\Galileo\Hypernet Labs, Inc. Dropbox\Julia Example' # a Windows path, put your path here
>>> success = galileo.missions.upload(UUID, payload) # upload a whole directory
>>> if success:
>>>     print("It worked")
>>> else:
>>>     print("I don't think this Mission exists")