pytiled-parser
A library for parsing Tiled Map Editor maps and tilesets
What it is and what it does
pytiled-parser reads Tiled Map Editor files (TMX format) and converts them into Python objects with strict type annotations. It is designed to be engine-agnostic: rather than returning engine-specific types like sprites, it returns standard Python types (Path objects for images, dictionaries for properties), making it compatible with any game framework or custom implementation. The library closely mirrors Tiled's JSON format structure to minimize friction when working with map data.
The package is used to load maps and tilesets into 2D games supporting orthogonal, hexagonal, or isometric layouts. It exposes layers as ordered lists of Layer objects, preserving Tiled's structure while allowing downstream code (like the Arcade library) to reorganize them as needed. Dependencies are minimal: only attrs for data classes and typing-extensions for type hints.
Use it for:
- Load Tiled-authored maps into a 2D game engine or custom game loop without engine-specific bindings.
- Parse tileset definitions to extract tile properties and metadata for procedural level generation.
- Extract layer data from a map to render orthogonal, isometric, or hexagonal tile grids.
- Integrate Tiled map editing workflow into a game development pipeline by reading exported TMX/JSON files.
- Access map object groups and custom properties for game logic (spawn points, collision zones, triggers).
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses Tiled Map Editor map and tileset files into strictly typed Python objects, returning standard types like Path objects rather than engine-specific sprites.
Yes. The package is stable (Production/Stable classifier), has zero known vulnerabilities, minimal dependencies, and solves a specific problem—parsing Tiled files—without forcing a particular game engine. The 568-day gap since last release suggests maturity rather than abandonment; the repository remains active. Install it if you use Tiled for level design and need to load maps into Python without engine lock-in.
Install
pytiled-parser on PyPI
pip
pip install pytiled-parseruv
uv add pytiled-parserpoetry
poetry add pytiled-parserInstalling pytiled-parser
Before you install
Low friction: pure Python wheel with only two lightweight runtime dependencies (attrs and typing-extensions). Repository is active with a recent commit on 2025-04-10, though the last release was 568 days ago, suggesting stable maintenance rather than rapid iteration.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects without licensing concerns.
Quickstart
from pathlib import Path
import pytiled_parser
map_file = Path("assets/maps/my_map.tmx")
my_map = pytiled_parser.parse_map(map_file)
Verify before relying
- Whether the package handles all Tiled features (custom properties, animations, object groups) or only core map/tileset structures.
- Performance characteristics when parsing large or complex maps.
- Whether parsed objects are fully mutable or read-only after parsing.
Package facts
| License | MIT License Copyright (c) 2019 Beefy_Swain Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — attrs, typing-extensions |
| Maintenance | aging — 568 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 87,626/month — #13,782 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytiled_parser-2.2.9-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pmtilesRead and write PMTiles archives, a single-file…
permissive · top 15,000 on PyPI
contextilyContextily retrieves tile-based map imagery…
permissive · top 15,000 on PyPI
tiledTiled is a service for secure, structured…
permissive · top 15,000 on PyPI
pyGeoTileConverts between geographic coordinate systems…
permissive · top 15,000 on PyPI
leafmapLeafmap enables interactive geospatial mapping…
permissive · top 15,000 on PyPI
pydeckPydeck provides Python bindings for deck.gl,…
permissive · top 1,000 on PyPI
mapboxA Python client library for Mapbox web…
permissive · top 15,000 on PyPI
jupyter-leafletjupyter-leaflet provides interactive map…
permissive · top 15,000 on PyPI
tippecanoePackages the tippecanoe command-line tool as a…
permissive · top 15,000 on PyPI
amulet-coreAmulet Core reads and writes Minecraft world…
unclear · top 15,000 on PyPI