Skip to main content

Simple Locize

Simple Locize is a library for handling translations via the Locize API. Locize is a translation management system that allows you to easily manage your application's translations.

Installation

pip install simple-locize

Usage

To use Simple Locize, you first need to create an instance of the SimpleLocize class:

from simple_locize import SimpleLocize

project_id = 'your-project-id'
environment = 'your-environment'
private_key = 'your-private-key' # optional

locize = SimpleLocize(project_id, environment, private_key)

Fetching translations

To fetch translations for a specific namespace and language, you can use the get_all_translations_from_namespace method:

namespace = 'your-namespace'
language = 'en'

translations = locize.get_all_translations_from_namespace(namespace, language)

This will return an object containing all translations for the specified namespace and language.

Translating a key

To translate a specific key for a namespace and language, you can use the translate method:

namespace = 'your-namespace'
language = 'en'
key = 'your.key'

translation = locize.translate(namespace, language, key)

This will return the translation for the specified key, or the key itself if no translation is found.

License

Simple Locize is open-sourced software licensed under the MIT license.

Metadata

Release files for simple-locize 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simple-locize 1.0.1
File Size Uploaded Provenance
simple_locize-1.0.1.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for simple-locize 1.0.1
File Interpreter ABI Platform
simple_locize-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / simple_locize-1.0.1.tar.gz

Download URL simple_locize-1.0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f7aac8e31b632adfe2673312675728d343db2bdaf7b52ac26772b12ceed5bfe1
BLAKE2b-256 checksum
How to use checksums
95cf37d4e4cbba50bb924d72af30cb12eb16cebb63aa6d9e24350170abf9d4c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / simple_locize-1.0.1-py3-none-any.whl

Download URL simple_locize-1.0.1-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
642da3fdff8f337f2b0f2f32f577bdd72e07bdbba3f6d52edc917d34dde508e2
BLAKE2b-256 checksum
How to use checksums
6ecf3399feee6bd98bfd9040707e037bca95a0d98cebbe88a05b4ca90929f1cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for simple-locize 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page