Skip to main content

pat-cli

Table of Contents

Overview

pat-cli is a tool for clustering logs based on the textual content of the log. The tool uses a two-step process to achieve this:

Vectorization: In this step, the log statement is converted into a vector in an n-dimensional space. This way, we can treat logs just like we treat points on a 2D graph and try to cluster them. The only difference is that the dimension of this space.

To achieve this vectorization, few algorithms can be employed. The available algorithms can be found using the help page of the tool, but one example is the TF-IDF.

Usually, vectorization involves a sub-step called tokenization. In this step, the logs are broken down into a set of tokens. For example, a log like "Writing output to file" can be broken down into the following tokens: "writing", "output", "to", "file". This allows the tool to understand the textual content of the logs. For example, in the TF-IDF algorithm, the frequencies of the words (tokens) making up each log statement are used to determine how important each word in the log is.

Clustering: In this step, a clustering algorithm like K-Means or Birch is used to cluster the logs into multiple groups that are likely to be similar to each other.

Usage

pat-cli is available on PyPI, so you can install it with pip:

pip install pat-cli

The pat command will then be available in your environment. You can get help on how to use it using:

pat --help

Issue

If you face any issue, feel free to create a GitHub Issue in this repository and I will try to address it or respond to it as soon as possible.

Contribution

Contribution is welcome. If you have an interesting addition to the tool, be it another vectorization or clustering algorithm, feel free to publish a PR.

Metadata

Release files for pat-cli 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pat-cli 0.2.1
File Size Uploaded Provenance
pat_cli-0.2.1.tar.gz 17.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pat-cli 0.2.1
File Interpreter ABI Platform
pat_cli-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 37.6 kB

Release files / pat_cli-0.2.1.tar.gz

Download URL pat_cli-0.2.1.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
981671b15108d341eb222b45b61a08cae16e37a2bb286558317826a5394987c1
BLAKE2b-256 checksum
How to use checksums
b7a998c2854bcc413ef8d56e39c7378b31fd84433b1f5ef15809947d52744a4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

Release files / pat_cli-0.2.1-py3-none-any.whl

Download URL pat_cli-0.2.1-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa3a9ce612fdcf7d277414da38e6b269ae5a5c2593582f8a5a478a17b25c050d
BLAKE2b-256 checksum
How to use checksums
283c912f00d1ee6addea5db5e32f8e619c1e7317130e480c2ec75e329078da75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure

Security for pat-cli 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page