Skip to content

Repository files navigation

lilt-python

LILT API Support: https://lilt.atlassian.net/servicedesk/customer/portals

The LILT API enables programmatic access to the full-range of LILT backend services including:

  • Training of and translating with interactive, adaptive machine translation
  • Large-scale translation memory
  • The Lexicon (a large-scale termbase)
  • Programmatic control of the LILT CAT environment
  • Translation memory synchronization

Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests.

The base url for this REST API is https://api.lilt.com/.

Authentication

Requests are authenticated via API key, which requires the Business plan.

Requests are authenticated using HTTP Basic Auth. Add your API key as both the username and password.

For development, you may also pass the API key via the key query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use.

Quotas

Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v3.0.3
  • Package version: 3.1.0
  • Generator version: 7.17.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/lilt/lilt-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/lilt/lilt-python.git)

Then import the package:

importlilt

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

importlilt

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

importliltfromlilt.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to https://api.lilt.com# See configuration.py for a list of all supported configuration parameters.configuration=lilt.Configuration(
host="https://api.lilt.com"
)
# 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 HTTP basic authorization: BasicAuthconfiguration=lilt.Configuration(
username=os.environ["USERNAME"],
password=os.environ["PASSWORD"]
)
# Configure API key authorization: ApiKeyAuthconfiguration.api_key['ApiKeyAuth'] =os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'# Enter a context with an instance of the API clientwithlilt.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=lilt.CreateApi(api_client)
content_id=56# int | The content ID.try:
# Delete Lilt Create contentapi_response=api_instance.delete_lilt_create_content(content_id)
print("The response of CreateApi->delete_lilt_create_content:\n")
pprint(api_response)
exceptApiExceptionase:
print("Exception when calling CreateApi->delete_lilt_create_content: %s\n"%e)

Documentation for API Endpoints

All URIs are relative to https://api.lilt.com

ClassMethodHTTP requestDescription
CreateApidelete_lilt_create_contentDELETE /v2/create/{contentId}Delete Lilt Create content
CreateApigenerate_lilt_create_contentPOST /v2/createGenerate new Lilt Create content
CreateApiget_lilt_create_by_idGET /v2/create/{contentId}Get Lilt Create content by ID.
CreateApiget_lilt_create_contentGET /v2/createGet Lilt Create content
CreateApiget_lilt_create_preferencesGET /v2/create/preferencesGet Lilt Create preferences
CreateApiregenerate_lilt_create_contentGET /v2/create/{contentId}/createRegenerate Lilt Create content
CreateApisign_lilt_create_termsPOST /v2/create/terms-and-conditionsSign the Lilt Create terms and conditions
CreateApiupdate_lilt_create_contentPUT /v2/create/{contentId}Update Lilt Create content
CreateApiupdate_lilt_create_preferencesPUT /v2/create/preferencesUpdate Lilt Create preferences
DocumentsApidownload_documentGET /v2/documents/filesDownload a Document
DocumentsApiupload_documentPOST /v2/documents/filesUpload a File
DomainsApiget_domainsGET /v3/domainsRetrieve Domains
FilesApiadd_labelPOST /v2/files/labelsAdd Label to File
FilesApidelete_fileDELETE /v2/filesDelete a File
FilesApidownloadGET /v2/files/downloadDownload file
FilesApiget_filesGET /v2/filesRetrieve a File
FilesApiremove_labelDELETE /v2/files/labelsRemove Label from File
FilesApiupload_filePOST /v2/filesUpload a File
JobsApiarchive_jobPOST /v2/jobs/{jobId}/archiveArchive a Job
JobsApicreate_jobPOST /v2/jobsCreate a Job
JobsApidelete_jobDELETE /v2/jobs/{jobId}Delete a Job
JobsApideliver_jobPOST /v2/jobs/{jobId}/deliverDeliver a Job
JobsApidownload_jobGET /v2/jobs/{jobId}/downloadDownload a Job
JobsApiexport_jobGET /v2/jobs/{jobId}/exportExport a Job
JobsApiget_jobGET /v2/jobs/{jobId}Retrieve a Job
JobsApiget_job_leverage_statsPOST /v2/jobs/{jobId}/statsRetrieve Job Leverage Stats
JobsApireactivate_jobPOST /v2/jobs/{jobId}/reactivateReactivate a Job
JobsApiretrieve_all_jobsGET /v2/jobsRetrieve all Jobs
JobsApiunarchive_jobPOST /v2/jobs/{jobId}/unarchiveUnarchive a Job
JobsApiupdate_jobPUT /v2/jobs/{jobId}Update a Job
LanguagesApiget_languagesGET /v2/languagesRetrieve supported languages
MemoriesApicreate_memoryPOST /v2/memoriesCreate a Memory
MemoriesApidelete_memoryDELETE /v2/memoriesDelete a Memory
MemoriesApidelete_segment_from_memoryDELETE /v2/memories/segmentDelete a segment from a memory.
MemoriesApidownload_termbaseGET /v2/memories/termbase/downloadTermbase download for a Memory
MemoriesApiexport_termbasePOST /v2/memories/termbase/exportTermbase export for a Memory
MemoriesApiget_memoryGET /v2/memoriesRetrieve a Memory
MemoriesApiimport_memory_filePOST /v2/memories/importFile import for a Memory
MemoriesApiquery_memoryGET /v2/memories/queryQuery a Memory
MemoriesApiupdate_memoryPUT /v2/memoriesUpdate the name of a Memory
ProjectsApicreate_projectPOST /v2/projectsCreate a Project
ProjectsApidelete_projectDELETE /v2/projectsDelete a Project
ProjectsApiget_projectsGET /v2/projectsRetrieve a Project
SegmentsApicreate_segmentPOST /v2/segmentsCreate a Segment
SegmentsApidelete_segmentDELETE /v2/segmentsDelete a Segment
SegmentsApiget_segmentGET /v2/segmentsRetrieve a Segment
SegmentsApitag_segmentGET /segments/tagTag a Segment
SegmentsApiunlock_segmentsPOST /segments/review/unlockUnaccept and unlock segments
SegmentsApiupdate_segmentPUT /v2/segmentsUpdate a Segment
TranslateApibatch_translate_filePOST /v2/translate/fileTranslate a File
TranslateApidownload_fileGET /v2/translate/filesDownload translated file
TranslateApimonitor_file_translationGET /v2/translate/fileMonitor file translation
TranslateApitranslate_segment_postPOST /v2/translateTranslate a segment
UploadsApicancel_multipart_uploadDELETE /v2/upload/s3/multipart/{uploadId}Cancel Multipart Upload
UploadsApicomplete_multipart_uploadPOST /v2/upload/s3/multipart/{uploadId}/completeComplete Multipart Upload
UploadsApiget_pending_uploadsGET /v2/uploadGet All Pending Uploads or specific list of uploads by ids or statuses
UploadsApiget_s3_upload_paramsGET /v2/upload/s3/paramsGet S3 Upload Parameters
UploadsApiget_upload_by_idGET /v2/upload/{uploadId}Get Upload by ID
UploadsApiinitiate_multipart_uploadPOST /v2/upload/s3/multipartInitiate Multipart Upload
UploadsApiinitiate_s3_uploadPOST /v2/upload/s3/paramsInitiate File Upload to Cloud Storage
UploadsApisign_upload_partGET /v2/upload/s3/multipart/{uploadId}/partNumberSign Upload Part
WebhookConfigurationApiservices_configuration_api_webhooks_deleteDELETE /v3/connectors/configuration/webhooks/{id}Delete a specific Webhook Configuration by ID.
WebhookConfigurationApiwebhooks_createPOST /v3/connectors/configuration/webhooksCreates a new Webhook Configuration
WebhookConfigurationApiwebhooks_getGET /v3/connectors/configuration/webhooks/{id}Retrieve a specific Webhook Configuration by ID.
WebhookConfigurationApiwebhooks_get_manyGET /v3/connectors/configuration/webhooksRetrieve a list of Webhook Configurations.
WebhookConfigurationApiwebhooks_updatePUT /v3/connectors/configuration/webhooks/{id}Update a specific Webhook Configuration by ID.
WorkflowsApiget_workflow_templatesGET /v2/workflows/templatesRetrieve workflow templates

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BasicAuth

  • Type: HTTP basic authentication

ApiKeyAuth

  • Type: API key
  • API key parameter name: key
  • Location: URL query string

Author

About

API bindings for the Lilt REST API.

Resources

Stars

4 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages