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.2.1.tar.gz (18.3 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.2.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fortinet_wrapper-0.2.1.tar.gz
  • Upload date:
  • Size: 18.3 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.2.1.tar.gz
Algorithm Hash digest
SHA256 66681fb6b9cf92638fc9d652670402ae47b6ae51d407d406b064641cab2472fa
MD5 5e85a4fa269724446b0d7f0bb5728e5f
BLAKE2b-256 f7f3d84734471eec97eef5175c43c36da7fb4e8594a142cf3e9dc8c93eb34952

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fortinet_wrapper-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc63ef5c23b702accb95d883b15d8064083c20bcc6e00bc6dccd0ccf1955d0c9
MD5 d9ec690bdd7b16e48661d21c797da24a
BLAKE2b-256 e066c2d26694bd2a89b7ebbdf3362ff3077b1f5782f29d4b4b2c734f455aad14

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