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.

PyPI Version 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.2.tar.gz (23.8 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.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jupyter_translation-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b464337734414fb25742271c1b3731ce66b77378aff4dcbb4e874c1bab075049
MD5 a04dd8b6d7a761631a11f946e92df0d7
BLAKE2b-256 14e1ad85b9c3caffeef19dde84375e201a18fc91509722b4131606fa13ecbabc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyter_translation-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8292a5d9e9e303d738d10709c33b067924788e0b0a2f38a50640f5460150a4ec
MD5 34aaf7ec4d8dd706e9ec0a5921477775
BLAKE2b-256 12bc3d052716abd14f7fedae529dd37e9452e74ce58435186575e7101bde1685

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