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.2.0.tar.gz
(4.6 kB
view details)
Built Distribution
xtn-0.2.0-py3-none-any.whl
(5.0 kB
view details)
File details
Details for the file xtn-0.2.0.tar.gz
.
File metadata
- Download URL: xtn-0.2.0.tar.gz
- Upload date:
- Size: 4.6 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 | 2d1e2b878e70e131fd66845e24bf0b9da1fdec3387b816109a4a17482491cb0c |
|
MD5 | 8c22927a92e41f81f4633ee80e32d266 |
|
BLAKE2b-256 | 69e32b632b4a75dbbd2de8d4d47bb9a4821594bfe2197684d0938e159c711b07 |
File details
Details for the file xtn-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: xtn-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 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 | d9b7e7368be842c1906ffcfa21f92ca64767f94cd1120030bca0f62f6c6138c1 |
|
MD5 | 5bb8c1466edc8045aa25df222e3bb094 |
|
BLAKE2b-256 | 3ac9ec26c1999034c9965c283ff4cc9013ed24b4f4383b6564a4cf191dc8ea6a |