Skip to main content

Python library of edge-ml.org: end-to-end machine learning for embedded devices

Project description

edge-ml python

Tests PyPI Publish

Python package for edge-ml.org.

Usage

Installation

Install edge-ml using the follwing command.

pip install edge-ml

Retrieve Project

This functionality comes in handy if you would like to train a machine learning model from edge-ml data.

from edgeml import edgeml

# get the API key from the settings of your project
project = edgeml.getProject("https://app.edge-ml.org", PROJECT_API_KEY) 

Push Data from Python

from edgeml import edgeml
import time

key = "YOUR_API_KEY"
startTime = time.time()
collector = edgeml.datasetCollector("https://app.edge-ml.org",
                                    key,
                                    "Example Dataset", # name the dataset you would like to upload
                                    False) # do not use server timestamps

for i in range(500):
    current_time = startTime + i * 10 # adding samples at 10 ms time steps
    collector.addDataPoint("Accelerometer X", random.randint(1,50) / 10.0, current_time) 
    collector.addDataPoint("Accelerometer Y", random.randint(1,50) / 10.0, current_time) 
    collector.addDataPoint("Accelerometer Z", random.randint(1,50) / 10.0, current_time) 

collector.onComplete()

Development

Testing

To run the tests please enter:

python -m unittest -v tests/all.py

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

edge-ml-0.0.9.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

edge_ml-0.0.9-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page