#nachofranco14-python

1 messages ยท Page 1 of 1 (latest)

nocturne basin
chilly abyss
#

And is there a way to use the api directly? (By bypassing the lib) or the API is not async and that's it?

nocturne basin
#

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

chilly abyss
#

๐Ÿ˜ฆ

nocturne basin
#

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!

chilly abyss
#

great

#

thank youuu

#

have a nice week ๐Ÿ™‚

chilly abyss
#

Hey @nocturne basin, where can I see the endpoints of the api?

nocturne basin
chilly abyss
#

thanks!

nocturne basin
#

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

chilly abyss
#

okay

#

thank you for the advice