Skip to main content

AI-powered security log analysis toolkit

Project description

securitylogai

Reusable Python engine for parsing logs, detecting suspicious activity, generating reports, and producing AI explanations.

What it does

  • Parse Apache-style logs
  • Detect brute-force style patterns
  • Generate readable reports
  • Produce AI-ready summaries
  • Parse mixed log lines with parse_logs()

Install from PyPI

pip install securitylogai

Install from TestPyPI

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple securitylogai

Usage

from securitylogai import parse_logs, detect_bruteforce, generate_report, explain_attack

log = "127.0.0.1 - - [30/May/2026:12:00:00 +0630] \"POST /login HTTP/1.1\" 401 532"
events = parse_logs(log)
findings = detect_bruteforce(events * 25)
report = generate_report(findings)
summary = explain_attack(findings[0]) if findings else None

Build and publish

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload --repository testpypi dist/*
python -m twine upload dist/*

Package structure

  • parser.py - parse log lines
  • detector.py - detect suspicious patterns
  • reporter.py - create text reports
  • ai.py - AI explanation layer
  • utils.py - shared helpers

Roadmap

  • add richer parsing for more log sources
  • add provider adapters for OpenAI, Gemini, Ollama
  • add CLI and JSON output
  • add tests and release workflow

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

securitylogai-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

securitylogai-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file securitylogai-0.1.1.tar.gz.

File metadata

  • Download URL: securitylogai-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for securitylogai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 329a0ebcebedcef811397d885457f3c53b5617f4247e28214056fe4955615c40
MD5 5b41302ebb66e70a56ff9b1930dbf4e5
BLAKE2b-256 0e6d28b62067dd328dddbe142df1c9819c6598cee4916d48268c3589d5c160b2

See more details on using hashes here.

File details

Details for the file securitylogai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: securitylogai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for securitylogai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80460c5c7061fc2f64f9d2a463d90f89bdca6681baa34f2b0a26d1c4ef4800a0
MD5 13fc7451d3abd0d5e1060653dc8ab212
BLAKE2b-256 519187498fd06a4742e087d3f5a498fd0300bcb298af91e1f992603f86e4c865

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page