[Python] How to set request timeout for pyodata

Discussão em 'Python' iniciado por Stack, Novembro 29, 2024.

  1. Stack

    Stack Membro Participativo

    I have a pyodata client and send some requests to this backend.

    Apparently something has changed on the other end and now some requests timeout. How can I react/abort these OData requests? I searched the documentation, there is nothing on timeouts.

    Or do I need to use another library for that?

    My code:

    odata_session = requests.Session()
    odata_session.auth = (
    settings.connections.username,
    settings.connections.password.get_secret_value(),
    )

    client = pyodata.Client(service_url, odata_session)

    result = client.get_calculation().execute()

    Continue reading...

Compartilhe esta Página