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.3.2.tar.gz (54.7 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.3.2-py3-none-any.whl (53.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for osef-3.3.2.tar.gz
Algorithm Hash digest
SHA256 294ae101d1d2376d6561241b8eb2e2208941b39ecd69f9f1c03f8b9c2e8b6fd2
MD5 115282d99343d09f24802935424a9822
BLAKE2b-256 0d1ef8b22b48655c247937751e389f4a95c73e0cf4e543b41d8d9bdd4b8c7c70

See more details on using hashes here.

File details

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

File metadata

  • Download URL: osef-3.3.2-py3-none-any.whl
  • Upload date:
  • Size: 53.2 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d9c78664a3b0ef6ee18a187f53d8d851f4f6fe28988e49c8134352027b35eda
MD5 cfed5cfda43e85028238356d06b4709c
BLAKE2b-256 1d0a1fbbc37a5faa4a193d146a4d3dcc0188f093036f292834431644f8371580

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