Skip to main content

idb line protocol parser

Project description

InfluxDB line protocol parser

A simple InfluxDB line protocol parser built using pyparsing.

The entry point is the parse function which receives a string and returns a list of the parsed line-protocol.

Example

>>> import pyilpp
>>> data = """
... measurement,tag1=tag_value1,tag2=tag_value2 int=1i,uint=1u,float=0.0,str="foo bar",boolean=t 1556813561098000000
... measurement2,tag1=tag_value1,tag2=tag_value2 int=1i,uint=1u,float=0.0,str="foo bar",boolean=t 1556813561098000000
... """
>>> res = pyilpp.parse(data)
>>> print(res)
[{'measurement': 'measurement',
  'tags': {'tag1': 'tag_value1', 'tag2': 'tag_value2'},
  'fields': {'int': 1,
             'uint': 1,
             'float': 0.0,
             'str': 'foo bar',
             'boolean': True},
  'time': 1556813561098000000},
 {'measurement': 'measurement2',
  'tags': {'tag1': 'tag_value1', 'tag2': 'tag_value2'},
  'fields': {'int': 1,
             'uint': 1,
             'float': 0.0,
             'str': 'foo bar',
             'boolean': True},
  'time': 1556813561098000000}]

Installation

From PyPI:

$ python3 -m pip install pyilpp

or from source (needs pdm):

$ git clone https://github.com/maxyz/pyilpp.git
$ cd pyilpp
$ pdm build
$ python3 -m pip install ./dist/pyilpp-*.whl

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

pyilpp-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

pyilpp-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file pyilpp-0.1.0.tar.gz.

File metadata

  • Download URL: pyilpp-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyilpp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ef3b4683b02cd5e26f3494e379f7f0f10d8870a823e55a2f8c689addb6071c0e
MD5 23386208b4a8aeaa9f56edab60db412b
BLAKE2b-256 6044788271782353fa6ec4b64b2815225b4fd9dad25c202c0b4da47c3f1f3d3f

See more details on using hashes here.

File details

Details for the file pyilpp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyilpp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyilpp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d66302fe345653cf5d13e69cdcc798c75bc2b5b6386b64e5929bbb7601b82774
MD5 fd41c1790cee60b4193fdc7b310fef92
BLAKE2b-256 86c9e29a383b4d545a06482ab97f0a5ecc29dbd3867920eae99c53bfafb33a8b

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