plotserver-api 0.0.4

Creator: railscoder56

Last updated:

Add to Cart

Description:

plotserverapi 0.0.4

plot-server-api
Python API for communication with PlotServer.
How to Use

Register a user on the PlotServer of your choice;
Get your API key;
Install this package:

$ pip install plotserver-api


Integrate API into your application:

from plotserver_api import PlotServerAPI, Project

# Set key and API address
key = b'5uSN9ojYpMiI7gQ5k5NWR6kYvenDX97CmxC5aaUGdH8='
api_url = "http://someadress"

# Initialize API manager
api = PlotAPI("alartum", key, api_url, verbose=True)
# And create new project with
project = Project("project1", api, fresh_start=True)

# Add tags for different data to be tracked
project.add_files(["sin", "cos"])
# And inform the server
project.prepare_project()

import math
t = 0
while True:
# Add new data to the manager
project.add_frame("sin", t, math.sin(t**2/50))
project.add_frame("cos", t, math.cos(t/20))
# And send frames when done
project.send_frames()
time.sleep(2)
t += 1

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.