Skip to main content

Osef python library.

Project description

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 parse
  • auto_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

  1. The repository uses LFS to store some large OSEF samples for the tests. You need to install git-lfs and then run the following commands to get the files.
git lfs pull
  1. Install project and dependencies.
  • create and activate venv (python -m venv venv, then source venv/bin/activate)
  • pip install -e . to install the project
  • pip install -r test_requirements.txt to install dev dependencies (formatter, linter, unit tests dependencies)
  1. 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
  1. Unit tests. We use pytest. Some tests might take time (about a couple of minutes)
pytest tests/

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

osef-3.5.0.tar.gz (58.1 kB view details)

Uploaded Source

Built Distribution

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

osef-3.5.0-py3-none-any.whl (54.9 kB view details)

Uploaded Python 3

File details

Details for the file osef-3.5.0.tar.gz.

File metadata

  • Download URL: osef-3.5.0.tar.gz
  • Upload date:
  • Size: 58.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for osef-3.5.0.tar.gz
Algorithm Hash digest
SHA256 aaf711489ddf0754f36a503b231cb66ca7e731386b135beb4497a6eb4af0d187
MD5 1fc63cf4c483c56b7b129cc431ccdeb8
BLAKE2b-256 bc027cb5e4fd6444d36d97a54025839d260748380ddb1a0dc23d7ff0394a355b

See more details on using hashes here.

File details

Details for the file osef-3.5.0-py3-none-any.whl.

File metadata

  • Download URL: osef-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 54.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for osef-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 427fe042a961c06757463f0e2db9c2c51daa456b81ecac9a00645d9e80b729b8
MD5 a90d9696d87a9c95718a65dfa6af9311
BLAKE2b-256 b30c05a404836858e868527f90a0db7d06ee62eb35bc131820c7908232615db8

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