micropython-msgpack icon indicating copy to clipboard operation
micropython-msgpack copied to clipboard

Offical Python Package

Open chrisdecker1201 opened this issue 4 years ago • 6 comments

Hello @peterhinch

thank you for this great package.

Would you be interested to publish your package on pypi.org? I really would love to use upip to install this on my ESP8266

Greets,

Christian

chrisdecker1201 avatar Dec 03 '21 06:12 chrisdecker1201

You can use a tool like rshell or mpremote to copy the files to an ESP8266 filesystem.

peterhinch avatar Dec 03 '21 11:12 peterhinch

Yes. I know this tools. But I would like to have an experience like using pipenv install. I can even provide you with a pipeline for this.

chrisdecker1201 avatar Dec 03 '21 15:12 chrisdecker1201

Promoting micropython-msgpack to PyPI is actually a great idea – but perhaps not for the expected reason. As Peter says, the official mpremote remote is MicroPython's de facto package manager. (rshell, on the other hand, is largely unmaintained, non-portable, and irrelevant in 2022.)

Then why would promoting micropython-msgpack to PyPI be a great idea? Forwards compatibility and namespace parking. By claiming micropython-msgpack on PyPI, you prevent others from doing so. Moreover, MicroPython will probably provide a genuine package manager at some point; at that point, PyPI-hosted packaging will suddenly be the MicroPython norm rather than the exception.

leycec avatar Jan 26 '22 05:01 leycec

I don't understand how mpremote could be a package manager.

I really would like to use upip to get every dependency into my repository. For my project, I've the following workflow. I have a setup.py script, where I describe my dependencies. I can execute it with micropython (unix port) which copy the dependencies into a directory. Now I can execute, copy or mount everything with mpremote onto my board (ESP32). Without a python package, I've to copy this library into my repository.

chrisdecker1201 avatar Jan 26 '22 10:01 chrisdecker1201

At least to make a one file library, with one single class. This would facilitate the code integration into an existing project file especially if your project uses OTA, so not an additional file to upload/handle.

Also ensure it works on MP and regular python since we need to pack/unpack on the server side too.

Tangerino avatar Apr 13 '23 03:04 Tangerino

At least to make a one file library, with one single class.

The docs explain the reason for the design: to save resources by using "lazy imports".

Also ensure it works on MP and regular python

I did not target CPython because u-msgpack-python supports it. As explained in the docs, this library was derived from the above with the objective of running on a microcontroller. MessagePack is a standard protocol: you can use any library on the server.

peterhinch avatar Apr 13 '23 07:04 peterhinch

This package can now be installed to a microcontroller using the official mpremote tool.

On CPython options are manual installation or to use u-msgpack-python.

peterhinch avatar Aug 07 '24 09:08 peterhinch