Skip to main content

Marple SDK

Project description

Marple SDK

A simple SDK to upload data to Marple

Installation

Install the Marple SDK using:

pip install marpledata

Import the package using:

import marple

Usage

Setup

Create a Marple connection using:

from marple import Marple

m = Marple(ACCESS_TOKEN)

You can find your personal access token in your account settings.

To check your connection, use:

m.check_connection()

Upload data files

If your data is already in a file format, use this function to upload the data to Marple.

source_id = m.upload_data_file(file_path, marple_folder, metadata={})

  • file_path: the file_path of your data set
  • marple_folder: in what folder you would like to upload the data
  • metadata: dictionary with metadata. Example: {'Pilot': 'John Doe'}' Note that the metadata fields need to be added to your workspace before you will see them.

Upload a dataframe

If your data is in a pandas dataframe, use this function to upload the data to Marple.

source_id = m.upload_data_pandas(dataframe, target_name, marple_folder, metadata={})

  • target_name: the target name for the dataset, this is how it will appear in Marple.

Add and send data

You can also use the Marple SDK to add data piece by piece and send it to Marple. First use:

m.add_data(data_dict)

  • data_dict = dictionary with signal, value pairs in it. Example: {'time': 2, 'signal 1': 0, 'signal 2': 5}

Once all the data has been added, use:

source_id = m.send_data(target_name, marple_folder, metadata={})

Get a link to the data

You can generate a link to Marple that opens the data and a project immediately. This can be very useful to see the results of a simulation directly.

link = m.get_link(source_id, project_name)

  • source_id: identifier for the data set, is returned by all above functions.
  • project_name: name of the project that you want to open the data in.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marpledata-0.0.2.tar.gz (3.3 kB view hashes)

Uploaded source

Built Distribution

marpledata-0.0.2-py3-none-any.whl (3.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page