A Client SDK of PlumberHub impliemented by python
Project description
plumberhub-client
A Client SDK of PlumberHub impliemented by python.
plumberhub-client
can be used with Python >= 3.7.
Installation
Install plumberhub-client
with:
pip install plumberhub-client
or,
pipenv install plumberhub-client
Basic example
Here's a example. It will print each sample.
from plumberhub import PlumberHubClient
def handleSample(sample):
print(sample)
def sayHello():
print('hello')
device = client.get_device()
gain = client.get_gain()
sampling_rate = client.get_sampling_rate()
print(device)
print(gain)
print(sampling_rate)
client.start()
def sayBye():
print('bye')
client = PlumberHubClient(
# plumberhub server hostname
hostname = '127.0.0.1',
# plumberhub server port
port = 8080,
# A clientId applied from plumberhub
client_id = 'f7e9e4cabe7ed2f95ee506199cd41e0a0d352e91466ef7f2c87793a92e76d198',
# Do something on sample incoming
onsample = handleSample,
onready = sayHello,
onclose = sayBye
)
time.sleep(2)
client.stop()
client.close()
Working with BDF/EDF file
License
plumberhub-client
is a free Open Source software released under the MIT license.
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
Built Distribution
File details
Details for the file plumberhub-client-0.3.0.tar.gz
.
File metadata
- Download URL: plumberhub-client-0.3.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 924a98785a8bdacde51bad49707f1e16f46d7e126f524944c673185de6621676 |
|
MD5 | d4ce9d522cafaf13c414e63d704959e1 |
|
BLAKE2b-256 | 87dcb03c346ee0d6947c1bbea8257caff266e3df4b3600c324c06927d365a63e |
File details
Details for the file plumberhub_client-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: plumberhub_client-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50481e91a770a1039e7290f9bc47bed01f5b3407dda790417661018d7c42888a |
|
MD5 | 356f3fda1c1f537a87434c959b4bc240 |
|
BLAKE2b-256 | f1681cf066ac20dbed34981b536286696003b351b4c46e94e5761f83c27e6ca7 |