--- id: line-protocol-parser version: "2.0.0" license: MIT license_treatment: permissive maintenance: active --- # line-protocol-parser — Parse InfluxDB line protocol string into Python dictionary License: permissive · Maintenance: active · Downloads: 77.2K/mo ## 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 above — 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 pip install line-protocol-parser uv add line-protocol-parser 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_current - Install friction: medium - Maintenance: active - Downloads: 77.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags influxdb line protocol parser, parse influx line format, influxdb data parsing, line protocol to dict, influxdb string parser, influx measurement parser, time series data parsing, influxdb, time-series, data-parsing [View on SkillFed](https://skillfed.io/packages/line-protocol-parser) · [View on PyPI](https://pypi.org/project/line-protocol-parser/)