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

suggestion regarding async #55

Open
dearkafka opened this issue Apr 23, 2023 · 3 comments
Open

suggestion regarding async #55

dearkafka opened this issue Apr 23, 2023 · 3 comments

Comments

@dearkafka
Copy link

dearkafka commented Apr 23, 2023

Hi! I've been using simple-rest-client for https://github.com/dearkafka/woot and I liked the logic so far, but I just hacked it a little bit for better __repr__ and stuff. But I was thinking that maybe how async is currently made is not the best way? the thing is right now async client will be closed every time and that means that user need to re-init presumable the whole class of api with resource, right? that does not sound so great, also sync logic allows to be re-used easily. I hacked this too in my repo but thats not so elegant since I wanted to avoid redefining your own code (https://github.com/dearkafka/woot/blob/aebb9d5051fe73101e0ab01ac335d12aa044160d/woot/resources.py#L137)

what do you think about this issue?

@dearkafka
Copy link
Author

dearkafka commented Apr 23, 2023

so, to be precise, I dont have a PR or solution right away as Im not sure myself how to tackle it best. But I noticed that I cant even use different actions inside 1 resource, so I made a client for every action call. that presumably also not so great.

@allisson
Copy link
Owner

allisson commented Oct 3, 2023

@dearkafka Hello, I think this problem was fixed in version 1.2.0, now async can be re-used (#56).

@dearkafka
Copy link
Author

yes, I believe it is

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

2 participants