Skip to main content

Python interface to TWC's API

Project description

aTWC - Python interface to Teamwork Cloud

Python interface to NoMagic/CATIA Teamwork Cloud Server.

Teamwork Cloud server is a central repository service to store and retrieve Cameo and MagicDraw models.

TWC exposes a REST API that allows interaction with the stored models.

This library has been primarily written as interface abstraction for Archimedes Exhibitions GmbH's Cameo Collaborator Publisher service, hence it's not intended as a general-purpose solution.

aTWC is developed and maintained by Archimedes Exhibitions GmbH.

Installation

$ pip3 install atwc

Usage example

import asyncio
import atwc


async def main():
    client = atwc.client.Client('https://twc.local:8111/osmc/', 'user', 'password')

    async with client.create_session():
        browser = atwc.browsers.ResourceBrowser(client)
        await browser.fetch()

        print('MagicDraw resources:')
        for resource in browser.md_resources:
            print(f'  {await browser.get_category_path(resource)}/'
                  f'{resource["dcterms:title"]}')


asyncio.run(main())

Running the examples

Copy the file config.py.dist into config.py in the examples folder:

$ cd examples
$ cp config.py.dist config.py

Edit the file config.py and replace the placeholders for all the entries.

More information can be found in the docstring of each script.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atwc-1.0.0.tar.gz (8.4 kB view hashes)

Uploaded Source

Built Distribution

atwc-1.0.0-py3-none-any.whl (10.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page