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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fortinet_wrapper-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1b74e833fd50047eac8f0591a1a8fadb7d61a34b2524f3b765f35f0b4e4fe59e
MD5 feedc5909cf155429430bf8b19535d11
BLAKE2b-256 746938e6b382e265a9518827da85050896d1b83a84f0f417107bfb4b2bf40019

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fortinet_wrapper-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a643d645dd26c05329fb39006e9e7566468a7c57e4c7f280dcb9cf922374a4e
MD5 be6adfd9ec8e0d93280e8e9d7922008e
BLAKE2b-256 1695b5caebac56d79e9d8c4cf3eaada6cb9e077184b6856688af845d27a801c5

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