Metadata-Version: 2.4
Name: securitylogai
Version: 0.1.0
Summary: AI-powered security log analysis toolkit
Author: Isaac Talb
License-Expression: MIT
Project-URL: Homepage, https://github.com/IsaacTalb/securitylogai
Project-URL: Repository, https://github.com/IsaacTalb/securitylogai
Project-URL: Issues, https://github.com/IsaacTalb/securitylogai/issues
Keywords: security,logs,ai,cybersecurity,fastapi
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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

## Install from PyPI

```bash
pip install securitylogai
```

## Install from TestPyPI

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

## Usage

```python
from securitylogai import parse_apache_log, 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"
event = parse_apache_log(log)
findings = detect_bruteforce([event] * 25)
report = generate_report(findings)
summary = explain_attack(findings[0]) if findings else None
```

## Build and publish

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
```

## Publish to TestPyPI first

```bash
python -m twine upload --repository testpypi 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 Nginx / SSH / Windows parsing
- add provider adapters for OpenAI, Gemini, Ollama
- add CLI and JSON output
- add tests and release workflow
