{"id":18798759,"url":"https://github.com/f5networks/f5-common-python","last_synced_at":"2025-05-16T06:06:57.937Z","repository":{"id":43583868,"uuid":"45062555","full_name":"F5Networks/f5-common-python","owner":"F5Networks","description":"Python SDK for configuration and monitoring of F5® BIG-IP® devices via the iControl® REST API.","archived":false,"fork":false,"pushed_at":"2023-10-09T10:02:57.000Z","size":2772,"stargazers_count":261,"open_issues_count":106,"forks_count":132,"subscribers_count":68,"default_branch":"development","last_synced_at":"2025-05-16T06:06:52.212Z","etag":null,"topics":["f5sdk"],"latest_commit_sha":null,"homepage":"https://f5-sdk.readthedocs.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/F5Networks.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-10-27T18:48:06.000Z","updated_at":"2025-01-02T08:59:49.000Z","dependencies_parsed_at":"2024-04-18T03:45:01.612Z","dependency_job_id":"54e0f3dc-3567-4cdc-8d55-94c9c181ee31","html_url":"https://github.com/F5Networks/f5-common-python","commit_stats":{"total_commits":972,"total_committers":45,"mean_commits":21.6,"dds":0.7746913580246914,"last_synced_commit":"3050df0079c2426af99b9a1b8f93d0b512468ff4"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/F5Networks%2Ff5-common-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/F5Networks%2Ff5-common-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/F5Networks%2Ff5-common-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/F5Networks%2Ff5-common-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/F5Networks","download_url":"https://codeload.github.com/F5Networks/f5-common-python/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478190,"owners_count":22077676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["f5sdk"],"created_at":"2024-11-07T22:12:54.694Z","updated_at":"2025-05-16T06:06:52.928Z","avatar_url":"https://github.com/F5Networks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"f5-common-python\n================\n\n|Build Status| |Docs Build Status| |slack badge|\n\nNO LONGER UNDER ACTIVE DEVELOPMENT\n----------------------------------\nNOTICE: This project is no longer under active development. F5 may still use\ninternally for other project(s) but is no longer maintaining it publicly.\n\nIntroduction\n------------\nThis project implements an SDK for the iControl® REST interface for BIG-IP®.\nUse this library to use python to automate a BIG-IP® via its REST API.\n\nDocumentation\n-------------\nPlease see the project documentation on Read the Docs: http://f5-sdk.readthedocs.io.\n\nInstallation\n------------\n\n.. code:: shell\n\n    $ pip install f5-sdk\n\n.. note::\n\n    If you are using a pre-release version you must use the ``--pre``\n    option for the ``pip`` command.\n\nUsage\n-----\n\n.. code:: python\n\n    from f5.bigip import ManagementRoot\n\n    # Connect to the BIG-IP\n    mgmt = ManagementRoot(\"bigip.example.com\", \"admin\", \"somepassword\")\n\n    # Get a list of all pools on the BigIP and print their name and their\n    # members' name\n    pools = mgmt.tm.ltm.pools.get_collection()\n    for pool in pools:\n        print pool.name\n        for member in pool.members_s.get_collection():\n            print member.name\n\n    # Create a new pool on the BigIP\n    mypool = mgmt.tm.ltm.pools.pool.create(name='mypool', partition='Common')\n\n    # Load an existing pool and update its description\n    pool_a = mgmt.tm.ltm.pools.pool.load(name='mypool', partition='Common')\n    pool_a.description = \"New description\"\n    pool_a.update()\n\n    # Delete a pool if it exists\n    if mgmt.tm.ltm.pools.pool.exists(name='mypool', partition='Common'):\n        pool_b = mgmt.tm.ltm.pools.pool.load(name='mypool', partition='Common')\n        pool_b.delete()\n\nDesign Patterns\n~~~~~~~~~~~~~~~\n\nI intend the SDK to be easy to use and easy to hack.  These overarching goals\nhave a strong influence on my thinking when I am reviewing contributions, this\nmeans it is in their own interest that I make them as explicit as possible!\n\nThe original interface specification was given to me by Shawn Wormke, who I\nbelieve was influenced by the Jira and Django projects.  At the time I was\nreading Brett Slatkin's 'Effective Python', and I tried to follow its advice\nwhere possible.\n\nList of Patterns For Contributing Developers\n--------------------------------------------\n\n#. Hack this list to make it more correct/complete\n    For list additions assign @zancas as the PR reviewer.\n#. The call operator ``()`` means: \"Try to communicate with the device.\"\n    This is a strong contract we offer the consumer of the SDK. If an SDK\n    function is invoked with the call operator ``()`` the program is initiating\n    a communication with the device.  That communication may fail before\n    reaching the wire, but it has nonetheless been initiated.  Conversely, if\n    an SDK user evaluates an SDK expression that *DOES NOT* invoke the ``()``\n    call operator, then the SDK does *NOT* initiate a communication with the\n    device.  Any extension to the SDK that is not consistent with this contract\n    is unlikely to be incorporated into the supported repository.\n#. The SDK is stupid\n    The SDK doesn't decide things for the consumer, it's\n    simply an interface so that Python programs can manipulate device resources\n    without implementing custom URI/HTTP/network logic.  Implications:\n\n   #. NO DEFAULTS\n       The consumers of this library are themselves Python\n       programs.  The Application programmer must say what they mean in their\n       SDK-using program.  It violates a critical separation of concerns to add\n       default values to the SDK.  Don't do it!  (Unless you have a good\n       reason.)\n   #. Failures generate exceptions  \n       If the SDK enters a surprising or\n       unexpected state it raises an exception.  That's it.  It's not generally\n       up to the SDK to implement decision logic that handles edge-cases..\n       EXCEPT where the SDK is smoothing known issues in the device REST\n       server. (See below.)  \n   #. The SDK never interprets responses\n       It just records whatever response\n       the device returns as attributes of the relevant object. (Except where\n       handling significant inconsistencies in the device interface.)\n\n#. public-nonpublic pairs\n    e.g. 'create' and '_create' XXX add content here.\n#. Handle known issues in the device REST server.\n    The SDK intends to provide\n    a rational interface to consumers that does the right thing.  This means\n    that one case where it does NOT simply do the stupid thing is when it\n    handles a known idiosyncrasy in the device REST server.  For example, some?\n    resources ignore 'disable' and 'enable' configuration options when they are\n    set to 'False'. Rather than force a consumer to learn about this quirk in\n    the server, the SDK guesses that '\"disable\": False' means '\"enable\": True'\n    , and submits that value on the consumers behalf.\n#. Implement-Reimplement-Abstract\n    Solve the problem concretely and simply, if\n    the same problem arises again, solve it concretely, then take the two\n    concrete solutions and use them as your specification to generate an\n    abstraction. In the SDK this usually goes something like this:\n\n   #. Add logic to a concrete subclass\n   #. Add similar logic to another concrete subclass\n   #. Create a new method in a mixin or Abstract 'resource.py' base class and\n      have both concrete subclasses inherit and use that method.\n  \n\nSubmodules\n~~~~~~~~~~\n\nbigip\n^^^^^\nPython API for configuring objects on a BIG-IP® device and gathering information\nfrom the device via the REST API.\n\nFiling Issues\n-------------\nSee the Issues section of `Contributing \u003cCONTRIBUTING.md\u003e`__.\n\nContributing\n------------\nSee `Contributing \u003cCONTRIBUTING.md\u003e`__\n\nTest\n----\nBefore you open a pull request, your code must have passing\n`pytest \u003chttp://pytest.org\u003e`__ unit tests. In addition, you should\ninclude a set of functional tests written to use a real BIG-IP device\nfor testing. Information on how to run our set of tests is included\nbelow.\n\nUnit Tests\n~~~~~~~~~~\nWe use pytest for our unit tests.\n\n#. If you haven't already, install the required test packages listed in\n   requirements.test.txt in your virtual environment.\n\n   .. code:: shell\n\n       $ pip install -r requirements.test.txt\n\n#. Run the tests and produce a coverage report. The ``--cov-report=html`` will\n   create a ``htmlcov/`` directory that you can view in your browser to see the\n   missing lines of code.\n\n   .. code:: shell\n\n       py.test --cov ./icontrol --cov-report=html\n       open htmlcov/index.html\n\n\nStyle Checks\n~~~~~~~~~~~~\nWe use the hacking module for our style checks (installed as part of step 1 in\nthe Unit Test section).\n\n.. code:: shell\n\n    $ flake8 ./\n\nCopyright\n---------\nCopyright 2014-2016 F5 Networks Inc.\n\n\nLicense\n-------\n\nApache V2.0\n~~~~~~~~~~~\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and limitations\nunder the License.\n\nContributor License Agreement\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIndividuals or business entities who contribute to this project must have\ncompleted and submitted the `F5 Contributor License Agreement\n\u003chttp://f5-openstack-docs.readthedocs.org/en/latest/cla_landing.html\u003e`__\nto Openstack_CLA@f5.com prior to their code submission being included in this\nproject.\n\n.. |Build Status| image:: https://travis-ci.org/F5Networks/f5-common-python.svg?branch=0.1\n    :target: https://travis-ci.org/F5Networks/f5-common-python\n    :alt: Build Status\n\n.. |Docs Build Status| image:: http://readthedocs.org/projects/f5-sdk/badge/?version=latest\n    :target: http://f5-sdk.readthedocs.org/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. |slack badge| image:: https://f5-openstack-slack.herokuapp.com/badge.svg\n    :target: https://f5-openstack-slack.herokuapp.com/\n    :alt: Slack\n\n.. |coveralls| image:: https://coveralls.io/repos/github/F5Networks/f5-common-python/badge.svg\n    :target: https://coveralls.io/github/F5Networks/f5-common-python\n    :alt: Coveralls\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff5networks%2Ff5-common-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff5networks%2Ff5-common-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff5networks%2Ff5-common-python/lists"}