haproxy-py


Namehaproxy-py JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryHAProxy Data Plane API
upload_time2023-03-20 20:41:21
maintainer
docs_urlNone
author
requires_python
license
keywords swagger haproxy data plane api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            haproxy-py
==========

|Pypi| |MIT licensed| |GitHub Release Date|

API for editing and managing haproxy instances. Provides process
information, configuration management, haproxy stats and logs.

This Python package is automatically generated by the `Swagger
Codegen <https://github.com/swagger-api/swagger-codegen>`__ project:

Requirements.
-------------

Python 2.7 and 3.4+

Installation & Usage
--------------------

pip install
~~~~~~~~~~~

You can install the package via PyPi

.. code:: sh

   pip install haproxy-py

.. or you can install directly from Github

.. code:: sh

   pip install git+https://github.com/Scraps23/haproxy-py.git

(you may need to run ``pip`` with root permission:
``sudo pip install git+https://github.com/Scraps23/haproxy-py.git``)

Then import the package:

.. code:: python

   import dataplaneapi 

Setuptools
~~~~~~~~~~

Install via `Setuptools <http://pypi.python.org/pypi/setuptools>`__.

.. code:: sh

   python setup.py install --user

(or ``sudo python setup.py install haproxy-py`` to install the package
for all users)

Then import the package:

.. code:: python

   import dataplaneapi

Getting Started
---------------

Please follow the `installation procedure <#installation--usage>`__ and
then run the following:

.. code:: python

   from __future__ import print_function
   import time
   import dataplaneapi
   from dataplaneapi.rest import ApiException
   from pprint import pprint
   # Configure HTTP basic authorization: basic_auth
   configuration = dataplaneapi.Configuration()
   configuration.username = 'YOUR_USERNAME'
   configuration.password = 'YOUR_PASSWORD'

   # create an instance of the API class
   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))
   body = dataplaneapi.Acl() # Acl | 
   parent_name = 'parent_name_example' # str | Parent name
   parent_type = 'parent_type_example' # str | Parent type
   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
   version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
   force_reload = False # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to False)

   try:
       # Add a new ACL line
       api_response = api_instance.create_acl(body, parent_name, parent_type, transaction_id=transaction_id, version=version, force_reload=force_reload)
       pprint(api_response)
   except ApiException as e:
       print("Exception when calling ACLApi->create_acl: %s\n" % e)
   # Configure HTTP basic authorization: basic_auth
   configuration = dataplaneapi.Configuration()
   configuration.username = 'YOUR_USERNAME'
   configuration.password = 'YOUR_PASSWORD'

   # create an instance of the API class
   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))
   index = 56 # int | ACL line Index
   parent_name = 'parent_name_example' # str | Parent name
   parent_type = 'parent_type_example' # str | Parent type
   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
   version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
   force_reload = False # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to False)

   try:
       # Delete a ACL line
       api_instance.delete_acl(index, parent_name, parent_type, transaction_id=transaction_id, version=version, force_reload=force_reload)
   except ApiException as e:
       print("Exception when calling ACLApi->delete_acl: %s\n" % e)
   # Configure HTTP basic authorization: basic_auth
   configuration = dataplaneapi.Configuration()
   configuration.username = 'YOUR_USERNAME'
   configuration.password = 'YOUR_PASSWORD'

   # create an instance of the API class
   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))
   index = 56 # int | ACL line Index
   parent_name = 'parent_name_example' # str | Parent name
   parent_type = 'parent_type_example' # str | Parent type
   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)

   try:
       # Return one ACL line
       api_response = api_instance.get_acl(index, parent_name, parent_type, transaction_id=transaction_id)
       pprint(api_response)
   except ApiException as e:
       print("Exception when calling ACLApi->get_acl: %s\n" % e)
   # Configure HTTP basic authorization: basic_auth
   configuration = dataplaneapi.Configuration()
   configuration.username = 'YOUR_USERNAME'
   configuration.password = 'YOUR_PASSWORD'

   # create an instance of the API class
   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))
   parent_name = 'parent_name_example' # str | Parent name
   parent_type = 'parent_type_example' # str | Parent type
   acl_name = 'acl_name_example' # str | ACL name (optional)
   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)

   try:
       # Return an array of all ACL lines
       api_response = api_instance.get_acls(parent_name, parent_type, acl_name=acl_name, transaction_id=transaction_id)
       pprint(api_response)
   except ApiException as e:
       print("Exception when calling ACLApi->get_acls: %s\n" % e)
   # Configure HTTP basic authorization: basic_auth
   configuration = dataplaneapi.Configuration()
   configuration.username = 'YOUR_USERNAME'
   configuration.password = 'YOUR_PASSWORD'

   # create an instance of the API class
   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))
   body = dataplaneapi.Acl() # Acl | 
   parent_name = 'parent_name_example' # str | Parent name
   parent_type = 'parent_type_example' # str | Parent type
   index = 56 # int | ACL line Index
   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)
   version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)
   force_reload = False # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to False)

   try:
       # Replace a ACL line
       api_response = api_instance.replace_acl(body, parent_name, parent_type, index, transaction_id=transaction_id, version=version, force_reload=force_reload)
       pprint(api_response)
   except ApiException as e:
       print("Exception when calling ACLApi->replace_acl: %s\n" % e)

Documentation for API Endpoints
-------------------------------

See the `API Endpoint documentation <dataplaneapi/README.md>`__ for more
details on usage.

.. |Pypi| image:: https://img.shields.io/pypi/v/haproxy-py
   :target: https://pypi.org/project/haproxy-py
.. |MIT licensed| image:: https://img.shields.io/badge/license-MIT-green.svg
   :target: https://raw.githubusercontent.com/Scraps23/haproxy-py/main/LICENSE
.. |GitHub Release Date| image:: https://img.shields.io/github/release-date/Scraps23/haproxy-py
   :target: https://github.com/Scraps23/haproxy-py



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "haproxy-py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Swagger,HAProxy Data Plane API",
    "author": "",
    "author_email": "support@haproxy.com",
    "download_url": "",
    "platform": null,
    "description": "haproxy-py\n==========\n\n|Pypi| |MIT licensed| |GitHub Release Date|\n\nAPI for editing and managing haproxy instances. Provides process\ninformation, configuration management, haproxy stats and logs.\n\nThis Python package is automatically generated by the `Swagger\nCodegen <https://github.com/swagger-api/swagger-codegen>`__ project:\n\nRequirements.\n-------------\n\nPython 2.7 and 3.4+\n\nInstallation & Usage\n--------------------\n\npip install\n~~~~~~~~~~~\n\nYou can install the package via PyPi\n\n.. code:: sh\n\n   pip install haproxy-py\n\n.. or you can install directly from Github\n\n.. code:: sh\n\n   pip install git+https://github.com/Scraps23/haproxy-py.git\n\n(you may need to run ``pip`` with root permission:\n``sudo pip install git+https://github.com/Scraps23/haproxy-py.git``)\n\nThen import the package:\n\n.. code:: python\n\n   import dataplaneapi \n\nSetuptools\n~~~~~~~~~~\n\nInstall via `Setuptools <http://pypi.python.org/pypi/setuptools>`__.\n\n.. code:: sh\n\n   python setup.py install --user\n\n(or ``sudo python setup.py install haproxy-py`` to install the package\nfor all users)\n\nThen import the package:\n\n.. code:: python\n\n   import dataplaneapi\n\nGetting Started\n---------------\n\nPlease follow the `installation procedure <#installation--usage>`__ and\nthen run the following:\n\n.. code:: python\n\n   from __future__ import print_function\n   import time\n   import dataplaneapi\n   from dataplaneapi.rest import ApiException\n   from pprint import pprint\n   # Configure HTTP basic authorization: basic_auth\n   configuration = dataplaneapi.Configuration()\n   configuration.username = 'YOUR_USERNAME'\n   configuration.password = 'YOUR_PASSWORD'\n\n   # create an instance of the API class\n   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))\n   body = dataplaneapi.Acl() # Acl | \n   parent_name = 'parent_name_example' # str | Parent name\n   parent_type = 'parent_type_example' # str | Parent type\n   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)\n   version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)\n   force_reload = False # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to False)\n\n   try:\n       # Add a new ACL line\n       api_response = api_instance.create_acl(body, parent_name, parent_type, transaction_id=transaction_id, version=version, force_reload=force_reload)\n       pprint(api_response)\n   except ApiException as e:\n       print(\"Exception when calling ACLApi->create_acl: %s\\n\" % e)\n   # Configure HTTP basic authorization: basic_auth\n   configuration = dataplaneapi.Configuration()\n   configuration.username = 'YOUR_USERNAME'\n   configuration.password = 'YOUR_PASSWORD'\n\n   # create an instance of the API class\n   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))\n   index = 56 # int | ACL line Index\n   parent_name = 'parent_name_example' # str | Parent name\n   parent_type = 'parent_type_example' # str | Parent type\n   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)\n   version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)\n   force_reload = False # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to False)\n\n   try:\n       # Delete a ACL line\n       api_instance.delete_acl(index, parent_name, parent_type, transaction_id=transaction_id, version=version, force_reload=force_reload)\n   except ApiException as e:\n       print(\"Exception when calling ACLApi->delete_acl: %s\\n\" % e)\n   # Configure HTTP basic authorization: basic_auth\n   configuration = dataplaneapi.Configuration()\n   configuration.username = 'YOUR_USERNAME'\n   configuration.password = 'YOUR_PASSWORD'\n\n   # create an instance of the API class\n   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))\n   index = 56 # int | ACL line Index\n   parent_name = 'parent_name_example' # str | Parent name\n   parent_type = 'parent_type_example' # str | Parent type\n   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)\n\n   try:\n       # Return one ACL line\n       api_response = api_instance.get_acl(index, parent_name, parent_type, transaction_id=transaction_id)\n       pprint(api_response)\n   except ApiException as e:\n       print(\"Exception when calling ACLApi->get_acl: %s\\n\" % e)\n   # Configure HTTP basic authorization: basic_auth\n   configuration = dataplaneapi.Configuration()\n   configuration.username = 'YOUR_USERNAME'\n   configuration.password = 'YOUR_PASSWORD'\n\n   # create an instance of the API class\n   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))\n   parent_name = 'parent_name_example' # str | Parent name\n   parent_type = 'parent_type_example' # str | Parent type\n   acl_name = 'acl_name_example' # str | ACL name (optional)\n   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)\n\n   try:\n       # Return an array of all ACL lines\n       api_response = api_instance.get_acls(parent_name, parent_type, acl_name=acl_name, transaction_id=transaction_id)\n       pprint(api_response)\n   except ApiException as e:\n       print(\"Exception when calling ACLApi->get_acls: %s\\n\" % e)\n   # Configure HTTP basic authorization: basic_auth\n   configuration = dataplaneapi.Configuration()\n   configuration.username = 'YOUR_USERNAME'\n   configuration.password = 'YOUR_PASSWORD'\n\n   # create an instance of the API class\n   api_instance = dataplaneapi.ACLApi(dataplaneapi.ApiClient(configuration))\n   body = dataplaneapi.Acl() # Acl | \n   parent_name = 'parent_name_example' # str | Parent name\n   parent_type = 'parent_type_example' # str | Parent type\n   index = 56 # int | ACL line Index\n   transaction_id = 'transaction_id_example' # str | ID of the transaction where we want to add the operation. Cannot be used when version is specified. (optional)\n   version = 56 # int | Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version. (optional)\n   force_reload = False # bool | If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. (optional) (default to False)\n\n   try:\n       # Replace a ACL line\n       api_response = api_instance.replace_acl(body, parent_name, parent_type, index, transaction_id=transaction_id, version=version, force_reload=force_reload)\n       pprint(api_response)\n   except ApiException as e:\n       print(\"Exception when calling ACLApi->replace_acl: %s\\n\" % e)\n\nDocumentation for API Endpoints\n-------------------------------\n\nSee the `API Endpoint documentation <dataplaneapi/README.md>`__ for more\ndetails on usage.\n\n.. |Pypi| image:: https://img.shields.io/pypi/v/haproxy-py\n   :target: https://pypi.org/project/haproxy-py\n.. |MIT licensed| image:: https://img.shields.io/badge/license-MIT-green.svg\n   :target: https://raw.githubusercontent.com/Scraps23/haproxy-py/main/LICENSE\n.. |GitHub Release Date| image:: https://img.shields.io/github/release-date/Scraps23/haproxy-py\n   :target: https://github.com/Scraps23/haproxy-py\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "HAProxy Data Plane API",
    "version": "0.0.2",
    "split_keywords": [
        "swagger",
        "haproxy data plane api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60e2732cab2e2334f7f113da39543bd99f7fe7590c8687b90c7f51bac9880b3f",
                "md5": "ef6658e0dde1702dde492c49d183d1a8",
                "sha256": "ad8e943e0d10f04ed40eafd2749c874e8594840387706fab93f8fb704b9da8c0"
            },
            "downloads": -1,
            "filename": "haproxy_py-0.0.2-py3.8.egg",
            "has_sig": false,
            "md5_digest": "ef6658e0dde1702dde492c49d183d1a8",
            "packagetype": "bdist_egg",
            "python_version": "3.8",
            "requires_python": null,
            "size": 2105947,
            "upload_time": "2023-03-20T20:41:21",
            "upload_time_iso_8601": "2023-03-20T20:41:21.858916Z",
            "url": "https://files.pythonhosted.org/packages/60/e2/732cab2e2334f7f113da39543bd99f7fe7590c8687b90c7f51bac9880b3f/haproxy_py-0.0.2-py3.8.egg",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c484dd67707d31583aba144e89ec0b398c8245d8c6cfa0be549544aec6ee2466",
                "md5": "d5b57e812577ddcde44e6b96ee3e0733",
                "sha256": "417a68c84ef31df4aaca8d27903405a87cf01e3f5dee5eafc2785e05ae109bb4"
            },
            "downloads": -1,
            "filename": "haproxy_py-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d5b57e812577ddcde44e6b96ee3e0733",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 878238,
            "upload_time": "2023-03-20T20:41:17",
            "upload_time_iso_8601": "2023-03-20T20:41:17.343396Z",
            "url": "https://files.pythonhosted.org/packages/c4/84/dd67707d31583aba144e89ec0b398c8245d8c6cfa0be549544aec6ee2466/haproxy_py-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-20 20:41:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "haproxy-py"
}
        
Elapsed time: 0.08681s