Skip to main content

a formatter for snbt from minecraft

Project description

Snbtlib

PyPI version

Installation

pip install snbtlib

Usage

import snbtlib
from pathlib import Path

# Reading Text to JSON
json = snbtlib.loads(Path('quest.snbt').read_text(encoding='utf-8'))

# Dumping JSON to Text
text = snbtlib.dumps(json, compact=False)  # When compact is True, the output will be compatible with Version 1.12 and below
Path('quest.snbt').write_text(text, encoding='utf-8')

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

snbtlib-1.0.2.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

snbtlib-1.0.2-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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