Python module to facilitate accessing the memoQ API.
This module is available on the Python Package Index (PyPI) and can be installed as follows:
pip install pymemoq
This module is dependent on the following additional packages:
The following classes are currently available (eventual goal is to provide wrappers for all of the APIs):
Under memoq.server
:
MemoQServer
- Wraps around a memoQ server and exposes a limited subset of the API
Under memoq.webservice
:
MemoQAsynchronousTasksService
- Asynchronous Tasks management APIMemoQELMService
- License (ELM) management APIMemoQFileManagerService
- File upload/download APIMemoQLightResourceService
- Light resource management APIMemoQLiveDocsService
- LiveDocs management APIMemoQSecurityService
- Security APIMemoQServerProjectService
- Server projects APIMemoQTBService
- Term base management APIMemoQTMService
- Translation memory management API
>>> from memoq import MemoQServer >>> memoq_server = MemoQServer('http://localhost:8080') >>> memoq_server.api_version '9.2.5' >>> from memoq.webservice import MemoQServerProjectService >>> project_service = MemoQServerProjectService('http://localhost:8080') >>> project_service.GetApiVersion() '9.2.5' >>> from memoq.util import response_object_to_dict >>> projects = [response_object_to_dict(project) for project in memoq_server.projects] >>> from collections import Counter >>> Counter([proj['DocumentStatus'] for proj in projects]) Counter({'TranslationInProgress': 65, 'TranslationFinished': 43, 'ProofreadingFinished': 21}) >>>
Per the recommendation to enable caching of WSDL and XSD files, we are using an instance of
the zeep.CachingClient()
under the hood. Since the memoQ WSDL and XSD files should not be changing except when
the server is upgraded, this should improve performance without causing any issues.
This is released under an MIT license. See the LICENSE
file in this repository for more information.