Package: groupdocs-translation-cloud
Python SDK for Translating Cloud DocumentsProduct Page|Docs|Demos|Swagger UI|Examples|Blog|Search|Free Support|Free TrialGroupDocs.Translation Cloudis Cloud API to translate Word, Excel, PowerPoint, PDF, HTML, Markdown (including Markdown with Hugo syntax), OpenDocument, RESX, SRT files, scanned images and scanned PDF documents and plain text.For convenience of our Python customers, we introduce a simple SDK that assists to add translation of Microsoft Word documents, Microsoft Excel workbooks, Microsoft PowerPoint presentations, PDF documents, Markdown (including Hugo), OpenDocument files, scanned images and PDFs and plain text to your app with merely a few lines of code.In detail, it's a set of SDKs for document, images and plain text translation in our Cloud. It supports translation of .doc, .docx, .docm, .xls, .xlsx, .xlsm, .ppt, .pptx, .pptm, .pdf, .html, .md, .odt, .ods, .odp, .csv, .tsv, .rtf, .txt, .resx, .srt, .png, .jpg, .bmp files. Just pass a specific file or text to the GroupDocs.Translation Cloud API, and it will translate and save translated file in our Cloud or will return translated text.It is easy to get started with GroupDocs.Translation Cloud and there is nothing to install. Create an account at GroupDocs Cloud and get your application information, then you are ready to use SDKs.Cloud Document Translation FeaturesTranslation of Microsoft Word®, Microsoft Excel®, and Microsoft PowerPoint® documents46 languages and 96 languages pairs supportTranslation of tables, headers, footers, footnotes/endnotes, image captions in Word documents and ODT filesTranslation of cells, charts, tables, pivot tables in Excel documents and ODS filesTranslation of text frames, tables, headers, footers, charts, comments in PowerPoint presentations and ODP filesTranslation of PDF filesTranslation of Markdown filesTranslation of Hugo syntax in Markdown filesTranslation of plain textTranslation of imagesAPI that allows you to manage your files and folders in our CloudSupported Translation FormatsYou can specify format of document to translate putting in the request’s body:extension of word file (docx / docm / doc / rtf)— to translateMicrosoft Word® documentextension of excel file (xlsx / xlsm / xls / csv / tsv)— to translateMicrosoft Excel® workbookextension of powerpoint file (ppt / pptx / pptm)— to translateMicrosoft PowerPoint® presentationextension of PDF file (pdf)— to translateAdobe PDF documentextension of Markdown file (md)— to translateMarkdown fileextension of HTML file (html)— to translateHTML fileextension of OpenDocument file (odt / ods / odp)— to translate files created in OpenOffice or similar suitsextension of Resources file (resx)— to translateresource file for .NET applicationhugo- to translate Markdown file with Hugo syntaxAdditionally, user could obtain translated file in any other format available for conversion. Just specify output format of translated document by putting file extension in the request’s body:doc, docx, odt, rtf— docx, rtf, html, odt, txt, md, pdf, tiff, svg, xpsxls, xlsx, ods, csv, tsv— xlsx, xlsb, html, pdf, xps, ods, md, docx, pptx, tiffppt, pptx, odp— pptx, pdf, tiff, html, xps, odppdf— docx, pptx, html, svg, xpsmd— html, pdf, docx, tiff, xpshtml— md, pdf, docx, tiff, xpsPlease visitSupported Formatsfor details.Supported Translation Languagesen-fr / fr-en— to translate from English to French or from French to English.en-de / de-en— to translate from English to German or from German to English.en-es / es-en— to translate from English to Spanish or from Spanish to English.en-it / it-en— to translate from English to Italian or from Italian to English.en-zh / zh-en— to translate from English to Chinese or from Chinese to English.en-ru / ru-en— to translate from English to Russian or from Russian to Englishen-ar / ar-en— to translate from English to Arabic or from Arabic to Englishen-pt / pt-en— to translate from English to Portuguese or from Portuguese to Englishen-pl / pl-en— to translate from English to Polish or from Polish to Englishen-uk / uk-en— to translate from English to Ukrainian or from Ukrainian to Englishen-vi / vi-en— to translate from English to Vietnamese or from Vietnamese to Englishen-id / id-en— to translate from English to Indonesian or from Indonesian to Englishen-hi / hi-en— to translate from English to Hindi or from Hindi to Englishen-el / el-en— to translate from English to Greek or from Greek to Englishen-nl / nl-en— to translate from English to Dutch or from Dutch to Englishen-hu / hu-en— to translate from English to Hunngarian or from Hungarian to Englishen-sv / sv-en— to translate from English to Swedish or from Swedish to Englishen-tr / tr-en— to translate from English to Turkish or from Turkish to Englishen-ja / ja-en— to translate from English to Japanese or from Japanese to Englishen-ko / ko-en— to translate from English to Korean or from Korean to Englishen-cs / cs-en— to translate from English to Czech or from Czech to Englishen-fi / fi-en— to translate from English to Finnish or from Finnish to Englishen-ga / ga-en— to translate from English to Irish or from Irish to Englishen-fa / fa-en— to translate from English to Farsi or from Farsi to Englishen-az / az-en— to translate from English to Azerbaijani or from Azerbaijani to Englishen-he / he-en— to translate from English to Hebrew or from Hebrew to Englishen-sk / sk-en— to translate from English to Slovak or from Slovak to Englishen-th / th-en— to translate from English to Thai or from Thai to Englishen-ro / ro-en— to translate from English to Romanian or from Romanian to Englishen-ms / ms-en— to translate from English to Malay or from Malay to Englishen-bg / bg-en— to translate from English to Bulgarian or from Bulgarian to Englishen-be / be-en— to translate from English to Bengali or from Bengali to Englishen-da / da-en— to translate from English to Danish or from Danish to Englishen-no / no-en— to translate from English to Norwegian or from Norwegian to Englishen-lv / lv-en— to translate from English to Latvian or from Latvian to Englishen-lt / lt-en— to translate from English to Lithuanian or from Lithuanian to Englishen-et / et-en— to translate from English to Estonian or from Estonian to Englishen-ca / ca-en— to translate from English to Catalan or from Catalan to Englishen-hy / hy-en— to translate from English to Armenian or from Armenian to Englishen-hr / hr-en— to translate from English to Croatian or from Croatian to Englishen-sr / sr-en— to translate from English to Serbian or from Serbian to Englishen-af / af-en— to translate from English to Afrikaans or from Afrikaans to Englishen-ur / ur-en— to translate from English to Urdu or from Urdu to Englishen-tl / tl-en— to translate from English to Tagalog or from Tagalog to Englishen-ka / ka-en— to translate from English to Georgian or from Georgian to Englishfr-de / de-fr— to translate from French to German or from German to Frenchfr-it / it-fr— to translate from French to Italian or from Italian to Frenchfr-ar / ar-fr— to translate from French to Arabic or from Arabic to FrenchHow to use the SDK?Our API is completely independent of your operating system, database system, or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone, and time-consuming. Therefore, we have provided and supportSDKsin many development languages to make it easier for your Cloud Apps to integrate with us.Get API keys if you haven'tMake a personal account onGroupDocs Cloud Dashboardand clickGet Keys. These keys are useful for all GroupDocs Cloud products. If you have any trouble, look at thisdetailed manual. Once your keys are received, please follow thisarticleto try GroupDocs.Translation Cloud or familiarize withDeveloper guidefor further details.Requirements.Python 3.7+Installation & Usagepip installIf the python package is hosted on a repository, you can install directly using:pipinstallgit+https://github.com/groupdocs-translation-cloud/groupdocs-translation-cloud-python.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/groupdocs-translation-cloud/groupdocs-translation-cloud-python.git)orpipinstallgroupdocs-translation-cloudThen import the package:importgroupdocs-translation-cloudSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importgroupdocs-translation-cloudTestsExecutepytestto run the tests.Getting StartedPlease follow theinstallation procedureand then run the following:importtimeimportgroupdocs-translation-cloudfromgroupdocs-translation-cloud.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://api.groupdocs.cloud/v2.0/translation# See configuration.py for a list of all supported configuration parameters.configuration=groupdocs-translation-cloud.Configuration(host="https://api.groupdocs.cloud/v2.0/translation")# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure OAuth2 access token for authorization: JWTconfiguration=groupdocs-translation-cloud.Configuration(host="https://api.groupdocs.cloud/v2.0/translation",client_id="YOUR_CLIENT_ID",client_secret="YOUR_CLIENT_SECRET")# Enter a context with an instance of the API clientwithgroupdocs-translation-cloud.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_instance=groupdocs-translation-cloud.TranslationApi(api_client)file_request=groupdocs-translation-cloud.FileRequest()# FileRequest | String in body of request, containing JSON with parameters for translation. (optional)try:# Translate any supported fileapi_response=api_instance.auto_post(file_request=file_request)print("The response of TranslationApi->auto_post:\n")pprint(api_response)exceptApiExceptionase:print("Exception when calling TranslationApi->auto_post:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttps://api.groupdocs.cloud/v2.0/translationClassMethodHTTP requestDescriptionTranslationApiauto_postPOST/autoTranslate any supported fileTranslationApicsv_postPOST/csvTranslate CSV and TSV filesTranslationApidocument_postPOST/documentTranslate Microsoft Word documents, rtf, txt, odtTranslationApidocument_request_id_getGET/document/{requestId}Return document translation status.  Also return URLs for downloading of translated document if translation was successfulTranslationApidocument_trial_postPOST/document/trialTrial translate Microsoft Word documents, rtf, txt, odt without conversation. Translate only first page or 1000 symbols.TranslationApihc_getGET/hcHealth check for all services.TranslationApihtml_postPOST/htmlTranslate HTML filesTranslationApihugo_getGET/hugoGet hugo syntax structure from markdown fileTranslationApihugo_postPOST/hugoRun hugo syntax structure analyzing from markdown fileTranslationApiimage_to_file_postPOST/image-to-fileTranslate image or scanned pdf and return fileTranslationApiimage_to_text_postPOST/image-to-textTranslate text on image or scanned pdfTranslationApilanguages_getGET/languagesReturn list of available language pairsTranslationApimarkdown_postPOST/markdownTranslate Markdown filesTranslationApipdf_postPOST/pdfTranslate pdf filesTranslationApipdf_trial_postPOST/pdf/trialTrial pdf translation. Translate only first page without conversion to another format.TranslationApipresentation_postPOST/presentationTranslate Microsoft PowerPoint presentations, odpTranslationApiresx_postPOST/resxTranslate RESX filesTranslationApispreadsheet_postPOST/spreadsheetTranslate Microsoft Excel workbooks, odsTranslationApitext_postPOST/textTranslate textTranslationApitext_request_id_getGET/text/{requestId}Return text translation status.  Also return translated text if translation was successfulTranslationApitext_trial_postPOST/text/trialTrial translate text. Translate only 1000 symbols.Documentation For ModelsCloudFileResponseCloudHugoResponseCloudTextResponseCsvFileRequestFileRequestHealthCheckStatusHtmlFileRequestHttpStatusCodeHugoRequestImageToFileRequestImageToTextRequestLanguagePairDataMarkdownFileRequestPdfFileRequestPresentationFileRequestResxFileRequestSpreadsheetFileRequestStatusResponseStringStringTupleTextDocumentFileRequestTextRequestUrlFileInfoWorksheetDataGroupDocs.Translation Cloud SDKs in Popular Languages.NETJavaPythonAndroidGitHubGitHubGitHubGitHubNuGetMavenPIPMavenProduct Page|Docs|Demos|Swagger UI|Examples|Blog|Search|Free Support|Free Trial