Skip to main content

Python Utilities & Basalam Micro-Services SDK

Project description

Requirements

  • Python 3.6+

Installation & Upgrade

pip install basalam.backbone-translation

Usage

from backbone_translation.translator import Translator

translator = Translator({
    "messages.greeting" : "Bonjour {name}"
})

# OR translator = Translator.from_json_file("path_to_json_file")

translator.translate("messages.greeting", name="Mojtabaa")
# Bonjour Mojtabaa

Testing

# install pytest
pip install pytest

# run tests
python -m pytest

Changelog

  • 0.0.2 added from_json_file method
  • 0.0.3 Now build and push are done using gitlab-ci
  • 0.0.4 new exists(phrase: str) -> bool method
  • 0.1.0 added utf-8 encoding thanks to alimohammayali@gmail.com

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

basalam_backbone_translation-1.0.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

basalam.backbone_translation-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file basalam_backbone_translation-1.0.1.tar.gz.

File metadata

File hashes

Hashes for basalam_backbone_translation-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1dab2464fa1f2488c4cc6669b552e8a1115a3bec2ea7ebfa2d34be253256a48b
MD5 6dbf88d2a0df37a2c3d27d0e3c49836c
BLAKE2b-256 ac5f2f5d4a33fef37cb960ab67f9c2bbd7c3294c612908f7c802d191d79e60d7

See more details on using hashes here.

File details

Details for the file basalam.backbone_translation-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for basalam.backbone_translation-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df2f5ae34421b24eebc1b4a631e9c2cd4460a833f847fe6a49f51ce10dcf6fc4
MD5 a12d36ea7cb19a4b75eb78b9ed2c1083
BLAKE2b-256 5ab4f08f3ad86f7308e196013f44c776b538a6fb863ab80271342b0d82ee869c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page