A tool for generating Python classes from YAML files
Project description
INFO
This is a simple library providing the ability to generate a Python file from a YML file. It's make easy to use the data from the original file, for example for translation files.
Installation
The library is available on PyPi, so you can install it in the standard way:
Windows
pip install translation-builder
Ubuntu/macOS
pip3 install translation-builder
Example
YML file example
good-translation:
cool: "No!"
one-more-cool:
- 1
- 2
- 3
File generation
g-translation --file my_file.yml --py_result ./my_directory/
Usage in your code
from my_directory import my_file_tg
print(my_file_tg.Root.good_translation.cool)
print(my_file_tg.Root.good_translation.one_more_cool[1])
Result
No!
2
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file translation_builder-1.0.3.tar.gz.
File metadata
- Download URL: translation_builder-1.0.3.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
719c173182a42f420fa982b9f7e0f402485f0a3015999a25f4c9d21b0229e18a
|
|
| MD5 |
f2db51c423ae14720707470f9dd538b2
|
|
| BLAKE2b-256 |
9adafa43db22784c21d8103954a00f14d34f01fdb40f4295d3c45e8984920177
|
File details
Details for the file translation_builder-1.0.3-py3-none-any.whl.
File metadata
- Download URL: translation_builder-1.0.3-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7418f933fb723c8a1953839dc1194970f1419d3ba7ed78e800527ea4baadf3f9
|
|
| MD5 |
c5883a797710f72de3da9dc6176ac228
|
|
| BLAKE2b-256 |
d1f05bc379f15ea761f958e8e7959adfbcd325c1872f315d78d80792591e9c5c
|