OSEF library
Library containing utilities to read and parse a stream, live or recorded, retrieved from Shift.
The stream is in the OSEF format (Open SErialization Format): it's an Outsight-defined serialisation binary format used to encode data streaming out of Shift. It is based on TLV-encoding.
For the full documentation, see: Developer documentation.
You can contact us @ https://support.outsight.ai
Installation
Install from PyPi using pip:
pip install osef
Usage
Open and parse an osef file or stream:
import osef
osef_path = "path/to/my/file.osef"
# or osef_path="tcp://192.168.2.2:11120"
for frame_dict in osef.parse(osef_path):
print(frame_dict)
Additional parameters:
first/last: the first and the last frame to parseauto_reconnect: enable parser auto_reconnection (default:True)real_frequency: If False, parse data as fast as your computer can. If True, process the data as the same pace as the real time stream from Shift (default:False)lazy: If lazy, the dict only unpack the values when they are accessed to save up resources (default:True)
To find more code samples, see Outsight Code Samples repository.
Development
- The repository uses LFS to store some large OSEF samples for the tests. You need to install
git-lfsand then run the following commands to get the files.
git lfs pull
- Install project and dependencies.
- create and activate venv (
python -m venv venv, thensource venv/bin/activate) pip install -e .to install the projectpip install -r test_requirements.txtto install dev dependencies (formatter, linter, unit tests dependencies)
- Linting. Code is compatible with python 3.8+, pylint is set to ensure compatibility with python 3.8. To quickly run black + pylint,
./devops/local_lint.sh
- Unit tests. We use pytest. Some tests might take time (about a couple of minutes)
pytest tests/
Release files for osef 3.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| osef-3.5.0.tar.gz | 58.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| osef-3.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 113.0 kB
Release files / osef-3.5.0.tar.gz
| Download URL | osef-3.5.0.tar.gz |
|---|---|
| Size | 58.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aaf711489ddf0754f36a503b231cb66ca7e731386b135beb4497a6eb4af0d187
|
|
BLAKE2b-256 checksum How to use checksums |
bc027cb5e4fd6444d36d97a54025839d260748380ddb1a0dc23d7ff0394a355b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.20
|
Release files / osef-3.5.0-py3-none-any.whl
| Download URL | osef-3.5.0-py3-none-any.whl |
|---|---|
| Size | 54.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
427fe042a961c06757463f0e2db9c2c51daa456b81ecac9a00645d9e80b729b8
|
|
BLAKE2b-256 checksum How to use checksums |
b30c05a404836858e868527f90a0db7d06ee62eb35bc131820c7908232615db8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.20
|