Skip to content

Thumby API Documentation

To get started using the entire Thumby API, import the module at the top of your MicroPython program:

import thumby


  • __version__
    • type: string
    • values: 1.0 ~ limitless (increased for changes to library)

Note: where color is mentioned in the Thumby API docs, color refers to 0 being a black (unlit) pixel, and the value 1 refers to a white (lit) pixel.


What are Thumby Submodules?

Thumby Submodule Documentation Page & Methods
thumbyHardware Hardware:

thumbyButton Button








thumbyGraphics Text:

.display.drawText(string, x, y, color)

.display.setFont(fontFilePath, width, height, space)


Constants: .display.width and .display.height






.display.setPixel(x, y, color)

.display.getPixel(x, y)


.display.drawLine(x1, y1, x2, y2, color)


.display.drawFilledRectangle(x, y, w, h, color)

.display.drawRectangle(x, y, w, h, color)


.display.blit(bitmapData, x, y, width, height, key, mirrorX, mirrorY)

.display.blitWithMask(bitmapData, x, y, width, height, key, mirrorX, mirrorY, maskBitmapData)


.display.drawSpriteWithMask(sprite, maskSprite)
thumbySprite Sprite

.Sprite(width, height, bitmapData, x, y, key, mirrorX, mirrorY)


thumbyAudio Audio, duration)

.audio.playBlocking(freq, duration)



thumbyLink Link


thumbySaves Saves


.saveData.setItem(key, value)






In Thumby API version 1.7, the Thumby API was divided into submodules for those not using the entire API. Using Thumby submodules increases the speed of program load times. You can always import all thumby constants and methods using import thumby. To import submodules and to use their methods in your code, you would import the submodule name instead, and when using methods you would type the submodule name instead of "thumby".

Let's look at the differences in two small examples that show how to import and use methods with the entire Thumby API and with a submodule.

Using the full API:

import thumby

thumby.display.drawText("Hello world", 0, 0, 1)

Using a submodule of the API:

import thumbyGraphics

thumbyGraphics.display.drawText("Hello world", 0, 0, 1)

These code snippets work the same, but the second runs faster! Check out what methods are available in which submodule in the table below!

Back to top