thingsboard / thingsboard/thingsboard-python-client-sdk

Module naming may cause issues & clashes with other python packages

Open
#40 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
130
Forks
86
PR merge metrics
No merged PRs in 30d

Description

Installing tb-mqtt-client results in the following files in python's site-packages directory:

__init__.py
sdk_utils.py
tb_device_http.py
tb_device_mqtt.py
tb_gateway_mqtt.py
utils.py

This gives me a few concerns:

  • The __init__.py file at the top-level of site-packages may be imported automatically when anything else from that directory is imported. This could lead to issues if any content is added to this file.
  • The names __init__.py, sdk_utils.py and utils.py are not very unique and may easily clash with modules from other Python packages.

I recommend moving these files into a single top-level module or prefixing the file names with something unique to prevent issues.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the package layout and references to init.py, sdk_utils.py, tb_device_http.py, tb_device_mqtt.py, tb_gateway_mqtt.py, and utils.py, then check how tb-mqtt-client installs them into site-packages. Done means the SDK files are contained under a unique top-level module or use unique names, without breaking package imports or installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.