https://github.com/paloaltonetworks/autofocus-client-library
A python client library for interfacing with the autofocus rest services
https://github.com/paloaltonetworks/autofocus-client-library
Last synced: 5 months ago
JSON representation
A python client library for interfacing with the autofocus rest services
- Host: GitHub
- URL: https://github.com/paloaltonetworks/autofocus-client-library
- Owner: PaloAltoNetworks
- License: other
- Created: 2015-10-02T15:51:49.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-06-18T15:24:43.000Z (over 4 years ago)
- Last Synced: 2025-04-14T16:08:38.505Z (6 months ago)
- Language: Python
- Size: 616 KB
- Stars: 19
- Watchers: 39
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# AutoFocus Client Library
## Python Compatibility
Python2 is end of life as of January 2020. We've converted this library to be compatibly with python3 only. If you need the python2 version of this library, you can install from the `python-2` tag as follows:
`git checkout tags/python-2; python setup install`If you try to install this version in python2, you'll get an error about requirements not being satisfied.
## Install
```
pip install autofocus-client-library
```or
```
sudo ./setup.py install
```### Config File
Remember to create the file `~/.config/panw` and add the following section to it (note the lack of spaces and quotes)```
[autofocus]
apikey=your-af-api-key-goes-here# whether or not warning log level is displayed
# ignore_warnings = false# disable ssl verification (not recommended unless debugging SSL/CA issues)
# ssl_verify = true# uses default requests ca bundle by default, can override here by specifying path
# ssl_cert =
```If you write a script that isn't being run by your user, you can always manually set the API key via the following
```
from autofocus import AutoFocusAPI
AutoFocusAPI.api_key = "Your AF API Key Here"
```## Examples
Should add some basic examples here, but most can be found in [examples](examples/)