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.0.tar.gz (15.7 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.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tmxpy-0.1.0.tar.gz
  • Upload date:
  • Size: 15.7 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.0.tar.gz
Algorithm Hash digest
SHA256 d62d0e06f28e4a959b8d6158ecd2ef8ca7977ad8847865d8eff8aae0aaefe960
MD5 4170cc45ef9c63d521c5dd618d522f8c
BLAKE2b-256 c38bbf37fff3a4bf3287314200df94cc8c0015495d573d76e666a369cc1881de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tmxpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc5459b88f37b6506afe8e23e5aa8c241b2413a4234797ebff678726a2bf3537
MD5 7cf43c8863b4a29bc8921565a4e3c1c8
BLAKE2b-256 9b2c93b9b0381bea8c5cbd4743153b74ef3d82ac453e8f968f5514a5ecdf6acc

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