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
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
- hfortix-core - Core HTTP client
- hfortix-fortios - FortiOS automation
💬 Support
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.5.161.tar.gz.
File metadata
- Download URL: hfortix-0.5.161.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd424d7bb8daf6e36903e656b62afbd0fdc1108b5e2686f22c67e54ac8eb07c1
|
|
| MD5 |
9e22203adba04bcf53cdf317a6ae480e
|
|
| BLAKE2b-256 |
d7dfcaec503e12f3d3b36909f4f1676b27b17b0dd9bc875284f46fbb3e29fa48
|
File details
Details for the file hfortix-0.5.161-py3-none-any.whl.
File metadata
- Download URL: hfortix-0.5.161-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18d7fd3e172ada8fc420e96ed70f7c27771004b9001aca61c9a5469572c5665c
|
|
| MD5 |
351b75ce095be09fb8e4e170d1f191f3
|
|
| BLAKE2b-256 |
65b6b75988c63d1911720d577590ac7e18a25c462cbc981ed930ffa0ac95c9b2
|