pytransifex.Transifex¶
-
class
pytransifex.
Transifex
(api_token: str, organization: str, i18n_type: str = 'PO')[source]¶ -
__init__
(api_token: str, organization: str, i18n_type: str = 'PO')[source]¶ Initializes Transifex
- Parameters
api_token – the API token to the service
organization – the name of the organization
i18n_type – the type of translation (PO, QT, …) defaults to: PO
Methods
__init__
(api_token, organization[, i18n_type])Initializes Transifex
coordinator
(project_slug[, language_code])Return the coordinator of the the project
create_language
(project_slug, language_code, …)Create a new language for the given project :param project_slug: :param language_code: :param coordinators: list of coordinators
create_project
(slug[, name, …])Create a new project on Transifex
create_resource
(project_slug, path_to_file)Creates a new resource with the specified slug from the given file.
create_translation
(project_slug, …)Creates or updates the translation for the specified language
delete_project
(project_slug)Deletes the project
delete_resource
(project_slug, resource_slug)Deletes the given resource
delete_team
(team_slug)get_translation
(project_slug, resource_slug, …)Returns the requested translation, if it exists.
list_languages
(project_slug, resource_slug)List all the languages available for a given resource in a project
list_resources
(project_slug)List all resources in a project
ping
()Check the connection to the server and the auth credentials
project_exists
(project_slug)Check if there is a project with the given slug registered with Transifex
update_source_translation
(project_slug, …)Update the source translation for a give resource
-