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