clach04 / python-tuya

Python interface to ESP8266MOD WiFi smart devices from Shenzhen Xenon. NOTE I'm not using any devices with this library so I can't test :-(
MIT License
239 stars 54 forks source link

PyPi package #34

Open clach04 opened 6 years ago

clach04 commented 6 years ago

Package available from https://pypi.org/project/pytuya/

Related to Issue #24.

If any one is interested and has not worked on PyPi support before, I have a sample project at https://github.com/clach04/x10_any (sadly I don't have "how to publish" notes there, from memory I used twine but I did bookmark https://nosarthur.github.io/coding/2018/07/01/pypi.html which has a note on how to use a Markdown formatted readme that I mean to try).

Random thoughts:

clach04 commented 6 years ago

https://pypi.org/project/pytuya/ posted by https://github.com/sean6541 - current version 7.0, so to avoid issues initial version needs to be (at least) 7.0.1 to ensure an upgrade will work (need to check code level used, incase API different in which case a major version bump required, https://semver.org/)

Exilit commented 6 years ago

My biggest problem is currently the package name :-) as pytuya is already used by @sean6541.

We could definetly ask sean6541 to hand over the maintenance to us. But I think there might already be software out there which uses the package and I don't want to continue the version numbering (it's already 7.0).

What do you think, @clach04 ? Do you have any preferences?

clach04 commented 6 years ago

@Exilit no strong preferences on my part. What are your thoughts on the versioning, what would you like to see? I was about to add a version to the module then saw your comment, so I held back :)

clach04 commented 6 years ago

@Exilit new version posted to pypi, under pytuya name with current code.

Outstanding things to resolve:

Currently the setup.py file has a dependency on pyaes. This works things that are not perfect about this setup:

  1. it ignores PyCrypto/PyCryptodome - that dependency will be present for some installations (e.g. Home Assistant #24 requires it). However installing pyaes and then finding PyCrypto first works as expected, viz. PyCrypto is used in preference
  2. the pyaes version on PyPi is old and has partial Python 2.x support, there is an outstanding PR (disclosure its my PR) for this https://github.com/ricmoo/pyaes/pull/13 amongst other open PRs

Leaving open for discussion for a while.