Skip to content

v0.2.0

Choose a tag to compare

@jdrumgoole jdrumgoole released this 27 Jan 12:36
· 26 commits to main since this release

What's New in v0.2.0

New Features

  • h_ prefixed aliases: h_string, h_list, h_dict, h_int, h_float, h_tuple, h_set for shorter imports
  • Type-based IDs in Animate: Objects now get meaningful IDs like string_1, list_1, dict_1 instead of item_0
  • clear(item_or_id) and clear_all() methods: More intuitive API for removing items
  • Remove by object reference: Pass the object itself to remove() or clear() instead of remembering IDs
  • Object tracking: Objects store their _anim_id when added to Animate for easy removal

Improvements

  • Switch from websockets to wsproto to fix deprecation warnings
  • Add GitHub Actions for CI (tests on Python 3.11, 3.12, 3.13) and PyPI publishing

Example

from animaid import Animate, h_string, h_list

anim = Animate()
anim.run()

item = h_string("Hello").bold
anim.add(item)  # Returns "string_1"

anim.remove(item)  # Remove by object reference
anim.clear_all()   # Clear everything

Full Changelog: v0.1.0...v0.2.0