Skip to content

Getting Started

This guide will help you get started with the TotemLib library, from installation to creating your first totem.

Add the library to your project using the following terminal command:

Terminal window
uv add wavy-totem-lib

To verify the library is installed and working correctly, and for a brief demonstration, write a simple program:

from wavy_totem_lib import TotemBuilder, Skin
# Create a Skin instance with your skin file
skin = Skin('my_skin.png')
# Create a totem builder based on the Skin instance
builder = TotemBuilder(
skin,
round_head=True # Optional: round the edges of the head
)
# Build the totem
totem = builder.build()
# Save the totem image to my_totem.png
totem.image.save('my_totem.png')

This code will load your skin from the my_skin.png file, generate a totem, and save it to my_totem.png.

If you can see your totem, the library is working correctly. Continue exploring the documentation!

If you encounter any problems with the library, find a bug or a vulnerability, check the Issues in the GitHub repository. A solution might already be available. If not, feel free to open a new issue! Issues are also a great place for suggesting new ideas.