GadgetReactor / pyHS100

Python Library to control TPLink Switch (HS100 / HS110)
Other
409 stars 128 forks source link

use asyncio #184

Closed basnijholt closed 4 years ago

basnijholt commented 4 years ago

What about implementing this library using asyncio? I would like to know what you guys think? In this way, device communication will be MUCH faster!

It breaks backward compatibility because many propertys that are implemented actually should never have been properties (because there is a computation involved) and have to be awaited.

Because of the many breaking changes, I have removed the marked deprecated methods too.

basnijholt commented 4 years ago

I now implemented all the devices and all but the test_cache and test_cache_invalidates are passing.

It is not that the cache is actually broken, but that the test just doesn't work.

Does anyone understand why that happens?

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-3.2%) to 77.124% when pulling 190a800e77adef7ef9b9216a7ef828bc0df393d4 on basnijholt:asyncio into 59424d2738866a2bf88f8e256ece2baa06f0b024 on GadgetReactor:master.

basnijholt commented 4 years ago

@rytilahti, I merged your #185 branch! 👍

basnijholt commented 4 years ago

Closing in favour of the new repository and organisation: https://github.com/python-kasa/python-kasa