Library guidelines

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
Posts: 11
Joined: Wed May 07, 2014 10:29 am

Library guidelines

Post by Kenneth » Wed May 07, 2014 7:29 pm

I just wrote a first quick version for a library for SSD1306 oled displays (128x64 and 128x32), tested for 128x32.

The file is called and you can place it next to your after that, you can use code like:

Code: Select all

from ssd1306 import SSD1306
display = SSD1306(pinout={'sda': 'Y1',
                          'sck': 'Y2',
                          'dc': 'Y3',
                          'res': 'Y4',
                          'cs': 'Y5'},

current = False
  while True:
    current = not current
    display.set_pixel(0, 0, current)
However, what are the guidelines to contribute libraries (in this case, the file)? I could not find a proper location in the repo, or should we create a new repo with various libraries that people can use?

Maybe a folder per library with in that folder the py file(s) and a readme with more information.

Any suggestions?

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

Re: Library guidelines

Post by pfalcon » Wed May 07, 2014 7:41 pm

A suggestion is to do the same as general Python community does - make your module easily available to the rest community (e.g. via PyPI), but maintain it yourself. There're already proof-of-concept support for installing modules from PyPI, number of modules posted already as part of project, and RFC for packaging guidelines at .
Awesome MicroPython list
Pycopy - A better MicroPython
MicroPython standard library for all ports and forks -
More up to date docs -

Posts: 10
Joined: Fri Aug 08, 2014 2:54 pm

Re: Library guidelines

Post by domgiles » Fri Aug 08, 2014 2:56 pm

Hi Kenneth

Is this the I2C variants of the SSD1306 displays. I'd be really interested in using it/contributing.



Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: Library guidelines

Post by Turbinenreiter » Fri Aug 08, 2014 4:24 pm

What I do is to just create a Github repository and post links to the wiki and in the forum.


However, maybe it would be a good idea to create an 'micropython-devlib' repository in the micropython account (
Having everything in one place would help with two things:
1. Finding stuff is easier, so you won't start hacking on a module to just find out that someone already did it later.
2. Consistency. People would see other modules and talk to other authors, leading to more consistent modules.

Maintaining would be tricky, tough.

Post Reply