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.4.0.tar.gz
(5.0 kB
view details)
Built Distribution
xtn-0.4.0-py3-none-any.whl
(5.4 kB
view details)
File details
Details for the file xtn-0.4.0.tar.gz
.
File metadata
- Download URL: xtn-0.4.0.tar.gz
- Upload date:
- Size: 5.0 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 | 376ca0c4f1dc5eb1d81a5ab93563bad656418bfd6c280739cc3f8cd57cf1c688 |
|
MD5 | e3c2c71b07560bebaa011eedef93216e |
|
BLAKE2b-256 | 4a90364588bbf96e4ea32289171e9be69c2ca1ac83303787287fa6652243ac54 |
File details
Details for the file xtn-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: xtn-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.4 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 | da4748dea6a14e1f4faf37eeef1af67c01cfae98564821a65b380500adc27103 |
|
MD5 | a2ac277823643ab44939ccb3a7310ea0 |
|
BLAKE2b-256 | 504089baea913fd5fd3e42cacf19b4c27854f539a204f5fe6fa4a6c3a4ea1bee |