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

Please re-work examples to not use deprecated set_socket #128

Closed
jepler opened this issue Mar 2, 2023 · 7 comments
Closed

Please re-work examples to not use deprecated set_socket #128

jepler opened this issue Mar 2, 2023 · 7 comments
Assignees

Comments

@jepler
Copy link
Member

jepler commented Mar 2, 2023

No description provided.

@hauserkristof
Copy link

Hey @jepler !

Can you help me please, that what is the current correct usage instead of set_socket ?

Thank you!

@jepler
Copy link
Member Author

jepler commented Jul 25, 2023

Roughly, instead of

import adafruit_requests as requests
requests.set_socket(...)
requests.get(...)

the new structure is

import adafruit_requests
requests = adafruit_requests.Session(...)
requests.get(...)

however, I'm not sure that this will actually work for esp32spi-based boards ("airlift"). I've asked @FoamyGuy via discord about it.

@toxicantidote
Copy link

For anyone who finds this while Googling how to use this library like I did, check out this Adafruit tutorial for a more specific, working example.

@justmobilize
Copy link
Collaborator

I am working through a refactor for requests and once that is done, will be updating and testing all the examples

@justmobilize
Copy link
Collaborator

All examples in #151 have been updated to use adafruit_requests.Session and os.getenv

@justmobilize
Copy link
Collaborator

@jepler #151 is merged. Are the changes sufficient to close this?

@anecdata
Copy link
Member

I think jepler is out. Closing due to merge of #151.

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

No branches or pull requests

5 participants