Skip to main content

A Python library for reading and writing TMX files.

Project description

TMXpy

A Python library for reading and writing TMX files.

This library is fairly computer intensive, especially when rendering large maps. It is recommended to use a computer with decent specs when using this library.

Features

  • Rendering of TMX files to images (CSV encoding only)

Installation

pip install tmxpy

Usage

from tmxpy import TMXpy
from pathlib import Path

tmx = TMXpy(sheets=[Path("path/to/tilesheet/directory")], path=Path("path/to/tmx/file"))
tmx.generateGIDDict()
tmx.renderAllLayers().save("path/to/output/image.png")

Development/Testing

  • Install dependencies with pip install -r requirements.txt
  • Tests can be added to tests/name_of_test.py and run with py -m tests.name_of_test
  • It can be built with py -m build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmxpy-0.1.3.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tmxpy-0.1.3-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file tmxpy-0.1.3.tar.gz.

File metadata

  • Download URL: tmxpy-0.1.3.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for tmxpy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0a414600c600931b157c6ae524311a3cefba941c82877c14626e229f14dcf125
MD5 ac09f175dc29d13cfc9eb37a0eb62169
BLAKE2b-256 f6317187a942db38d69654f9da9f126ef60a92cbcf95af19931c1e1d3eeaab8e

See more details on using hashes here.

File details

Details for the file tmxpy-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tmxpy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for tmxpy-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 18c1ac588839e15ec30f3ef0086f4b041a0ac6a307e70a80e155c28fdb724057
MD5 69dd96e982e9cbc64cadc54ed00ed161
BLAKE2b-256 0a4e063cfa666d1ea03b9f7ba6c49594eaf57b9cefdc23d8da4c41160f7e9e79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page