Skip to main content

Translate Jupyter Notebooks using Google Translate

Project description

JUPYTER-TRANSLATION

Translate your Jupyter notebooks from the command line or in a Python script.

License MIT Python 3

--

Installation

Create and activate a virtual environment and then install jupyter-translation:

$ pip install jupyter-translation

---> 100%

Usage

jupyter-translation in the command line

$ jupyter-translation input_notebook.ipynb

It translates input_notebook.ipynb from French to English. The result is a file named input_notebook_en.ipynb.

Get help with this command :

$ jupyter-translation --help

jupyter-translation in a Python script

import asyncio

from jupyter_translation.translate import translate_notebook


# Translate one notebook from Spanish to English.
asyncio.run(
        translate_single_notebook(
            input_files="input_notebook.ipynb", 
            output_path="translated_notebook.ipynb",
            src_lang='es',
            dest_lang='en'
            )
    )

# Translate multiple notebooks. Default translation is from French to English.
asyncio.run(translate_multiple_notebooks("input_notebook1.ipynb", "input_notebook2.ipynb"))

License

This project is licensed under the terms of the MIT license.

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

jupyter_translation-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

jupyter_translation-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_translation-0.1.0.tar.gz.

File metadata

  • Download URL: jupyter_translation-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.18

File hashes

Hashes for jupyter_translation-0.1.0.tar.gz
Algorithm Hash digest
SHA256 78c2b08cb528765c635546bbea00122deb6878bf32755496900bd995f2b78363
MD5 98367aca002a6f8f303169503992efb6
BLAKE2b-256 21a260501b7c47b3f7cf33176337cd373c4b4cea7ac97662327f5f087f346dd6

See more details on using hashes here.

File details

Details for the file jupyter_translation-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_translation-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 674592b894b38e65a9c7d7b48ff32be36d931c7bd8400a213912e1077e8dbfb6
MD5 4882da1fc7a09b79a3c244c361964054
BLAKE2b-256 03ee9f0420025e52ac4376eac45fccc10d99e81fd562d21a4cd757d912c60a94

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