Skip to main content

OmniSec

Omni Security & Intelligence Python Library AI · MFT · GCS · CyberSecurity · Internet

Python License Modules

OmniSec is a unified Python library that brings together five essential domains under one consistent API:

Module Description
AI Text analysis, classification, summarisation, threat reporting via Claude API
MFT Managed File Transfer over SFTP/FTPS with AES-256 encryption and audit logs
GCS Google Cloud Storage — upload, download, signed URLs, metadata management
Security Hashing, AES/RSA encryption, password analysis, IoC extraction, header scoring
Internet HTTP client, DNS, port scanning, SSL inspection, IP geolocation, monitoring

Installation

# Base install
pip install omnisec

# With specific extras
pip install omnisec[ai]        # Anthropic Claude support
pip install omnisec[mft]       # SFTP + AES encryption
pip install omnisec[gcs]       # Google Cloud Storage
pip install omnisec[security]  # Full cryptography suite
pip install omnisec[internet]  # HTTP + DNS support
pip install omnisec[all]       # Everything

Quick Start

import omnisec

# ── AI Engine ──────────────────────────────────────────────────
engine = omnisec.AIEngine(api_key="your-anthropic-key")

summary = engine.summarize("Long document text...", max_sentences=3)
labels  = engine.classify("Suspicious email body", ["phishing", "spam", "legitimate"])
threat  = engine.analyze_security_log("Failed SSH from 10.0.0.5 - 50 attempts")

print(threat)
# {
#   "threat_level": "high",
#   "threat_type": "brute_force",
#   "indicators": ["10.0.0.5", "SSH port 22", "50 failed attempts"],
#   "recommendation": "Block IP 10.0.0.5 and enable fail2ban",
#   "summary": "Brute-force SSH attack detected from 10.0.0.5"
# }


# ── MFT Client ─────────────────────────────────────────────────
with omnisec.MFTClient(
    host="sftp.example.com",
    username="user",
    key_path="~/.ssh/id_rsa",
    encrypt_transfers=True,
) as mft:
    record = mft.upload("report.pdf", "/remote/reports/report.pdf")
    print(f"SHA-256: {record.sha256}")
    mft.export_audit_csv("audit.csv")


# ── GCS Client ─────────────────────────────────────────────────
gcs = omnisec.GCSClient(project="my-project", bucket="my-bucket")
gcs.upload("local/data.csv", "datasets/data.csv")
url = gcs.signed_url("datasets/data.csv", expiry_minutes=60)
objects = gcs.list_objects(prefix="datasets/")


# ── Security Toolkit ───────────────────────────────────────────
sec = omnisec.SecurityToolkit()

# Hashing
h = sec.hash("password123", "sha256")
file_hash = sec.hash_file("/var/log/syslog", "sha512")

# AES-256-GCM Encryption
key, nonce, ct = sec.aes_encrypt(b"sensitive data")
plaintext = sec.aes_decrypt(key, nonce, ct)

# String encryption
enc = sec.aes_encrypt_string("top secret message")
plain = sec.aes_decrypt_string(enc)

# Password tools
pwd = sec.generate_password(length=20, use_symbols=True)
strength = sec.check_password_strength("P@ssw0rd!")
print(strength)
# {"score": 72, "strength": "good", "feedback": ["Add uppercase letters."]}

# IoC extraction
iocs = sec.extract_iocs("Malware from 192.168.1.50 hit CVE-2023-1234 via evil.com")
print(iocs["cves"])    # ['CVE-2023-1234']
print(iocs["ipv4"])    # ['192.168.1.50']
print(iocs["domains"]) # ['evil.com']

# Security header analysis
headers = {"Strict-Transport-Security": "max-age=31536000", "X-Frame-Options": "DENY"}
analysis = sec.analyze_headers(headers)
print(f"Score: {analysis['score']}/100  Grade: {analysis['grade']}")

# PBKDF2 password hashing
h, salt = sec.pbkdf2_hash("mypassword")
assert sec.pbkdf2_verify("mypassword", h, salt)


# ── Internet Toolkit ───────────────────────────────────────────
net = omnisec.InternetToolkit(timeout=10, retries=3)

# HTTP
resp = net.get("https://api.ipify.org?format=json")
print(resp["json"]["ip"])

# Port scanning
result = net.port_scan("192.168.1.1", ports=[22, 80, 443, 3306])
for p in result["open_ports"]:
    print(f"  {p['port']}/TCP  {p['service']}")

# SSL inspection
cert = net.ssl_info("google.com")
print(f"Expires in {cert['days_remaining']} days")
print(f"Issuer: {cert['issuer'].get('organizationName')}")

# DNS
records = net.dns_resolve("example.com", "A")
hostname = net.reverse_dns("8.8.8.8")

# IP intelligence
info = net.ip_info("8.8.8.8")
print(f"{info['org']} — {info['city']}, {info['country']}")

# URL monitoring
statuses = net.monitor_urls(["https://google.com", "https://github.com"])
for s in statuses:
    status = "YES" if s["ok"] else "NO"
    print(f"{status} {s['url']}  {s['elapsed_ms']}ms")

CLI Usage

# Hash a string
omnisec hash sha256 "hello world"

# Generate a secure password
omnisec password generate --length 24

# Check password strength
omnisec password check "P@ssword123!"

# Port scan
omnisec port-scan 192.168.1.1 --ports 22 80 443 3306 5432

# SSL certificate info
omnisec ssl-info google.com

# IP geolocation
omnisec ip-info 8.8.8.8

# DNS lookup
omnisec dns google.com --type MX

# URL availability check
omnisec ping https://example.com

# Extract IoCs from text
omnisec extract-iocs "Attack from 10.0.0.1 via CVE-2024-1234"

Configuration

from omnisec import OmniConfig

# Programmatic configuration
cfg = OmniConfig(
    ai_model="claude-sonnet-4-6",
    gcs_bucket="my-bucket",
    mft_host="sftp.example.com",
    net_timeout=15,
)
cfg.save("omnisec.json")

# Reload from file
cfg = OmniConfig.load("omnisec.json")

# Environment variables (auto-detected)
# ANTHROPIC_API_KEY, GOOGLE_CLOUD_PROJECT, OMNISEC_GCS_BUCKET,
# OMNISEC_MFT_HOST, OMNISEC_NET_TIMEOUT, etc.

Project Structure

omnisec/
├── omnisec/
│   ├── __init__.py          # Top-level exports
│   ├── cli.py               # CLI entry point
│   ├── core/
│   │   ├── config.py        # Centralised OmniConfig
│   │   └── logger.py        # Structured colour logger
│   ├── ai/
│   │   └── __init__.py      # AIEngine (Claude API)
│   ├── mft/
│   │   └── __init__.py      # MFTClient (SFTP/FTPS + AES)
│   ├── gcs/
│   │   └── __init__.py      # GCSClient (Google Cloud Storage)
│   ├── security/
│   │   └── __init__.py      # SecurityToolkit (crypto + threat intel)
│   └── internet/
│       └── __init__.py      # InternetToolkit (HTTP + DNS + scanning)
├── tests/
│   ├── test_security.py
│   ├── test_internet.py
│   └── test_mft.py
├── examples/
│   ├── ai_demo.py
│   ├── mft_demo.py
│   ├── gcs_demo.py
│   ├── security_demo.py
│   └── internet_demo.py
├── setup.py
├── pyproject.toml
└── README.md

Running Tests

pip install omnisec[all] pytest
pytest tests/ -v

License

MIT License

Copyright (c) 2026 Raghava Chellu

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Contributing

Pull requests are welcome. For major changes, open an issue first. Please ensure all tests pass and new features include docstrings and examples.

Metadata

Release files for omnisec 1.1.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 omnisec 1.1.1
File Size Uploaded Provenance
omnisec-1.1.1.tar.gz 34.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for omnisec 1.1.1
File Interpreter ABI Platform
omnisec-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 65.0 kB

Release files / omnisec-1.1.1.tar.gz

Download URL omnisec-1.1.1.tar.gz
Size 34.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e56eeb468d8a975750da540b4555e141fe6db54a4960ba857b6e924bfc4f3695
BLAKE2b-256 checksum
How to use checksums
763c68ae292f0999332ec91b7cbeb2f2106674087a4189c1eafd8c11615d3a33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / omnisec-1.1.1-py3-none-any.whl

Download URL omnisec-1.1.1-py3-none-any.whl
Size 30.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a067448a21121a55277904d2026d4537173cb2936791a07ca0b6fcfbe512074b
BLAKE2b-256 checksum
How to use checksums
042ad4cd25a50350acc67bc025f385adf6fbd903150c71ff9b242cd72c3facc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for omnisec 1.1.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files No provenance

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