dymaxionlabs package


dymaxionlabs.files module

class dymaxionlabs.files.File(project, name, metadata)[source]

Bases: object


Download file and save it to +output_dir+

If the directory does not exist it will be created.

Parameters:output_dir – path to store file
dymaxionlabs.files.download(filename, output_dir='.')[source]

Download a file named +filename+ to +output_dir+

If the output directory does not exist it will be created.

  • filename – image name
  • output_dir – local destination to store the image

Upload a file named +filename+

Parameters:-- path to local file (filename) –
Returns:Returns the detail of the object that was created in DymaxionLabs’s server
Raises:FileExistsError – The filename argument does not correspond to an existing file

dymaxionlabs.models module

class dymaxionlabs.models.Estimator(uuid)[source]

Bases: object

Class that represents an Estimator in DymaxionLabs API

classmethod all()[source]

Obtain all UUIDs of estimators from your project

Returns:Returns an array of UUIDs
predict_files(remote_files=[], local_files=[])[source]

Predict files

This function will start a prediction job over the specified files. You can predict over already upload images by providing a list of +remote_files+, or over images in your disk by providing a list of +local_files+. Local files will be uploaded before prediction.

  • remote_files – array of string with the names of already uploaded files
  • local_files – array of string with the names of local files

Returns a dict with info about the new PredictionJob

class dymaxionlabs.models.PredictionJob(id, estimator, finished, image_files, result_files)[source]

Bases: object

Class that represents a PredictionJob in DymaxionLabs API

A PredictionJob is a background job that performs the prediction using a previously trained Estimator and your uploaded images.


Download results from a finished PredictionJob

Parameters:output_dir – path for storing results

Get status of a PredictionJob

Returns:Returns a boolean whether the job finished or not
class dymaxionlabs.models.Project[source]

Bases: object


Obtain all info about the uploaded files from your project

Returns:Returns a array of File objects

dymaxionlabs.utils module


Get current API Key from environment


Get current API URL from environment


Get current Project uuid from environment

Module contents

Package to integrate the DymaxionLabs’s funcionality:

  • Upload images
  • Predict imagenes based in object detection models
  • Download results