itsjafer / schwab-api

A python library for placing trades on Charles Schwab
MIT License
201 stars 64 forks source link

Async #50

Closed 4rumprom closed 6 months ago

4rumprom commented 6 months ago

Adding asynchonous login option.

itsjafer commented 6 months ago

I'm not a huge fan of how adding this functionality kills the readability of this code. I'd like to find a solution that doesn't require code duplication and branching code paths. The TikTokApi, which similarly uses Playwright under the hood recommended using https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor for async users before they fully migrated to async.

My preference would be to do a full migration (if that makes sense), rather than support partially support both

4rumprom commented 6 months ago

Ok. Closing this pull request then.