Skip to main content

Array codec and API wrapper for SYV server

Project description

SYVLIB

0.2.150

Introduction

SYVLIB is an SDK which provides tools for building client applications for the SYV server.

Installation

pip install syvlib

Usage

First you need to open a session with your SYV instance:

import syvlib

session = syvlib.Session('https://syv.example.com', 'myusername', 'mypassword')

Once you have a session, you can open a cycle on a pump:

cycle = session.open('mypump')

Depending on the pump's engine type, you may then want to download drops:

drops = cycle.pull_drops('input', cycle.drop_uids.get('input'))

...or upload drops:

import numpy as np

drops = [syvlib.Drop(cycle, {'myarrayspec': np.zeros((64,64))})]
cycle.push_drops('output', drops)

...or upload a record:

with open('myfile.zip', 'rb') as stream:
    cycle.push_record('input', stream)

In any case, you will eventually need to commit the cycle:

cycle.commit_and_wait()

if cycle.error is not None:
    raise Exception(cycle.error)

Once the cycle has successfully completed the commit process, you may then be able to download a record (again, depending on the engine type):

with open('myfile.zip', 'wb') as stream:
    cycle.pull_record('output', stream)

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

syvlib-0.2.150.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syvlib-0.2.150-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file syvlib-0.2.150.tar.gz.

File metadata

  • Download URL: syvlib-0.2.150.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for syvlib-0.2.150.tar.gz
Algorithm Hash digest
SHA256 a149b74af5a01662722b619d73a522b65df53705f48567a3e4550901f03494d0
MD5 3ba6b6a98638acabfca94bfa387cefbb
BLAKE2b-256 7c64f8ecf43ce462702988860070576a84dfdf6c8b4fe9098b746a6f0d2ddb89

See more details on using hashes here.

File details

Details for the file syvlib-0.2.150-py3-none-any.whl.

File metadata

  • Download URL: syvlib-0.2.150-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for syvlib-0.2.150-py3-none-any.whl
Algorithm Hash digest
SHA256 ba2d8edc7d1b52b44b09bc6fdfef42308fb63b14d6b567478b2617bc9766adef
MD5 73eda98a9b95d9d89bc398ac6874973c
BLAKE2b-256 b41bceeecb770c597e93bfc74b9520792c04a729e1e989ff55421ad92378e2b6

See more details on using hashes here.

Supported by

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