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.0.tar.gz (2.7 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.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for basalam_backbone_translation-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a345cd4c84364802075801cf960b38debd41d197d03ac2680867386df7ac4018
MD5 3f4b88376bc1912d27e0e6fc23e7e1fa
BLAKE2b-256 76499c2315c2b4db2062ed2632aefb5501cee03fb209cf0544dc8ad12143925c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for basalam.backbone_translation-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f1d55a623f420ac59f995daf3bfe31c3a0a0c3dbf4ba7183dcfaabbc2724eb4
MD5 36a4132a61f9227e1aec18d8ffce7c7b
BLAKE2b-256 40329d0c605505d3e68f398e095cf6d78b0742f00e70bef6016368ac2860ea62

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