Skip to main content

Type-safe Python SDK for FortiGate firewall automation and FortiOS REST API - 1,348+ endpoints with async support and complete type safety

Project description

HFortix - Fortinet Python SDK

PyPI version Python 3.10+ License: MIT

Meta-package for the HFortix ecosystem - Convenient installation for Fortinet automation in Python.

📦 Package Structure

This is a meta-package that provides convenient installation patterns. The actual functionality is in these packages:

Package Repository Description
hfortix-core hfortix-core Core HTTP client and shared utilities
hfortix-fortios hfortix-fortios FortiOS/FortiGate API client (1,300+ endpoints)

🚀 Installation Options

Everything (Recommended)

pip install hfortix[all]

Installs all current and future Fortinet product packages.

FortiOS/FortiGate Only

pip install hfortix[fortios]

Installs hfortix-core + hfortix-fortios.

Core Only

pip install hfortix

Installs only hfortix-core - the shared foundation.

Individual Packages

# Install specific packages directly
pip install hfortix-fortios  # Automatically includes hfortix-core
pip install hfortix-core     # Just the core utilities

💡 Quick Start

from hfortix_fortios import FortiOS

# Connect to FortiGate
fgt = FortiOS(
    host="192.168.1.99",
    token="your-api-token"
)

# Get firewall policies
policies = fgt.api.v2.cmdb.firewall.policy.get()

for policy in policies:
    print(f"Policy {policy.policyid}: {policy.name}")

📚 Documentation

Package Documentation Link
hfortix-fortios FortiOS Documentation
hfortix-core Core API Reference

✨ Features

Comprehensive Coverage

  • 1,300+ FortiOS API endpoints (CMDB, Monitor, Log, Service)
  • Full type hints and IDE autocomplete
  • Auto-generated from official FortiOS schemas

Developer Experience

  • Pythonic API design
  • Extensive inline documentation
  • Type-safe request/response models

Production Ready

  • Transaction support
  • Error handling and retries
  • Async/await support
  • Rate limiting

📋 Requirements

  • Python 3.10 or higher
  • FortiOS 7.0+ (for FortiGate devices)

📄 License

MIT License - see LICENSE for details.

🔗 Related Projects

💬 Support


Author: Herman W. Jacobsen | LinkedIn | GitHub

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-0.5.158.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

hfortix-0.5.158-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file hfortix-0.5.158.tar.gz.

File metadata

  • Download URL: hfortix-0.5.158.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hfortix-0.5.158.tar.gz
Algorithm Hash digest
SHA256 c5130b4b282d3bff32382454d583dc1566d2498f1a168e0b41c08fa4ff8c5844
MD5 4a0bad56e05ee2a0f2ae1fce7fd3223b
BLAKE2b-256 2c1e84153579d365beb656c39c7a43d70dbf6ade2fcbb9932a2a1a677ef3ec6b

See more details on using hashes here.

File details

Details for the file hfortix-0.5.158-py3-none-any.whl.

File metadata

  • Download URL: hfortix-0.5.158-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hfortix-0.5.158-py3-none-any.whl
Algorithm Hash digest
SHA256 b6170dc422054445e253492b7e8f7a5172b0a616b02229da9ec045ff3ab50d62
MD5 0ce197468a0044945db3cd65b8cb78c0
BLAKE2b-256 cbc516265c7d70e56a65893e3eaa029ddff02dc83b8d01d99e00593171585df1

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