This project has been archived by its maintainers, and is no longer receiving any updates.
haproxy-py
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 project:
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
You can install the package via PyPi
pip install haproxy-py
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:
import dataplaneapi
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install haproxy-py to install the package for all users)
Then import the package:
import dataplaneapi
Getting Started
Please follow the installation procedure and then run the following:
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 for more details on usage.
Metadata
Release files for haproxy-py 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| haproxy_py-0.0.2-py3.8.egg | Legacy Egg format | - | - | Details for haproxy_py-0.0.2-py3.8.egg |
| haproxy_py-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for haproxy_py-0.0.2-py3-none-any.whl |
Total release size: 3.0 MB
Release files / haproxy_py-0.0.2-py3.8.egg
| Download URL | haproxy_py-0.0.2-py3.8.egg |
|---|---|
| Size | 2.1 MB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
ad8e943e0d10f04ed40eafd2749c874e8594840387706fab93f8fb704b9da8c0
|
|
BLAKE2b-256 checksum How to use checksums |
60e2732cab2e2334f7f113da39543bd99f7fe7590c8687b90c7f51bac9880b3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.28.2 setuptools/62.0.0 requests-toolbelt/0.10.1 tqdm/4.30.0 CPython/3.8.10
|
Release files / haproxy_py-0.0.2-py3-none-any.whl
| Download URL | haproxy_py-0.0.2-py3-none-any.whl |
|---|---|
| Size | 878.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
417a68c84ef31df4aaca8d27903405a87cf01e3f5dee5eafc2785e05ae109bb4
|
|
BLAKE2b-256 checksum How to use checksums |
c484dd67707d31583aba144e89ec0b398c8245d8c6cfa0be549544aec6ee2466
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.28.2 setuptools/62.0.0 requests-toolbelt/0.10.1 tqdm/4.30.0 CPython/3.8.10
|
Security for haproxy-py 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.