#nachofranco14-python
1 messages ยท Page 1 of 1 (latest)
@chilly abyss hi! right now no, not in stripe-python โ it's something we want to support in future though but for now the API calls are blocking (https://github.com/stripe/stripe-python/issues/715#issuecomment-794881701)
And is there a way to use the api directly? (By bypassing the lib) or the API is not async and that's it?
well you could write your own equivalent of the library to make the underlying HTTP calls if you wish and wrap that in the python equivalent of Promises and so on, but it's likely a lot of work
๐ฆ
the API is just HTTP, the requests take time. In our library it just blocks (you call stripe.customers.create) and when the underlying network request finishes, execution moves to the next line; it could return a Promise or equivalent(I'm not too familiar with async programming in Python) which lets the code continue to the next line and then resolves later when the HTTP call completes, it doesn't right now but that's what the issue is for!
Hey @nocturne basin, where can I see the endpoints of the api?
does https://stripe.com/docs/api/customers/list?lang=curl show you what you're looking for? (the raw endpoints)
thanks!
I do highly recommend against directly calling the HTTP endpoints yourself if possible, since you're adding a lot of work and developer time to your payments integration when you could use our library. You'll likely run into issues converting complex API calls into the required x-www-form-urlencoded formats for example if you go down that route