Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep alive #432

Merged
merged 7 commits into from
Mar 11, 2024
Merged

Keep alive #432

merged 7 commits into from
Mar 11, 2024

Conversation

InnocentBug
Copy link
Collaborator

Description

This implements the use of a session object for connecting with the API.
This should stream line better if a large number of requests is made.

With the capsulated requests and the previous connect and disconnect methods this is really easy to implement.

Changes

Known Issues

Unfortunately, it does not resolve the problems, we have with bigsmiles search.

Notes

Merge after #430 and #431.

Checklist

  • My name is on the list of contributors (CONTRIBUTORS.md) in the pull request source branch.
  • I have updated the documentation to reflect my changes.
  • My code changes have been verified by automated tests and pass all relevant test scenarios.

@InnocentBug InnocentBug requested a review from brili February 28, 2024 00:52
@InnocentBug InnocentBug self-assigned this Feb 28, 2024
Copy link

trunk-io bot commented Feb 28, 2024

Merging to develop in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@InnocentBug InnocentBug requested a review from duboyal February 28, 2024 20:22
@InnocentBug InnocentBug marked this pull request as ready for review February 28, 2024 20:23
self._api_request_session = requests.Session()
# add Bearer to token for HTTP requests
self._api_request_session.headers = {"Authorization": f"Bearer {self._api_token}", "Content-Type": "application/json"}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@InnocentBug InnocentBug mentioned this pull request Feb 28, 2024
3 tasks
@InnocentBug InnocentBug requested a review from duboyal March 11, 2024 14:22
@InnocentBug InnocentBug requested a review from Ardi028 March 11, 2024 19:23
@InnocentBug InnocentBug merged commit e3b76bb into develop Mar 11, 2024
13 checks passed
@InnocentBug InnocentBug deleted the keep-alive branch March 11, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants