dymaxionlabs package

Submodules

dymaxionlabs.files module

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

Bases: object

download()[source]

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.

Parameters:
  • filename – image name
  • output_dir – local destination to store the image
dymaxionlabs.files.upload(filename)[source]

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.

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

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(output_dir='.')[source]

Download results from a finished PredictionJob

Parameters:output_dir – path for storing results
status()[source]

Get status of a PredictionJob

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

Bases: object

files()[source]

Obtain all info about the uploaded files from your project

Returns:Returns a array of File objects

dymaxionlabs.utils module

dymaxionlabs.utils.get_api_key()[source]

Get current API Key from environment

dymaxionlabs.utils.get_api_url()[source]

Get current API URL from environment

dymaxionlabs.utils.get_project_id()[source]

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