Skip to main content

skel-mesh-parser (Python)

Python port of this repo's js branch (spine-skeleton-binary-js): a minimal, dependency-free parser for the skin/attachment section of Spine skeleton binary files (.skel) that returns, per attachment, its raw type and — for Mesh-type attachments — the uvs/triangles needed to build a texture-space silhouette. It is not a Spine runtime: no rendering, no animation, no timelines, IK, physics, or constraint solving. Supports Spine versions 3.8.x and 4.2.x only (anything else raises UnsupportedVersionError).

Status: implemented — parse_skeleton is wired up for both 3.8.x and 4.2.x. It is a field-for-field port of the js branch's reader and has been validated against the official Spine 3.8 goblins-pro.skel example (see Testing).

Usage

from skel_mesh_parser import parse_skeleton

data = open("some.skel", "rb").read()
result = parse_skeleton(data)

# result["version"]: {"major": int, "minor": int, "patch": int, "raw": str}
# result["attachments"]: dict[str, AttachmentInfo], keyed by the
# attachment's resolved path (the atlas region name it draws from)

info = result["attachments"]["some_region_name"]
# info["type"]: "Region" | "BoundingBox" | "Mesh" | "LinkedMesh" | "Path" | "Point" | "Clipping"
# info["uvs"] / info["triangles"] / info["hull_length"]: present ONLY when
# info["type"] == "Mesh" (hull_length is the js branch's `hullLength`: the
# number of outline vertices, i.e. the first hull_length UV pairs)

Scope, by design (same as the js branch):

  • Default skin only. Non-default skins are walked (to keep the byte stream aligned) but not returned.
  • Mesh-type attachments only carry uvs/triangles/hull_length.
  • LinkedMesh is reported as its own distinct type, never confused with Mesh.
  • On an attachment-path collision within the same skin, the Mesh entry always wins, deterministically, regardless of wire order.

Versions and tags

The two branches are released independently, each with its own version numbers and tag prefix:

  • py-vX.Y.Z — this python branch (the version in pyproject.toml).
  • js-vX.Y.Z — the js branch (spine-skeleton-binary-js).

Older unprefixed tags (v1.0.0, v1.1.0) belong to the js branch. To depend on a fixed release, pin the tag rather than the branch, e.g. skel-mesh-parser @ git+https://github.com/com55/skel-mesh-parser.git@py-v0.3.0.

Testing

python -m pytest                  # all normal tests — offline, no Spine assets needed
python -m pytest -m integration   # needs the official Spine 3.8 example asset (see below)

(or uv run pytest / uv run pytest -m integration)

  • Normal tests use only hand-built binary fixtures created for this repo (tests/fixtures/). They never touch the network or any Spine asset.
  • Integration test (tests/integration/) validates the 3.8 reader against the official Spine example goblins-pro.skel, using the same oracle values as the js branch. This repository does not distribute that file — see THIRD_PARTY_NOTICES.md. Instead, tests/spine_fixture.py resolves it as follows:
    1. If SPINE_GOBLINS_SKEL=/path/to/goblins-pro.skel is set, that file is used (and never downloaded).
    2. Otherwise .cache/spine/goblins-pro.skel (gitignored) is reused if present.
    3. Otherwise it is downloaded once from Esoteric Software's official EsotericSoftware/spine-runtimes repository, at a pinned commit (not a moving branch), and cached.
  • Checksum verification. Every source is verified against a pinned SHA-256 (GOBLINS_SKEL_SHA256). A mismatch fails the test run; a cached file with the wrong checksum is discarded and re-downloaded. Nothing is written to the cache unless it verified.
  • Fixture unavailable (offline, HTTP error): the integration tests are skipped with a message explaining how to supply the file. Set SPINE_FIXTURE_REQUIRED=1 (as CI does) to fail instead of skip.

Provenance

This is a port of the js branch's implementation, which was written independently. The official Spine Runtime source was consulted only to verify binary-format behavior and field layout; its source code was not copied or translated into this project. The reference source (spine-ts) is licensed under the Spine Runtimes License, which is not a permissive license. This project is not a Spine runtime. See the js branch's README and source comments for the exact file/line/commit each field-layout fact was checked against. Pinned commits (branch HEAD at time of writing, 2026-08-28 — re-verify before relying on a moved branch ref):

  • 4.2: EsotericSoftware/spine-runtimes@b81e5a58ed38704aee4f866f0e0ac672623ce914, spine-ts/spine-core/src/SkeletonBinary.ts
  • 3.8: EsotericSoftware/spine-runtimes@8b4844bd4b193ba9e54487ed397a777993cbad56, spine-ts/core/src/SkeletonBinary.ts

Disclaimer

This project is not affiliated with, endorsed by, or associated with Esoteric Software or the Spine runtime in any way. "Spine" is a trademark of Esoteric Software.

Licensed under the Apache License 2.0. That license applies to this project's source code only, not to third-party assets or trademarks — see THIRD_PARTY_NOTICES.md. Provided as-is, without warranty of any kind — see LICENSE for details.

Metadata

Release files for skel-mesh-parser 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skel-mesh-parser 0.3.0
File Size Uploaded Provenance Actions
skel_mesh_parser-0.3.0.tar.gz 21.7 kB With provenance Details for skel_mesh_parser-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for skel-mesh-parser 0.3.0
File Interpreter ABI Platform Actions
skel_mesh_parser-0.3.0-py3-none-any.whl Python 3 none any Details for skel_mesh_parser-0.3.0-py3-none-any.whl

Total release size: 39.7 kB

Release files / skel_mesh_parser-0.3.0.tar.gz

Download URL skel_mesh_parser-0.3.0.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5659798bdbdc1c2b894bed280afe568e9986a9a82b17a9553e32f75a02e68bca
BLAKE2b-256 checksum
How to use checksums
b82441ae014de558a33de2faf8b58ce52cf10b8eaa6229a89efaff46056b000c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Release files / skel_mesh_parser-0.3.0-py3-none-any.whl

Download URL skel_mesh_parser-0.3.0-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee92e62badcb2ecc08edda6b12958ea3e6291d67536e5e84540b470167e527da
BLAKE2b-256 checksum
How to use checksums
1b438dd8d84ba82296b605e24a32a00b5491f2b56eb1a1c002cbc4593bc04d14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Security for skel-mesh-parser 0.3.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for skel_mesh_parser-0.3.0.tar.gz

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 Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page