Skip to main content

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

  1. Install package from pip
    $ pip install pocolog2msgpack
    
  2. Write own converter
    from pocolog2msgpack import Converter
    
    base_path = "data/"
    conv = Converter(base_path=base_path)
    
    1. convert batch of files
      • convert all log-files in data/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,
      )
      
    2. 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,
      )
      

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

pocolog2msgpack-0.1.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

pocolog2msgpack-0.1.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file pocolog2msgpack-0.1.2.tar.gz.

File metadata

  • Download URL: pocolog2msgpack-0.1.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.3

File hashes

Hashes for pocolog2msgpack-0.1.2.tar.gz
Algorithm Hash digest
SHA256 764fdbd69119d94fcd17ac49f31d1f1eb9bb9e84f1359b02fb57d6c784d94709
MD5 bb23b192c6c9be35c2607ac5be65c46e
BLAKE2b-256 11c9621f5690f5fc9bba90bcc337124ee2edcab53438705ab19add632713aff1

See more details on using hashes here.

File details

Details for the file pocolog2msgpack-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pocolog2msgpack-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.3

File hashes

Hashes for pocolog2msgpack-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f8e33bb0de87ba5a1df4a9191135ec091eb351313ddcae4d5b9b533c80666554
MD5 938d79be62c194110d592314cd8fb70d
BLAKE2b-256 20ce62044fc48d60401aae07da56ccbd0833ea863065efc8f54ade222cc5138d

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