line-protocol-parser
Parse InfluxDB line protocol string into Python dictionary
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-parseruv
uv add line-protocol-parserpoetry
poetry add line-protocol-parserInstalling 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
Tags
More Git packages
A Poetry plugin that automatically derives and…
permissive · top 5,000 on PyPI
versioningitAutomatically determines your Python package's…
permissive · top 5,000 on PyPI
word2numberConverts written-out number words (like "twenty…
permissive · top 5,000 on PyPI
lefthookLefthook is a Git hooks manager that installs…
permissive · top 15,000 on PyPI
mergify-cliMergify CLI is a command-line tool for managing…
permissive · top 15,000 on PyPI
requests-ntlm3Provides HTTP NTLM authentication for the…
permissive · top 15,000 on PyPI
influxdb-clientPython client library for querying and writing…
permissive · top 5,000 on PyPI
influxdbClient library for writing to and querying…
permissive · top 5,000 on PyPI
statshogA Python client for sending metrics to StatsD…
permissive · top 5,000 on PyPI
types-influxdb-clientProvides type stubs for influxdb-client,…
permissive · top 15,000 on PyPI
asammdfasammdf parses, edits, and exports ASAM MDF…
copyleft · top 5,000 on PyPI
apache-airflow-providers-influxdbIntegrates InfluxDB time-series database with…
permissive · top 15,000 on PyPI
jstylesonParses JSON strings that contain…
permissive · top 15,000 on PyPI
query-stringParses URL query strings and fragments into…
permissive · top 15,000 on PyPI
questdbA Python client library for QuestDB that sends…
permissive · top 15,000 on PyPI