Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

translation-builder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

translation-builder

A tool for generating Python classes from YAML files

  • 1.0.2
  • PyPI
  • Socket score

Maintainers
1

PyPI - Python VersionPyPI - Versionwakatime

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

MEW

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc