Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 1.65 KB

README.md

File metadata and controls

60 lines (37 loc) · 1.65 KB

dozer-log-python

This is the Python binding for reading Dozer logs.

Installation

pip install pydozer_log

Troubleshoot

This library contains native code so have limited platform support.

If above command gives you:

ERROR: Could not find a version that satisfies the requirement pydozer_log (from versions: none)
ERROR: No matching distribution found for pydozer_log

it means your platform is not supported.

As a general rule, we support CPython >= 3.10 on Windows, MacOS and Linux, both amd and arm architectures. Meanwhile, some other versions of PyPy and CPython with certain platform combinations are also supported.

To see all supported platforms, please check the file list at https://pypi.org/project/pydozer-log/#files.

Usage

Assume your Dozer home directory is .dozer and you have an endpoint named trips. You can read the Dozer logs in Python as follows:

import pydozer_log

reader = await pydozer_log.LogReader.new('.dozer', 'trips')
print(await reader.next_op())

Develop

Install maturin in your Python environment:

pip install maturin

Install the development version of dozer-log-python:

maturin develop --features python-extension-module

The whole library is behind a feature flag, so you need to specify --features python-extension-module to enable it. This is a known issue of pyo3.

See PyO3 for more information.

Run example

python examples/reader.py