Skip to main content

Argos Translate Files

Translate files using Argos Translate.

Supported file format

.txt, .odt, .odp, .docx, .pptx, .epub, .html, .srt, .pdf

Install

pip install argos-translate-files

Example

import os.path

import argostranslate.package, argostranslate.translate


import argostranslatefiles
from argostranslatefiles import argostranslatefiles

from_code = "fr"
to_code = "en"

installed_languages = argostranslate.translate.get_installed_languages()
from_lang = list(filter(
    lambda x: x.code == from_code,
    installed_languages))[0]
to_lang = list(filter(
    lambda x: x.code == to_code,
    installed_languages))[0]
underlying_translation = from_lang.get_translation(to_lang)

argostranslatefiles.translate_file(underlying_translation, os.path.abspath('path/to/file.txt'))

Metadata

Release files for argos-translate-files 1.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for argos-translate-files 1.4.4
File Interpreter ABI Platform Actions
argos_translate_files-1.4.4-py3-none-any.whl Python 3 none any Details for argos_translate_files-1.4.4-py3-none-any.whl

Release files / argos_translate_files-1.4.4-py3-none-any.whl

Download URL argos_translate_files-1.4.4-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7737f5112a04f3b87fad3eed3f5fb3e862037950e66ae93302c036e5192beb5d
BLAKE2b-256 checksum
How to use checksums
1a9571515647ef4ada5499302adfb1689589ad3437253ccd62ac3b53edce314d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.18

Security for argos-translate-files 1.4.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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