Skip to main content

An animated image maker.

Project description

nummu (南無)

An animated image maker.

NOTE: this project in WIP and thus interface might change a lot. Be cautious when using in production.

Image Script
helloworld examples/
line examples/
rect examples/
bubblesort Bubble Sort
heapsort Heap Sort
insertionsort Insertion Sort
mergesort Merge Sort
quicksort Quick Sort
selectionsort Selection Sort
image examples/
text examples/


$ pip install nummu


Nummu is simply a framework so you might want to implement a class having these methods: update(delta), draw(palette). None of them are absolutely required.

class HelloWorld:

    def __init__(self):
        # Do initial work here
        self.position = 0

    def update(self, delta):
        # Do some calculation before draw each frame.
        # The delta is in millisecond unit.
        # Don't forget to raise StopIteration somewhere!
        self.position += delta
        if self.position >= 100:
            raise StopIteration

    def draw(self, pallete):
        # Pallete is simply a numpy.zeros instance.
        # Overwrite any pixels as you want.
        pallete[:, self.position, :] = 255

Basic usage:

# import nummu
from nummu import Nummu

# set file size
nm = Nummu(100, 100)

# add drawer defined previously

# export to gif
nm.export('helloworld.gif', delay=5)

Check the examples in project repo, and hopefully it might help you!


$ poetry develop
$ poetry run python examples/


Currently nummu support running on 3.6, 3.7

$ pyenv install 3.6.5
$ pyenv install 3.7.0b2
$ pyenv local 3.6.5 3.7.0b2
$ export PATH=$(pyenv root)/shims:$PATH
$ tox
py36 runtests: commands[0] | poetry develop
py36 runtests: commands[0] | poetry run pytest
py37 runtests: commands[0] | poetry develop
py37 runtests: commands[0] | poetry run pytest
  py36: commands succeeded
  py37: commands succeeded
  congratulations :)


Thanks Pillow, numpy, numpngw and array2gif! Nummu stands on the shoulder of these giants!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nummu-0.1.9.tar.gz (4.4 kB view hashes)

Uploaded source

Built Distribution

nummu-0.1.9-py3-none-any.whl (7.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page