A library for working with the xtn format
Project description
xtn Repository
Sample code
import xtn
# reads the data in the file (without comments) into a dict with key value pairs, the values can be dict, list, str
with open(r'path/to/file.xtn', 'r') as f:
data = xtn.load(f)
# reads the file including comments into XtnObject
with open(r'path/to/file.xtn', 'r') as f:
obj = xtn.XtnObject.load(f)
# writes the XtnObject with any changes back to a file with canonical indentation
with open(r'path/to/file.xtn', 'w') as f:
obj.dump(f)
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
xtn-0.1.1.tar.gz
(4.2 kB
view details)
Built Distribution
xtn-0.1.1-py3-none-any.whl
(4.5 kB
view details)
File details
Details for the file xtn-0.1.1.tar.gz
.
File metadata
- Download URL: xtn-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c804322eced7836cf974ddc92f0438c3688a99a6503b9b61911486db5cc3bfbd |
|
MD5 | 0468335edfbac1e438b18bb309d77c2e |
|
BLAKE2b-256 | 0549a8bfb1eed38330197082e7a442bb76d4ee5575bbab1bbcfc345e387ce6bd |
File details
Details for the file xtn-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: xtn-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.10.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4c7cffdbe649c803d74765215ea4540e43d5862e3b5630eea3005bf5568c2b2 |
|
MD5 | e7ecdea737621138dad8ce8739b2d8e4 |
|
BLAKE2b-256 | daf9382f2242fd48c8022b20e16c4488259a1a644be61b40a50009401fb8fa33 |