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.162.tar.gz (7.5 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.162-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hfortix-0.5.162.tar.gz
  • Upload date:
  • Size: 7.5 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.162.tar.gz
Algorithm Hash digest
SHA256 39a39ae28937eb9f11e21edad8788d55710a5b3a1bb2303e9f397c655c056436
MD5 68ba338664e9bdefabb6f6f4f375b950
BLAKE2b-256 6347ba0aed910f6dd741f0fe36195c0f84ca6131f7a748ee4b8c5a9cfa08a0e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hfortix-0.5.162-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.162-py3-none-any.whl
Algorithm Hash digest
SHA256 6cab5c964dbc6344968cd48562bc28583984698b4a36e82ebf9dc19e6fa443cc
MD5 e1f92e4147300103e7eafb2b87d33d36
BLAKE2b-256 5823f1d62137d1e8f8661f64a622bfbdc7c21e612bf15f17bf31b980bf71da94

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