micropython-lib - "distributed" uPython standard library

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
User avatar
pythoncoder
Posts: 3508
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: micropython-lib - "distributed" uPython standard library

Post by pythoncoder » Sat Jan 20, 2018 11:50 am

pfalcon wrote:
Sun Jan 07, 2018 2:24 pm
The master repository of micropython-lib is now at https://github.com/pfalcon/micropython-lib . Some modules also require my fork of MicroPython, https://github.com/pfalcon/micropython , and there will be more such modules in the future. Majority of modules of course remain compatible with the upstream MicroPython.
I'm glad to see that the latest update to uasyncio has now propagated from your fork to micrropython-lib. I would be grateful if you or @Damien could clarify the situation about the relationship between your fork and the (erstwhile?) official library. I can't answer for anyone else, but I'm completely confused :?
Peter Hinch

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: micropython-lib - "distributed" uPython standard library

Post by pfalcon » Mon Jul 09, 2018 9:32 am

For some time now, micropython-lib contains 3 different HTTP client modules. I wanted to add quick comparison/selection guide for them for a long time, and now I did: https://pypi.org/project/micropython-urllib.urequest/
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
mattyt
Posts: 233
Joined: Mon Jan 23, 2017 6:39 am

Re: micropython-lib - "distributed" uPython standard library

Post by mattyt » Mon Jul 09, 2018 9:36 am

Your timing is impeccable - looking into the differences between these options was literally on my todo list for tonight! This is really helpful, thanks pfalcon!

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: micropython-lib - "distributed" uPython standard library

Post by pfalcon » Sat Oct 13, 2018 10:53 am

pfalcon wrote:
Mon Jul 09, 2018 9:32 am
For some time now, micropython-lib contains 3 different HTTP client modules. I wanted to add quick comparison/selection guide for them for a long time, and now I did: https://pypi.org/project/micropython-urllib.urequest/
Ok, being spelled like that, it effectively opened road for [s]bloating up[/s] adding more features to "urequests". By now, it response header parsing by default (of course, can be disabled or overridden to save memory), processes redirects and works around some issues of non-compliant servers.

But there's pressure to add more and more [s]bloat[/s] features. Before giving up to that, I decided to snapshot the latest version of urequests, 0.8, as a new module uurequests (micro-urequests): https://pypi.org/project/micropython-uurequests/ . It may be useful to users of esp8266 and other low-memory systems.


To remind, the master micropython-lib repository is https://github.com/pfalcon/micropython-lib . Issues reports and patches adhering to Contributor Guidelines are welcome.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

stlm
Posts: 1
Joined: Tue Feb 06, 2018 6:55 pm

Re: micropython-lib - "distributed" uPython standard library

Post by stlm » Wed Nov 07, 2018 7:23 am

I was wondering lately what the state of the micropython-lib is. The last commit in the master branch is from February this year. Is there a specific reason why there were no new commits this year? There are lot's of open PRs with new modules that could replace some of the empty placeholder modules which would be great. Please, don't get me wrong. I really appreciate all the effort that has been made to build up the micropython-lib and I like working with it. But I also think it is far from finished, especially with all the placeholders around and I would just like to know if it makes sense to contribute more modules or changes as a PR to this repository or if there is "something new" coming up in the future?

Kind Regards

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: micropython-lib - "distributed" uPython standard library

Post by pfalcon » Thu Nov 22, 2018 5:09 am

micropython-lib is actively depeloped: https://github.com/pfalcon/micropython-lib
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: micropython-lib - "distributed" uPython standard library

Post by pfalcon » Wed Nov 28, 2018 7:12 pm

pfalcon wrote:
Sat Oct 13, 2018 10:53 am
But there's pressure to add more and more [s]bloat[/s] features. Before giving up to that, I decided to snapshot the latest version of urequests, 0.8, as a new module uurequests (micro-urequests):
Similar thing happened to "logging" module - extensions to it were recently contributed. Before merging them, the original logging state was capture as "ulogging".
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: micropython-lib - "distributed" uPython standard library

Post by pfalcon » Fri Jan 25, 2019 10:27 pm

Finally coded up "venv" module: viewtopic.php?f=15&t=5869
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: micropython-lib - "distributed" uPython standard library

Post by pfalcon » Wed Feb 06, 2019 8:06 pm

"argparse" module as was written by Damien was captured as "uargparse", before possibly adding more bloat to make "argparse" more compatible with CPython.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

eltomek
Posts: 11
Joined: Sat Feb 02, 2019 8:32 am

Problem with uaiohttpclient run witl pycopy

Post by eltomek » Tue Feb 12, 2019 9:38 pm

Trying to run micropython-lib's http.client renders the following error regardless of whether using @pfalcon's version of micropython-lib or the "official" one (https://github.com/micropython/micropython-lib/)

Code: Select all

tomek@ubuntu:~/src/micropython/ports/unix$ ./micropython ~/src/micropython-lib/http.client/example_client.py https://python.org
Traceback (most recent call last):
  File "/home/tomek/src/micropython-lib/http.client/example_client.py", line 1, in <module>
  File "/home/tomek/src/micropython-lib/http.client/http/client.py", line 69, in <module>
  File "/home/tomek/.micropython/lib/email/parser.py", line 12, in <module>
  File "/home/tomek/.micropython/lib/email/feedparser.py", line 27, in <module>
  File "/home/tomek/.micropython/lib/email/message.py", line 16, in <module>
  File "/home/tomek/.micropython/lib/email/utils.py", line 31, in <module>
  File "/home/tomek/.micropython/lib/datetime.py", line 1919, in <module>
  File "/home/tomek/.micropython/lib/datetime.py", line 1836, in _create
AttributeError: type object 'tzinfo' has no attribute '__new__'

Post Reply