Skip to main content

Fortinet Wrapper is a Python wrapper for the FortiOS API.

Project description

Fortiner Wrapper

Fortinet Wrapper is a Python wrapper for the FortiOS API, designed to simplify automation and integration with Fortinet devices. It provides a clean, Pythonic interface to interact with FortiGate firewalls.

Disclaimer

This project is an independent, community-developed Python wrapper for Fortinet APIs. It is not affiliated with, maintained by, or endorsed by Fortinet, Inc.

All product names, logos, and trademarks used in this project are the property of their respective owners. "Fortinet", "FortiGate", and other associated names are trademarks or registered trademarks of Fortinet, Inc., used here solely for descriptive and interoperability purposes under fair use.

Please note

This project is a Work In Progress. Please check back regularly for updates.

Features

  • Access and retrieve FortiOS device config via API
  • Designed for easy extension to support FortiManager, FortiSwitch, and FortiAnalyzer in future releases
  • Simplifies common network automation tasks
  • Supports Python 3.6+

Installation

Clone this GitHub Repo. In future release:

pip install fortinet_wrapper

Usage

Basic example:

from fortiner_wrapper import fortios
import json

fgt = fortios.FortiOS(
    base_url='https://YOUR_DEVICE_URL',
    api_key='YOUR_API_KEY',
    version=fortios.FortiOSVersion.FORTIOS_7_2, # Currently just a placeholder
    verify_ssl=False,
    get_global=True
)

global_config = fgt.system_global

print(fgt.serial) # Serial number of the device
print(fgt.hostname) # Hostname of the device
print(fgt.version)  # FortiOS version of the device

interfaces = fgt.interface() # Get all interfaces
interfaces = fgt.interface(name='port1') # Get specific interface by name

Roadmap

  • Add configuration PUT methods
  • Add FortiManager API support
  • Add FortiSwitch API support
  • Add FortiAnalyzer API support
  • Improved error handling and logging

Contributing

Contributions and suggestions are welcome! Please open issues or pull requests.

License

This project is licensed under the GNU/GPL License. See the LICENSE file for details.


© 2025 HBNet Networks

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fortinet_wrapper-0.1.1.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

fortinet_wrapper-0.1.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file fortinet_wrapper-0.1.1.tar.gz.

File metadata

  • Download URL: fortinet_wrapper-0.1.1.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for fortinet_wrapper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5550a9d219f0da105810738c1ebdd2db513ead5d1e0cbec0cc1f793aec773fe3
MD5 243bda96756dac09473bc7e4a33fdfd0
BLAKE2b-256 0de452d16d4415236095f9e8871808843312713ee5205ac8af6987006c2b21eb

See more details on using hashes here.

File details

Details for the file fortinet_wrapper-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fortinet_wrapper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 11679c2b22f58c21a6e3badbe2afa302385b32bea3826704f4daaa6361a54fe7
MD5 14fac217e368b179dd428f2872451dc1
BLAKE2b-256 cea47be033894d390c33d3f5899558e979825633543d50d1e75037fa164173ef

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