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 (8,000+ 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 FortiOSClient

# Connect to FortiGate
client = FortiOSClient(
    host="192.168.1.99",
    token="your-api-token"
)

# Get firewall policies
policies = client.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

  • 8,000+ FortiOS API endpoints
  • 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.157.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.157-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hfortix-0.5.157.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.157.tar.gz
Algorithm Hash digest
SHA256 75d324403b3bf38971b4543839fc31cff41430265fe3eddb2e7350d8b65fe772
MD5 63f3ff9f8594cb4601c2e85aee3194a8
BLAKE2b-256 7a6ed62cc62ddeaf4add0d3ad0afa40fce091dcd67b639c3da9ec538a51e3151

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hfortix-0.5.157-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.157-py3-none-any.whl
Algorithm Hash digest
SHA256 18a4b6b21e2ceb1d4b052668d1bdf3986b53877504a0981caff7f325442bbf42
MD5 3bed04b5f34b1ccfbed58cf28936cfd8
BLAKE2b-256 a1677c855c86fa19f4a6815e3931e52a5c8f644d3128901cc731060d349d68dd

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