Python SDK for Fortinet products (FortiOS, FortiManager, FortiAnalyzer)
Project description
HFortix
Complete Python SDK for Fortinet products.
Version: 0.4.0-dev1 (Development)
Latest Stable: 0.3.39 (PyPI)
Overview
HFortix is a modular Python SDK for Fortinet products. Starting with v0.4.0, the package is split into focused components for flexible installation.
By default, hfortix installs only the core framework. Use extras to install specific products.
Installation
Complete Installation (All Products)
pip install hfortix[all]
This installs all Fortinet SDKs:
hfortix-core- Shared foundationhfortix-fortios- FortiGate/FortiOS SDK
Minimal Installation (Core Only)
pip install hfortix
This installs only hfortix-core (exceptions, HTTP framework).
Product-Specific Installation
Install only what you need:
# FortiOS only
pip install hfortix[fortios]
# OR
pip install hfortix-fortios # Includes core as dependency
# Core only (for custom implementations)
pip install hfortix-core
Quick Start
from hfortix import FortiOS
# Connect to FortiGate
fgt = FortiOS(
host="192.168.1.99",
token="your-api-token",
verify=False
)
# Get system status
status = fgt.monitor.system.status()
print(f"Hostname: {status['hostname']}")
# Manage firewall policies
policies = fgt.firewall.policy.get()
# Use convenience wrappers (v0.3.39+)
fgt.firewall.service_custom.create(
name="HTTPS-8443",
tcp_portrange="8443",
protocol="TCP/UDP/SCTP"
)
Package Structure
- hfortix (this package) - Meta-package for convenient installation
- hfortix-core - Shared exceptions, HTTP client framework, utilities
- hfortix-fortios - FortiOS/FortiGate API client with 750+ endpoints
- hfortix-fortimanager - (Coming soon)
- hfortix-fortianalyzer - (Coming soon)
Features
Complete API Coverage (v0.3.39)
- FortiOS 7.6.5: 750+ endpoints across 77 categories
- CMDB API: 100% coverage (500+ endpoints)
- Monitor API: 100% coverage (200+ endpoints)
- Convenience Wrappers: Service management, schedules, traffic shaping, IP/MAC binding
Modular Architecture (v0.4.0.dev1)
- Install only what you need
- Shared core framework for all Fortinet products
- 100% backward compatible with v0.3.x
Documentation
See the main repository for complete documentation:
Requirements
- Python 3.10+
License
Proprietary - See LICENSE file
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hfortix-0.4.0.dev1.tar.gz.
File metadata
- Download URL: hfortix-0.4.0.dev1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b01027da740186084e394880d09460d5752f4a617b51da3d6ee009c81a1d6f3
|
|
| MD5 |
a328707ff395ce3ad79490b53fce4ff7
|
|
| BLAKE2b-256 |
a87e7b9132d2ad981bdccfb8ce6abee9d3dd91647676a8686b959bf41fe96f32
|
File details
Details for the file hfortix-0.4.0.dev1-py3-none-any.whl.
File metadata
- Download URL: hfortix-0.4.0.dev1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d17ce4c917c3dceaa5b7760028c85c0681c1bc31db4e3545227040065af9420
|
|
| MD5 |
373a687e17ac41d957ff671046e56d4d
|
|
| BLAKE2b-256 |
26662b2097d70b724cf45c0b282cbf46b939a9e8bf2541bef58e1b3506228623
|