pumpwood-i8n

Package to help internationalization of Pumpwood based back-ends

https://github.com/murabei-opensource-codes/pumpwood-i8n

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.5%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

Package to help internationalization of Pumpwood based back-ends

Basic Info
  • Host: GitHub
  • Owner: Murabei-OpenSource-Codes
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Size: 152 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

PumpWood I8n

This packages permit implementation of translation of Pumpwood using a backend table at Pumpwood Auth for mapping values.


Pumpwood is a native brasilian tree which has a symbiotic relation with ants (Murabei)

Quick start

The main class in package is PumpwoodI8n, it can be used to translate sentences.

```python from pumpwoodi8n.translate import PumpwoodI8n from pumpwoodcommunication.microservices import PumpWoodMicroService

It is necessary to instantiate a micro-service object to call back-end

for translation.

microservice = PumpWoodMicroService( server_url='http://localhost/', username="pumpwood", password="is a nice system")

Instantiate an object to be initialized at application

pumpwoodi8n = PumpwoodI8n(microservice=microservice) translatedstr= pumpwood_i8n.t( sentence="Translate this sequence please?", # Tags can be used to differentiate same, but with different contexts # so different translations. tag="login",

# Flag to indicate if translation is at plural or not.
plural=False,

# Reference language to make translation
language: str = "",

# It is possible give different translations according to different
# Type of users if needed
user_type: str = "")

```

It is possible to instantiate an empty object and then initiate the microservice.

```python from pumpwoodi8n.translate import PumpwoodI8n from pumpwoodcommunication.microservices import PumpWoodMicroService

It is necessary to instantiate a micro-service object to call back-end

for translation.

microservice = PumpWoodMicroService( server_url='http://localhost/', username="pumpwood", password="is a nice system")

Instantiate an object to be initialized at application

pumpwoodi8n = PumpwoodI8n() pumpwoodi8n.init(microservice=microservice) ```

This can be used to initiate the object available at singletons. ```python from pumpwoodi8n.singletons import pumpwoodi8n

microservice = PumpWoodMicroService( server_url='http://localhost/', username="pumpwood", password="is a nice system")

Instantiate the object available at pumpwood_i8n

pumpwoodi8n = PumpwoodI8n() pumpwoodi8n.init(microservice=microservice) ```

Pumpwood I8n make a cache locally to avoid making to many calls to backend. Cache will be invalidated after PUMPOOD__I8N__CACHE_EXPIRY hours. It is possible to set PUMPOODI8NCACHE_EXPIRY with float values.

Enviroment Paramenters

PUMPOODI8NCACHE_EXPIRY [float]: Set the expiry time for locally cached values for translation. After the period sentence will be translated again renewing the local cache.

Owner

  • Name: Murabei Data Science
  • Login: Murabei-OpenSource-Codes
  • Kind: organization
  • Email: contact@murabei.com
  • Location: Brazil

Translating reality to math, a Data Science consulting company

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Baceti
    given-names: André Andrade
title: "PumpWood Communication"
version: 0.2
date-released: 2021-06-01

GitHub Events

Total
  • Push event: 2
  • Create event: 2
Last Year
  • Push event: 2
  • Create event: 2

Dependencies

setup.py pypi
src/pumpwood_i8n.egg-info/requires.txt pypi
  • GeoAlchemy2 ==0.9.3
  • SQLAlchemy ==1.3.19
  • SQLAlchemy-Utils ==0.37.8
  • Shapely >=1.7.0
  • Werkzeug >=1.0.1
  • apache-airflow-client ==2.3.0
  • geopandas >=0.8.1
  • pandas *
  • requests >=2.28.2
  • simplejson *
dev_requirements.txt pypi
  • GeoAlchemy2 ==0.9.3 development
  • SQLAlchemy ==1.3.19 development
  • SQLAlchemy-Utils ==0.37.8 development
  • Shapely >=1.7.0 development
  • Werkzeug >=1.0.1 development
  • apache-airflow-client ==2.3.0 development
  • geopandas >=0.8.1 development
  • pandas * development
  • requests * development
  • requests >=2.28.2 development
  • simplejson * development