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.0.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.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fortinet_wrapper-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 14c1062c1f115c4fd8ee5ba790ade458c7b68d9fd71270a53fd1bc85d650be45
MD5 6b2858e22259bf2b280c9a391879f0df
BLAKE2b-256 dc18099127cb2e89996f12c3eb28c9ee08bb7f81ec67513e2142dd6814a2be40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fortinet_wrapper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c83a46489bd19860feabf13ae5f32da065e05f06b73dd43375dcb3372c78f33
MD5 2f146ad4cd514195320f29667abfca7b
BLAKE2b-256 a5222e3baf25eb08988b399c20976ae8eea162a238966cdeb5a289f32056529d

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