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.4.0.tar.gz (55.2 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.4.0-py3-none-any.whl (53.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for osef-3.4.0.tar.gz
Algorithm Hash digest
SHA256 eb6d9411d01db1dc5c7438a85285a9c47bd1fc5f692c1b8dc1224639c2a190f3
MD5 3dd0aee363434f06b846bdecf401806d
BLAKE2b-256 31e933df4433570111b117ae40982fa6caf9e69027a55ea49fb03162bb970c7c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: osef-3.4.0-py3-none-any.whl
  • Upload date:
  • Size: 53.6 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6996861d147eaafcd728aa44fe7e5cf0eb07d71bb881624aabe910455da989e5
MD5 88cc41f3e10f838c05761a2a4c38a4ff
BLAKE2b-256 f3a2b114998f2557f38c036535ddc34998488ef7d6a30cbe3c84243811d6074c

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