fortilib-0.1.6
توضیحات
fortilib - a Python Library to interact with Fortigate Firewalls
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fortilib-0.1.6 |
| نام | fortilib |
| نسخه کتابخانه | 0.1.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Daniel Zinke |
| ایمیل نویسنده | Daniel.Zinke@t-systems.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/fortilib/ |
| مجوز | - |
# fortilib - a Python Library to interact with Fortigate Firewalls
This Python module contains the ability to get and configure following object on [Fortigate Firewalls](https://www.fortinet.com/products/next-generation-firewall):
* Addresses
* Address Groups
* Interfaces
* IPPools
* Policies
* Proxy Addresses
* Proxy Address Groups
* Proxy Policies
* Routes
* Services
* Service Groups
* Vips
* Vip Groups
## Installation
Python >= 3.8 is required.
Dependencies:
* [httpx](https://www.python-httpx.org/)
Simply install fortilib via pip:
```
> pip install fortilib
```
## Quickstart
```python
import ipaddress
from fortilib.firewall import FortigateFirewall
from fortilib.fortigateapi import FortigateFirewallApi
from fortilib.address import FortigateIpMask
api = FortigateFirewallApi(
"127.0.0.1", # firewall ip
"username",
"password",
"vdom", # use "root" if you dont have vdoms activated
)
firewall = FortigateFirewall("fw01", api)
firewall.login()
# load all objects from fortigate
firewall.get_all_objects()
# create an firewall address
address = FortigateIpMask()
address.name = "Test Address"
address.subnet = ipaddress.ip_network("127.0.0.1/32")
# add object to firewall
firewall.create_firewall_address(address)
# print all addresses on firewall
for address in firewall.addresses:
print(address.name)
```
## Contributing
See [Contributing](CONTRIBUTING.md).
## License
GPLv3
نیازمندی
| مقدار | نام |
|---|---|
| >=0.23.0 | httpx |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl fortilib-0.1.6:
pip install fortilib-0.1.6.whl
نصب پکیج tar.gz fortilib-0.1.6:
pip install fortilib-0.1.6.tar.gz