Skip to main content

Python package

pyunisens

Implementation of the Unisens data storage format

Installation

Stable version can be installed via pip install pyunisens

or most recent version via pip install git+https://github.com/Unisens/pyunisens

pyunisens is running on Python 3.6+

Quickstart

You can load any unisens object simply like this

import unisens

u = unisens.Unisens('c:/folder/dataset/') # folder containing the unisens.xml

Entries are saved under .entries can be accessed either via attributes or using the unisens object as a dictionary

print(u.entries)

# four ways to Rome
signal = u.signal_bin
signal = u['signal.bin']
signal = u.entries['signal.bin']
signal = u[0]

# shortcuts also work, if they are not ambiguous
signal = u.signal
signal = u['signal']

print(type(signal))
# signalEntry

Data can be loaded (if datatypeis supported, ie a standard numpy dtype) via data= signal.get_data()

You can add Entries simply by

import numpy as np
from unisens import SignalEntry

data = np.random(2, 2560)
s = SignalEntry(id='eeg.bin', parent=u)
# parent=u makes sure the signal is added to this Unisens object
# saving the data to eeg.bin
s.set_data(data, sampleRate=256, contentClass='EEG')

u.save() # will update the unisens.xml

Documentation

More documentation can be found at API-OVERVIEW.md and in the function descriptors

Bug reports / feedback

Please report any bugs or improvements via a Github issue.

Metadata

Release files for pyunisens 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyunisens 1.6.0
File Size Uploaded Provenance
pyunisens-1.6.0.tar.gz 17.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyunisens 1.6.0
File Interpreter ABI Platform
pyunisens-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.0 kB

Release files / pyunisens-1.6.0.tar.gz

Download URL pyunisens-1.6.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b0a1975366ad5abc791b0dd53f7429a1dd5e4da890eadd07cdf6d06b76ad5c16
BLAKE2b-256 checksum
How to use checksums
9e40c4936109da6b0cbabf1615482d2c44f92a36061f4b4ebabbe310b8e53c45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / pyunisens-1.6.0-py3-none-any.whl

Download URL pyunisens-1.6.0-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
105074a5dc9e3caa3f57f695df33db0c38530061ef3a75fdace277565b1728df
BLAKE2b-256 checksum
How to use checksums
52e493e7bd5ae8114e47bd7e31d0429ae00333d0a1bdb006fe7f9f301159d20b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for pyunisens 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page