Skip to main content

Modern, fully-typed Python SDK for FortiOS/FortiGate with complete API coverage (1,348 endpoints)

Project description

HFortix-FortiOS

PyPI version Python 3.10+ Documentation Status License Typing: Typed

HFortix-FortiOS is a modern, fully-typed Python SDK for FortiOS/FortiGate automation with complete API coverage.

🚀 Quick Start

pip install hfortix-fortios
from hfortix_fortios import FortiOS

# Connect to your FortiGate
with FortiOS(host="192.168.1.99", token="your-api-token") as fgt:
    # Create firewall address
    fgt.api.cmdb.firewall.address.post(
        name="web-server",
        subnet="10.0.1.100/32",
        comment="Production web server"
    )
    
    # Create firewall policy with simplified syntax
    fgt.api.cmdb.firewall.policy.post(
        name="Allow-Web-Traffic",
        srcintf=["internal"],      # Auto-converted to FortiOS format
        dstintf=["wan1"],
        srcaddr=["all"],
        dstaddr=["web-server"],
        service=["HTTP", "HTTPS"],
        action="accept",
        nat="enable"
    )

✨ Key Features

  • 🎯 Complete API Coverage - 1,348 endpoints across CMDB, Monitor, Log, and Service APIs
  • 💪 Fully Typed - Complete type hints with .pyi stubs for excellent IDE support
  • ⚡ Modern & Fast - Async/await support with httpx, HTTP/2, connection pooling
  • 🛡️ Production Ready - Comprehensive error handling, validation, retry logic, rate limiting
  • 🔄 Simplified Syntax - Simple list format auto-converts to FortiOS dict format
  • 📦 Batch Transactions - Atomic configuration changes with automatic commit/rollback (v0.5.152+)
  • 🔍 API Inspection - Debug and audit API interactions (v0.5.152+)
  • 🌐 FortiManager Proxy - Manage multiple FortiGates through FortiManager

📊 API Coverage

FortiOS 7.6.5 - 100% Coverage (1,348 endpoints)

  • 561 CMDB endpoints - Configuration database management (100% typed)
  • 490 Monitor endpoints - Real-time monitoring and statistics (partial types)
  • 286 Log endpoints - Log retrieval and analysis (partial types)
  • 11 Service endpoints - Service operations (100% typed)

All endpoints are auto-generated with complete schema coverage.

📚 Documentation

🔗 Related Packages

This package is part of the HFortix SDK ecosystem:

  • hfortix-core - Core HTTP client and utilities
  • hfortix - Meta package to install all components

📄 License

Proprietary license. All rights reserved.

🤝 Support


Version: 0.5.154-beta
FortiOS Support: 7.6.5
Python: 3.10+

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

hfortix_fortios-0.5.156.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

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

hfortix_fortios-0.5.156-py3-none-any.whl (12.3 MB view details)

Uploaded Python 3

File details

Details for the file hfortix_fortios-0.5.156.tar.gz.

File metadata

  • Download URL: hfortix_fortios-0.5.156.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hfortix_fortios-0.5.156.tar.gz
Algorithm Hash digest
SHA256 091aef8877d35e2fca7ff75731d74e5fdebe09d8fd70fd5dfeb066dbcf284827
MD5 b6fc54e38a9f6644aae4c99f3387fa4d
BLAKE2b-256 bbb43fd18227320214ec90ce0f7a238f62c04876a0b424b988f5baae6cf971be

See more details on using hashes here.

File details

Details for the file hfortix_fortios-0.5.156-py3-none-any.whl.

File metadata

File hashes

Hashes for hfortix_fortios-0.5.156-py3-none-any.whl
Algorithm Hash digest
SHA256 3f9abe4d061f407dbfd692a4a15013cfc5099ed6d34c902e1c1369160e3309b2
MD5 9145f4158ffa93e78bc48a1fe431eeb3
BLAKE2b-256 eb6f7fad6e10fb5cdd582112021bd975e297b419d0cce9bde1b900a0b15612fc

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