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: wrap data_source clients #80

Open
Itaykal opened this issue Mar 30, 2023 · 2 comments
Open

Suggestion: wrap data_source clients #80

Itaykal opened this issue Mar 30, 2023 · 2 comments

Comments

@Itaykal
Copy link
Contributor

Itaykal commented Mar 30, 2023

Using SDKs and official APIs is nice and very easy to read/implement/maintain, but when using requests I think wrapping those requests in a client could make life easier on future changes.
Same goes to the official APIs and SDKs but those are much less of a pain when reading the code itself.

Creating a client.py file or data_class/client folder seems right for me, Ideally when something changes in the API itself you'd want your code to work properly, when you wrap it up in your own class you need to change much less code in the data source itself and only touch the client side.

As for making the code safer - adding this folder could be a nice place to start writing tests and mocks for each client but that's a whole other topic.

@Itaykal Itaykal changed the title Suggestion: wrap clients in as client.py Suggestion: wrap data_source clients Mar 30, 2023
@Roey7
Copy link
Contributor

Roey7 commented Mar 30, 2023

Good vision @Itaykal , wanna do it?

@Itaykal
Copy link
Contributor Author

Itaykal commented Mar 30, 2023

I could, it will take me some time as I'm not sure how much available I'll be in the next few weeks

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