Make droplet.create() return a value - so it can be used with 'await' ?
danryu opened this issue · 1 comments
danryu commented
Currently droplet.create() wraps a synchronous POST request to the API (calls get_data())
python-digitalocean/digitalocean/Droplet.py
Line 568 in 027b56c
Could create() be refactored to return a meaningful value?
This would mean it can be used with 'await' to allow asynchronous operation, eg
await droplet.create()
Otherwise you see this:
TypeError: object NoneType can't be used in 'await' expression
danryu commented
Don't think this is necessary.
FWIW I am using this in async lib gevent with Celery.