You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It’d be helpful if the README had info on the response object type and handling error responses. It seems that trying it in a Python REPL is the best way, but it’s still unexpected that they’re both objects with attributes and dicts.
Response type:
If the response is a success, then the response is always an instance of stripe.stripe_object.StripeObject or the subclass stripe.api_resources.list_object.ListObject, which is a dict or list matching the response body, but it has a couple other bells and whistles, including the ability to access and set values via attributes (instead of dictionary item lookup). It’s possible I have a blind spot in the reading the docs, but I don’t see this explained in the Python API docs.
Error handling:
This one is covered really well in the sample code in the Python API docs “Handling Errors” section, but a little redundancy having it in the README (or just a clear deep-link to that section in the docs) would be nice.
I think this would help people feel more confident using the library. Regardless, thanks for providing this and keep up the great work with the client and API!
@mrcoles Sorry for the delays here and thank you for providing detailed feedback! We definitely could improve the readme to make it clearer how to use stripe-python directly! We'll work on it next week :)
It’d be helpful if the README had info on the response object type and handling error responses. It seems that trying it in a Python REPL is the best way, but it’s still unexpected that they’re both objects with attributes and dicts.
Response type:
If the response is a success, then the response is always an instance of
stripe.stripe_object.StripeObject
or the subclassstripe.api_resources.list_object.ListObject
, which is a dict or list matching the response body, but it has a couple other bells and whistles, including the ability to access and set values via attributes (instead of dictionary item lookup). It’s possible I have a blind spot in the reading the docs, but I don’t see this explained in the Python API docs.Error handling:
This one is covered really well in the sample code in the Python API docs “Handling Errors” section, but a little redundancy having it in the README (or just a clear deep-link to that section in the docs) would be nice.
I think this would help people feel more confident using the library. Regardless, thanks for providing this and keep up the great work with the client and API!
Loosely related issues:
The text was updated successfully, but these errors were encountered: