Skip to main content

py-trans

from py_trans import PyTranslator

tr = PyTranslator()
print(tr.google("Hi", "es"))

A Fast, hassle-free way to translate text 📖

Features Install Usage

Features

  • Simple and free
  • Multiple translators to choose
  • Both synchronous & asynchronous versions

Supported translators

Engine Function
Google Translate google
translate.com translate_com
MyMemory my_memory
Translate Dict translate_dict

Installation

pip3 install py-trans
Install from source
pip install git+https://github.com/Itz-fork/py-trans.git

Usage

# Sync version
from py_trans import PyTranslator

# Async version
from py_trans import Async_PyTranslator
  • Detect language of the provided text
    • detect
    • tr.detect("Hello!")
      
  • Translate text using Google translate
    • google
    • tr.google("Hello!", "es")
      
  • Translate text using Translate.com
    • translate_com
    • tr.translate_com("Hello!", "es")
      
  • Translate text using My Memory
    • my_memory
    • tr.my_memory("Hello!", "es")
      
  • Translate text using Translate dict
    • translate_dict
    • tr.translate_dict("Hello!", "es")
      
  • Get language code/name

      ```py
      # Sync version
      tr.get_lang_code("arabic")
      tr.get_lang_name("ar")
    
      # Async version
      tr.get_lang_code_async("arabic")
      tr.get_lang_name_async("ar")
      ```
    

License

Metadata

Release files for py-trans 0.6.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 py-trans 0.6.1
File Size Uploaded
py-trans-0.6.1.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-trans 0.6.1
File Interpreter ABI Platform
py_trans-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / py-trans-0.6.1.tar.gz

Download URL py-trans-0.6.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9f049db5b6f3676a4917bf60804716b3bb52457b907994e142c2893f150b8c60
BLAKE2b-256 checksum
How to use checksums
7248eb302dc35e1695d9eded00e270d4419a2d82f2740413943ed5ecc931ca14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / py_trans-0.6.1-py3-none-any.whl

Download URL py_trans-0.6.1-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5441206dfcbce16e6407e8959432061583e466e9b5ba94a174fac9449a61c7d5
BLAKE2b-256 checksum
How to use checksums
f2b50a2e7fd5a2f6db3f882b7524b63f3b9c71cf8248f55abeb1064994693912
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6

2 release files

0.5.5

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

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