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 FortiSwitch, FortiAP and FortiManager in future releases
  • Simplifies common network automation tasks
  • Supports Python 3.10+

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_address='YOUR_DEVICE_ADDRESS',
    api_key='YOUR_API_KEY',
    verify_ssl=False,
    port=8443 # If non-standard https port
)

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
  • 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.2.tar.gz (19.9 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.2-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fortinet_wrapper-0.2.2.tar.gz
  • Upload date:
  • Size: 19.9 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.2.tar.gz
Algorithm Hash digest
SHA256 3ef2475cbf05f06aa316ba64e20caf9bbf68e42276e6068378e888682493175e
MD5 5e98e3c7676f1b4218990cfd67a90035
BLAKE2b-256 02de7863bd9ab2313e882d685ae12e5438536da9efe5fafef96aca1375865b62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fortinet_wrapper-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2cf6a6afa444095625e1bdbe39dbffbca5e38ee5378313d20ebfc58a79554527
MD5 480cbb4057585e728613248d8029696a
BLAKE2b-256 58c50a2fe6dc70899f81a77eb336448f1b563e1c42140c0e4364832295caf3a1

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