Skip to content

Unable to use retries and timeout in OpaClient #29

@TheRealHaoLiu

Description

@TheRealHaoLiu

Example:

>>> from opa_client import OpaClient
>>> OpaClient(
...     host='localhost',
...     port=5000,
...     timeout=10.0,
...     retries=5,
... )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/haoli/.pyenv/versions/tower-release_4.6/lib/python3.11/site-packages/opa_client/opa.py", line 43, in __init__
    super().__init__(*args, **kwargs)
TypeError: BaseClient.__init__() got an unexpected keyword argument 'retries'

Further more it seems that in the BaseClient.init() self.timeout and self.retries are being hardcoded https://github.com/Turall/OPA-python-client/blob/master/opa_client/base.py#L44-L45

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions