skillfed

line-protocol-parser

Parse InfluxDB line protocol string into Python dictionary

line-protocol-parser v2.0.0 77.2K downloads/30d#14,552 on PyPI19
Permissive license MIT Active released

What it is and what it does

line-protocol-parser is a Python wrapper around a C parser that converts InfluxDB line protocol text into structured Python dictionaries. It reads the text-based format that InfluxDB uses for writing data points—combining measurement names, optional tags, field values, and timestamps—and extracts each component into a dictionary with keys for measurement, tags, fields, and time. The parser aligns with archived InfluxDB v1.2 semantics, handles comment lines (prefixed with #), tolerates whitespace variations, and supports unsigned integer field values as an extension.

You would use this when consuming InfluxDB data from files, HTTP endpoints, or subscriptions, or when you need to validate and normalize line protocol strings before processing. It has no runtime dependencies and requires Python 3.10 or newer. The package exposes only two public symbols: the parse_line() function and the LineFormatError exception.

Use it for:

  • Read InfluxDB measurement points from a file line-by-line and convert each to a dictionary for further processing or storage.
  • Receive InfluxDB subscription data via HTTP and parse incoming line protocol strings in a server endpoint.
  • Validate and normalize line protocol strings in a data pipeline before writing to a database or analytics tool.
  • Extract individual fields and tags from InfluxDB exports for reporting or data transformation tasks.
  • Build a bridge between InfluxDB and downstream systems that expect structured JSON or dictionary representations of time-series data.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses InfluxDB line protocol strings into Python dictionaries, extracting measurements, tags, fields, and timestamps from the text-based format used by InfluxDB.

Yes. The package is actively maintained, has no dependencies, supports current Python versions (3.10+), carries no known vulnerabilities, and solves a specific problem well—parsing InfluxDB line protocol. Install it if you work with InfluxDB data ingestion, subscriptions, or file-based exports and need reliable parsing into Python structures.

Install

line-protocol-parser on PyPI

pip

pip install line-protocol-parser

uv

uv add line-protocol-parser

poetry

poetry add line-protocol-parser

Installing line-protocol-parser

Before you install

Medium install friction due to compiled wheels for multiple Python versions and platforms. The package is actively maintained with a recent release and no runtime dependencies, making it straightforward to add to a project.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations, making it suitable for both open-source and commercial projects.

Quickstart

pip install line-protocol-parser

from line_protocol_parser import parse_line
data = parse_line('myMeas,someTag=ABC field1=3.14,field2="Hello, World!" 123')
print(data)

Requires Python 3.10 or newer.

Verify before relying

  • Whether the parser handles all InfluxDB v2.x line protocol extensions or remains limited to v1.2 semantics as documented
  • Performance characteristics when parsing large batches of line protocol strings
  • Whether the LineFormatError exception provides detailed error context for debugging malformed input

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 142 days since the last release
Last repo commit
First released
Downloads 77,165/month — #14,552 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: line_protocol_parser-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl; line_protocol_parser-2.0.0-cp310-cp310-macosx_11_0_arm64.whl; line_protocol_parser-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; line_protocol_parser-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; line_protocol_parser-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl; line_protocol_parser-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl; line_protocol_parser-2.0.0-cp310-cp310-win32.whl; line_protocol_parser-2.0.0-cp310-cp310-win_amd64.whl; line_protocol_parser-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl; line_protocol_parser-2.0.0-cp311-cp311-macosx_11_0_arm64.whl; line_protocol_parser-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; line_protocol_parser-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; line_protocol_parser-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl; line_protocol_parser-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl; line_protocol_parser-2.0.0-cp311-cp311-win32.whl; line_protocol_parser-2.0.0-cp311-cp311-win_amd64.whl; line_protocol_parser-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl; line_protocol_parser-2.0.0-cp312-cp312-macosx_11_0_arm64.whl; line_protocol_parser-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; line_protocol_parser-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Keywords: InfluxDB, influx, line, protocol, parser, reader

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchNatural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: Windows :: Windows 10Operating System :: POSIX :: LinuxProgramming Language :: CProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Version Control :: Git

Tags

influxdb line protocol parserparse influx line formatinfluxdb data parsingline protocol to dictinfluxdb string parserinflux measurement parsertime series data parsing
influxdbtime-seriesdata-parsing

More Git packages