twisted python clj documint客户端实现
txdocumint的Python项目详细描述
twisted python客户端,用于clj documint<;https://github.com/fusionapp/clj documint>;。
用法
fromStringIOimportStringIO# inlineCallbacks affords the opportunity to be concise.fromtwisted.internet.deferimportinlineCallbacks,returnValuefromtxdocumintimportactions,create_session@inlineCallbacksdefrender_some_html(html_string):session=yieldcreate_session(DOCUMINT_ENDPOINT_URI)html_uri=yieldsession.store_content(StringIO(html_string),'text/plain')pdf_uri=yieldsession.perform_action(actions.render_html(html_uri))returnValue(pdf_uri)
贡献
有关详细信息,请参见<;https://github.com/fusionapp/txdocumint>;。