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.1.tar.gz (5.7 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.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jupyter_translation-0.1.1.tar.gz
Algorithm Hash digest
SHA256 196981caddc93c1f7dac504ac26a558dabd08b55ed640baf94f5deabed1e478b
MD5 9a8e269bda4733cf256e08a3b6fe54e3
BLAKE2b-256 5f605cc29c5f75ae933c42790a6fa1d21d09b004350da458e8032237a51f4b44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyter_translation-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db0e7629e6a359b2575a73eea48931ed965a0ccc626f850dce6fab797fa5502d
MD5 f0f6dc7ee2dc804bd9d6cc7d414b5410
BLAKE2b-256 810fb678ac31da8c8cf320e65f21c87c12a4494909fc9653e2964812a1729190

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