Python wrapper around procolog2msgpack, to convert rock-log- to msgpack-files
Project description
python-pocolog2msgpack
Python wrapper around the docker container of rock-core/tools-pocolog2msgpack
Table of content
about
This project provides a python interface for the pocolog2msgpack tool, to convert Rock's pocolog format to MessagePack.
dependencies
dependencies | version |
---|---|
python | 3.5+ |
docker | 19.03+ |
getting started
- Install package from pip
$ pip install pocolog2msgpack
- Write own converter
from pocolog2msgpack import Converter base_path = "data/" conv = Converter(base_path=base_path)
- convert batch of files
- convert all
log
-files indata/log/
- resulting msg-files in same sub-dir, but under
data/msg
log_path = f"{base_path}/log/" conv.convert_batch( base_path=log_path, file_type="log", cache=True, )
- convert all
- convert single file
- convert file
data/log/poco.log
- resulting msg-file in
data/msg/poco.msg
from pocolog2msgpack import X2YFile file = X2YFile( file_name="data/poco.log", file_type="log", ) conv.convert( log_2_msg_file = file, )
- convert file
- convert batch of files
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pocolog2msgpack-0.1.1.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for pocolog2msgpack-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84c447ab69a07636ae5fae9490a9741a80f92bef150da64c707ca9c95f1edbc4 |
|
MD5 | 92443f9cb572bea84316ca51f5b12713 |
|
BLAKE2b-256 | 05cdad7760c06acda2637ca4152e6f2b9b96bee03400045e5db7dfbf806b85d7 |