Welcome to pyFG’s documentation!

This library does not pretend to hide or abstract FortiOS configuration. Its sole purpose is to give you a a programmatic way to read it and modify it. To be able to use you will still need to understand how the CLI works.

There are two main libraries:

  • FortiOS – This is the main library you will use. It allows you to connect to a device,
    read its configuration, it provides an interface to the running and the candidate config and provides diff and commit operations amongst others.
  • FortiConfig – This library represents a block of configuration. You will usually
    deal with this just to create new objects (like a new firewall policy) or just via the attribures running_config and candidate_config in a FortiOS object.