A package that can be used to convert csv file to influxdb line protocol format.
Project description
Influxify: Convert CSV to InfluxDB Line Protocol
Influxify is a Python package that simplifies the process of converting time-series data from a CSV file into the InfluxDB Line Protocol format. With Influxify, you can seamlessly import your existing data into InfluxDB for efficient storage and analysis.
Features
- Easily convert CSV data to InfluxDB Line Protocol format.
- Supports custom field and tag mappings for flexible data transformation.
- Can write data into a .lp (Line Protocol) file for convenient import into InfluxDB by simply dragging the file into a bucket.
- Compatible with Python 3.6+.
- Open-source and available under the MIT License.
Installation
You can install Influxify via pip:
pip install influxify
Usage
Influxify simplifies the process of converting time-series data from a CSV file into InfluxDB Line Protocol format. Follow these steps to get started:
- Import the
InfluxConverter
class in your Python script:
from influxify import InfluxConverter
- Initialize the converter:
converter = InfluxConverter('csv_file_name.csv', 'measurement', ['tag_columns'], ['field_columns'], 'timestamp_column', 'timestamp_format')
- Convert the CSV data to InfluxDB Line Protocol format:
line_protocols = converter.convert_csv_to_lineprotocol()
- Optionally, write the converted data into a (.line or .lp or .txt) file for easy import into InfluxDB by dragging the file into a bucket:
lp_file_path = "path/to/save/data.lp"
converter.write_to_lp_file(lp_file_path, line_protocols)
- Now, you can use the generated
line_protocols
to insert data into InfluxDB or use the line protocol file for quick and convenient import.
Contributing
We welcome contributions from the community! If you'd like to contribute to Influxify.
License
Influxify is distributed under the MIT License. See LICENSE for more information.
Support
If you have any questions, issues, or feature requests, please open an issue on our GitHub repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file influxify-0.0.3.tar.gz
.
File metadata
- Download URL: influxify-0.0.3.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 409043983e8078747a8ae0defa6ddedd8f59f32551c921202f7cb8915d24f0fe |
|
MD5 | 5ed229eff0db78ed163865275f29a297 |
|
BLAKE2b-256 | 6fd70ce4a37d49d8a87b3448aec94a7d4f462f060d496a4379a4d10a9670a609 |
File details
Details for the file influxify-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: influxify-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7af229459848df40915a1b6d284ec51cb2413de999949d6d60498a7d3a879533 |
|
MD5 | 81e39b3d4245011b85aa72367fb1679a |
|
BLAKE2b-256 | 760450380cfbecc785213d652498ced9551a94d486df5e7100bfc15dc2ee081d |