A library for chopping logs.
Project description
structas🪵
A lightweight Python library that transforms unstructed log data into structured data, this can be ran locally, as a kubernetes sidecar or run as a service to parse logs for Data Engineering processes.
Install
uv pip install . # or via pip/pipx/poetry.
Quick Start
- Define your log structure in YAML:
structas sample > sample_logs.yaml
- Parse logs with one command:
structas parse --structure <structure>.yaml --input <file_name> --format json
Python API
from structas import LogParser, StructureDefinition
# Parse logs with just three lines of code
structure = StructureDefinition.from_file("<structure>.yaml")
parser = LogParser(structure)
structured_data = parser.parse_file("<file>.log")
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
structas-0.1.0.tar.gz
(17.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
structas-0.1.0-py3-none-any.whl
(22.8 kB
view details)
File details
Details for the file structas-0.1.0.tar.gz.
File metadata
- Download URL: structas-0.1.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c7d87edc0e7a2ff1541aa696982678c5b2c10c99056b3d5364ef35ae72ddb53
|
|
| MD5 |
718c220bf5d477c38a06b58a9ad11cfc
|
|
| BLAKE2b-256 |
61a14ed9cbf8c409736ffb2fa275d1916119505aa799be5286b8df832b1df3ca
|
File details
Details for the file structas-0.1.0-py3-none-any.whl.
File metadata
- Download URL: structas-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2410dd179c27c3ab0cc013c5547f8f30b3f7de5ed3589208ef416afba8ed96ce
|
|
| MD5 |
cbf3146bc31b1728b8daff5b3ce502c8
|
|
| BLAKE2b-256 |
4a35f8496bb0edbbc4ee0059115824217e83847c19090f32a44dc72076d9a01f
|