Skip to content

isHarryh/Spine-Asset-Py

Repository files navigation

Spine-Asset-Py

Spine Animation Asset Parser Library
Spine 动画资源解析库

PyPI - Version PyPI - Downloads GitHub Workflow - Test

Introduction

This Python library implements Spine skeleton parsing. Note that the library does not support rendering, as it is just designed for parsing purpose.

Features

Spine Version Skeleton Binary Parsing Skeleton JSON Parsing Atlas Parsing
3.8 √ Yes √ Yes √ Yes

Usage

Installation

Install from PyPI:

pip install spine_asset

Examples

The following code shows how to parse a binary skeleton file:

from spine_asset.v38 import SkeletonBinary

path = "path/to/your/skeleton/file.skel"

with open(path, "rb") as f:
    skeleton_data = SkeletonBinary().read_skeleton_data(f.read())

print("This skeleton contains these animations:")
print([a.name for a in skeleton_data.animations])

If the skeleton file is in JSON format, just change all the SkeletonBinary to SkeletonJSON.

Licensing

This project is licensed under the MIT License. See the License file for more details.

About

Spine Animation Asset Parser Library | Spine 动画资源解析库

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages