{"library":"lottie","title":"Lottie Python","description":"A framework to work with Lottie files (Bodymovin JSON animations) and Telegram animated stickers (TGS format). Current version 0.7.2, supports Python >=3. Maintenance mode; no frequent releases.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install lottie"],"cli":null},"imports":["import lottie","from lottie.objects.base import NVector","from lottie.player import Player","from lottie.exporters.tgs import export_tgs","from lottie.objects.base import Color"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import lottie\nfrom lottie import objects\nfrom lottie.exporters.tgs import export_tgs\n\n# Create a simple animation with a circle\nanimation = objects.Animation()\nlayer = objects.ShapeLayer()\nanimation.add_layer(layer)\n\n# Add a circle shape\nshape = objects.ShapeElement()\nshape.shape = objects.Ellipse()\nshape.shape.position = objects.Point(0.5, 0.5)\nshape.shape.size = objects.Point(0.4, 0.4)\nlayer.add_shape(shape)\n\n# Add a solid fill\nfill = objects.Fill()\nfill.color = objects.Color(1, 0, 0)  # Red\nlayer.add_shape(fill)\n\n# Export to TGS (Telegram Sticker)\nwith open('sticker.tgs', 'wb') as f:\n    export_tgs(animation, f)\nprint('Done')","lang":"python","description":"Create a simple red circle animation and export as TGS.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}