Open fcfort opened 2 years ago
The code is using requests.get directly without creating a session (https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) which results in no HTTP Keep-Alive or connection pooling. This means the API client is creating and tearing down a TCP connection for each request, potentially resulting in worse performance for users of the client. See https://github.com/flair-systems/flair-api-client-py/blob/d928840eab96eb80c9c5069ddf64e6841a0e2f60/flair_api/client.py#L191
requests.get
The code is using
requests.get
directly without creating a session (https://requests.readthedocs.io/en/latest/user/advanced/#session-objects) which results in no HTTP Keep-Alive or connection pooling. This means the API client is creating and tearing down a TCP connection for each request, potentially resulting in worse performance for users of the client. See https://github.com/flair-systems/flair-api-client-py/blob/d928840eab96eb80c9c5069ddf64e6841a0e2f60/flair_api/client.py#L191