The `f5-icontrol-rest` Python library simplifies interaction with the F5 BIG-IP iControl REST API. It manages HTTP sessions (leveraging `requests.Session`), handles URI validation, and provides integrated logging. This generic library is used by other F5 SDKs and projects for programmatic communication with BIG-IP and BIG-IQ devices via the REST API. [1, 4, 5, 7] As of version 1.3.13, the project's GitHub repository is archived and no longer maintained.
pip install f5-icontrol-restVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to establish a session with an F5 BIG-IP device using `iControlRESTSession` and perform a basic GET request to retrieve LTM NAT objects. Ensure to replace placeholder credentials and host with actual values, preferably using environment variables for security. It disables SSL verification for simplicity, which should be avoided in production environments. [1, 5]
Evaluate migration to actively developed F5 SDKs (e.g., `f5-sdk` or `bigrest`) for long-term project stability and security. [5, 7, 19]
Implement pagination for requests returning large datasets using OData `$skip` and `$top` query parameters in your API calls (e.g., `?%24skip=0&%24top=100`). [5]
On the BIG-IP device, consider deleting all current tokens (`restcurl -X DELETE /shared/authz/tokens`), increasing management and REST daemon memory, or restarting the `restjavad` service during a maintenance window. [8, 12]
For versions older than 1.3.13, explicitly pass the `proxies` dictionary to each method call. For 1.3.13 and newer, it can be passed during `iControlRESTSession` instantiation for global proxy configuration.
Ensure `urllib3` is compatible with the `requests` version installed. If encountering issues, try reinstalling `requests` to pull a compatible `urllib3` version, or explicitly align `urllib3` version with `requests`' requirements.