.. _module-document: =================== Module: document.py =================== :Author: Stefan Eletzhofer :Date: 2012-07-10 Abstract ======== This module offers functions to create, update and delete **WTDocument** business objects. Example Usage ============= The `document.py` module works on *document resources*. In order to use its API we need to get the `api` object and the document resource:: >>> from nexiles.tools.api import get_api, get_resource >>> api = get_api("http://example.com/Windchill", "fred", "secret") >>> resource = get_resource(api, "documents") Now we're able to use the :py:func:`nexiles.tools.api.document.create` API:: >>> from nexiles.tools.api import document >>> doc = document.create(resource, "4711", "TestDoc", "FooProduct") >>> print doc.name, doc.oid u'TestDoc', u'OR:wt.doc.WTDocument:12345' Module Documentation ==================== .. automodule:: nexiles.tools.api.document :members: .. vim: set ft=rst tw=75 nocin nosi ai sw=4 ts=4 expandtab: