TotemLib
aka wavy-totem-lib
Python library to generate totems of undying for Minecraft.
Features
- Support 64x32 skins
- Zoning 2 layers and rounding the head
- Lossless scaling image size
- Asynchrony support
- Supports PyPy
- Supports different patterns (styles)
Installing
Using uv
uv add wavy-totem-lib
Using Poetry
poetry add wavy-totem-lib
Using pip
pip install wavy-totem-lib
Quick start
from wavy_totem_lib import TotemBuilder, Skin, Totem, TopLayer
builder = TotemBuilder(
Skin('my_skin.png'),
top_layers=[TopLayer.HEAD], # the second layer will be applied only to the head
round_head=True # the head will be rounded at the corners
)
totem: Totem = builder.build()
totem.image.save('totem.png') # .image is Pillow image
More examples
Generation and scaling
from wavy_totem_lib import TotemBuilder, Skin, Totem
builder = TotemBuilder(Skin('my_skin.png', slim=True))
totem: Totem = builder.build()
scaled = totem.scale(factor=8) # Scaling from 16×16 to 128×128
scaled.save('totem.png')
To scale up, use the built-in
scale()method instead ofresize()from Pillow, because it may blur the image.
Asynchronous generation
import asyncio
from io import BytesIO
from wavy_totem_lib import TotemBuilder, Skin, Totem, TopLayer
# To save a file asynchronously, install the aiofiles package
import aiofiles
async def main():
builder = TotemBuilder(Skin('my_skin.png', slim=False),
top_layers=[TopLayer.HEAD, TopLayer.HANDS],
round_head=True)
totem: Totem = await builder.build_async()
temp = BytesIO()
totem.image.save(temp, format='png')
async with aiofiles.open('totem.png', 'wb') as f:
await f.write(temp.getvalue())
asyncio.run(main())
Specifying a pattern
from wavy_totem_lib import TotemBuilder, Skin, Totem
from wavy_totem_lib.patterns import STT
# Wavy is default, STT available built-in
builder = TotemBuilder(Skin('my_skin.png'), pattern=STT)
totem: Totem = builder.build()
totem.image.save('totem.png')
The
generate()method accepts **kwargs, which will be passed on to the pattern class. None of the built-in patterns support them.
Patterns
[!NOTE] You can create your own pattern by creating subclass from
Abstractclass and implementing theimagemethod.
Wavy
This is the default pattern in TotemBuilder.
| Notch (wide) | WavyCat (slim) | CyCeKu (wide) |
|---|---|---|
from wavy_totem_lib import TotemBuilder
from wavy_totem_lib.patterns import Wavy
TotemBuilder(pattern=Wavy)
# You can also not specify the pattern at all, because WavyStyle – default pattern.
STT
The code is taken from the UnFamousSoul/STT repository.
| Notch (wide) | WavyCat (slim) | CyCeKu (wide) |
|---|---|---|
from wavy_totem_lib import TotemBuilder
from wavy_totem_lib.patterns import STT
TotemBuilder(pattern=STT)
Metadata
Release files for wavy-totem-lib 2.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wavy_totem_lib-2.1.2.tar.gz | 9.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wavy_totem_lib-2.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.5 kB
Release files / wavy_totem_lib-2.1.2.tar.gz
| Download URL | wavy_totem_lib-2.1.2.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
030f65e17cd28789a898a0536d68e90138c0efbb84349724b875478233987ea5
|
|
BLAKE2b-256 checksum How to use checksums |
f6558575827aa7ef724188cfdcb76659b5ab15d8486a4a86ce2a19f69f6f5d0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2025.
Transparency logRelease files / wavy_totem_lib-2.1.2-py3-none-any.whl
| Download URL | wavy_totem_lib-2.1.2-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
683a8a4dd825d0bb07cf1631c52b84d1f412c7afad1072777c33ec5431fb2af0
|
|
BLAKE2b-256 checksum How to use checksums |
8b7dbd062c0aaf1baa6363b525ba4847116aefc062119fcf65bd7595831d7977
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2025.
Transparency log