{
"info": {
"author": "Ken Dreyer",
"author_email": "ktdreyer@ktdreyer.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Framework :: Twisted",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6"
],
"description": "Async interface to Koji, using Twisted\n======================================\n\n.. image:: https://travis-ci.org/ktdreyer/txkoji.svg?branch=master\n :target: https://travis-ci.org/ktdreyer/txkoji\n\n.. image:: https://badge.fury.io/py/txkoji.svg\n :target: https://badge.fury.io/py/txkoji\n\nAccess Koji's XML-RPC API asynchronously (non-blocking) using the Twisted\nframework.\n\nThis supports the GSSAPI or Client SSL login methods.\n\nSimple Example: Fetching a user's name\n--------------------------------------\n\n.. code-block:: python\n\n from txkoji import Connection\n from twisted.internet import defer\n from twisted.internet.task import react\n\n\n @defer.inlineCallbacks\n def example(reactor):\n koji = Connection('brew')\n # Fetch a user.\n # You may pass an ID or a krb principal here\n user = yield koji.getUser(3595)\n # user is a Munch (dict-like) object.\n print(user.name)\n\n\n if __name__ == '__main__':\n react(example)\n\nConnecting to a Koji Hub\n------------------------\n\nTo connect to a Koji hub, create a new ``txkoji.Connection`` instance.\n\nYou must pass a string to the constructor. This string is a profile name. For\nexample, if you call ``Connector('mykoji')``, then txkoji will search\n``~/.koji/config.d/*.conf`` and ``/etc/koji.conf.d/*.conf`` for the\n``[mykoji]`` config section. This matches what the regular Koji client code\ndoes.\n\nMaking XML-RPC calls\n--------------------\n\nKoji Hub is an XML-RPC server. You can call any method on the ``Connection``\nclass instance and txkoji will treat it as an XML-RPC call to the hub. For\nexample, this Twisted ``inlineCallbacks``-style code looks up information about\na given task ID and tag ID:\n\n.. code-block:: python\n\n @defer.inlineCallbacks\n def example(reactor):\n koji = Connection('mykoji')\n\n task = yield koji.getTaskInfo(10000)\n print(task.method) # \"createImage\"\n\n tag = yield koji.getTag(2000)\n print(tag.name) # \"foo-build\"\n\n\nTo learn the full Koji XML-RPC API::\n\n koji list-api\n\nYou can also read the `koji source code `_ to find\nout details about how each method works.\n\n\nLogging in\n----------\n\nYour Koji hub must support GSSAPI or Client SSL authentication. You must have a\nvalid Kerberos ticket or SSL keypair.\n\n.. code-block:: python\n\n @defer.inlineCallbacks\n def example(reactor):\n koji = Connection('mykoji')\n\n result = yield login()\n print(result) # \"True\"\n print('session-id: %s' % koji.session_id)\n\n # \"Who am I?\"\n user = yield koji.getLoggedInUser()\n print(user)\n\nEstimating build durations\n--------------------------\n\nThe ``txkoji.estimates`` module provides methods for estimating build times.\nThe ``average_build_duration()`` method calls Koji's\n``getAverageBuildDuration`` RPC and gives you a ``datetime.timedelta`` for a\npackage. For container packages, we do something similar client-side with the\n``average_last_builds()`` method, averaging the last five builds' durations.\n\n\n\nCaching long-lived object names\n-------------------------------\n\nSometimes all you have is a user id number or tag id number, and you want the\nuser's name or tag's name instead.\n\ntxkoji includes a read-through cache for obtaining the user name or tag name.\nSee ``examples/cache.py`` for an example. txkoji's cache module stores its data\nin a ``txkoji`` subdirectory of the location specified with the\n``$XDG_CACHE_HOME`` environment variable if that is set. It will fall back to\nusing ``~/.cache/txkoji`` if the ``$XDG_CACHE_HOME`` environment variable is\nnot set.\n\n\nRich objects\n------------\n\nThe following RPC methods will return special classes that inherit from the\nMunch class:\n\n* ``getBuild`` returns ``txkoji.build.Build``\n* ``getChannel`` returns ``txkoji.channel.Channel``\n* ``listBuilds`` returns a ``list`` of ``txkoji.build.Build``\n* ``getTaskInfo`` returns ``txkoji.task.Task``\n* ``getPackage`` returns ``txkoji.package.Package``\n\nThese classes have their own special helper methods to implement things I found\ninteresting:\n\n* ``datetime`` conversions for the start/completion timestamps,\n* ``url`` properties for representing the objects in Kojiweb,\n* Unified property attributes across task methods, like ``tag``, ``package`` or\n ``is_scratch``.\n\nMore special return values:\n\n* ``getAverageBuildDuration`` returns a ``datetime.timedelta`` object instead\n of a raw float, because this is more useful to do time arithmetic.\n\n* The ``task_id`` property is populated on OSBS's CG container builds (a\n workaround for https://pagure.io/koji/issue/215).\n\nMessage Parsing\n---------------\n\nKoji's messagebus plugin emits messages to an AMQP broker when certain events\nhappen. The ``txkoji.messages`` module has support for parsing these messages\ninto the relevant txkoji ``Task`` or ``Build`` classes.\n\n\nTODO:\n=====\n* More KojiException subclasses for other possible XML-RPC faults?\n* Implement krbV authentication (probably not unless there is an alternative to\n python-krbV).\n* `MikeM noted\n `_,\n the callnum parameter will need special handling. We might need Twisted's\n ``DeferredLock`` to ensure we only have one auth'd RPC in flight at a time.\n It's not really clear to me if we can actually hit a callnum error here. More\n integration testing needed for this.\n* Ensure that Brew's \"build time\" equals the longest \"buildArch\" time for a\n task, and not something else, like the buildSRPMFromSCM time, nor even the\n overall build task's time. This has implications for estimating scratch\n builds. (comparing our tasks' times to getAverageBuildDuration)\n* Multi-call support\n\nPackages that use this package\n==============================\n\n* `helga-koji `_",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/ktdreyer/txkoji",
"keywords": "koji,twisted",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "txkoji",
"package_url": "https://pypi.org/project/txkoji/",
"platform": "",
"project_url": "https://pypi.org/project/txkoji/",
"project_urls": {
"Homepage": "https://github.com/ktdreyer/txkoji"
},
"release_url": "https://pypi.org/project/txkoji/0.10.0/",
"requires_dist": null,
"requires_python": "",
"summary": "Twisted API for Koji",
"version": "0.10.0"
},
"last_serial": 4583042,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "79c9a3f1a3c68b0cbb125e9f96df8687",
"sha256": "e04adf3335363219c08d11aeb3ff6ba559d0c3b40eef96d5f2763d1681acffcc"
},
"downloads": -1,
"filename": "txkoji-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "79c9a3f1a3c68b0cbb125e9f96df8687",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9641,
"upload_time": "2018-04-06T21:30:32",
"url": "https://files.pythonhosted.org/packages/8f/b7/b05eab9be574669d32ad4e34545dc27aa464e9b4573d5d31a532b2d8861d/txkoji-0.1.0.tar.gz"
}
],
"0.10.0": [
{
"comment_text": "",
"digests": {
"md5": "530963b4e6ea3f42acbba94c3cbf5ba6",
"sha256": "b9c4ee5cf3e349d103647a6cae41feb1feb944d20d83311c37d4add5d6ea64c3"
},
"downloads": -1,
"filename": "txkoji-0.10.0.tar.gz",
"has_sig": true,
"md5_digest": "530963b4e6ea3f42acbba94c3cbf5ba6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23291,
"upload_time": "2018-12-10T23:14:48",
"url": "https://files.pythonhosted.org/packages/8f/0d/5602b85cc95cb77a4bd33a48227bf7275b1969a33855b550271414dca47c/txkoji-0.10.0.tar.gz"
}
],
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "c1380fa8c4c4c35cc4d4543fd111d6b8",
"sha256": "13b04227cc05934746ea258f90db79498d0864196d6abd53c7466f9828e47d33"
},
"downloads": -1,
"filename": "txkoji-0.2.0.tar.gz",
"has_sig": true,
"md5_digest": "c1380fa8c4c4c35cc4d4543fd111d6b8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11026,
"upload_time": "2018-04-09T17:21:16",
"url": "https://files.pythonhosted.org/packages/f1/81/a01b467459054d31595b86cc96764600e6e3d22cfc0ebb522e26711bb869/txkoji-0.2.0.tar.gz"
}
],
"0.3.0": [
{
"comment_text": "",
"digests": {
"md5": "82790f30f910ed70f22fe28a3a4951c5",
"sha256": "278648ca56992f33e9844d4f6697d0f282503af6c21a2a37eaaaf8ed15613114"
},
"downloads": -1,
"filename": "txkoji-0.3.0.tar.gz",
"has_sig": true,
"md5_digest": "82790f30f910ed70f22fe28a3a4951c5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12420,
"upload_time": "2018-07-03T20:48:14",
"url": "https://files.pythonhosted.org/packages/74/b1/04e15cd1e9093cd6e7b0a53f46065e2a2b01c47d2c2cb7d0409e6ac93e62/txkoji-0.3.0.tar.gz"
}
],
"0.4.0": [
{
"comment_text": "",
"digests": {
"md5": "c9a28d13034160a8c61e72593375eaa2",
"sha256": "103f40df91fa5645284e5260d9b9f2f8b3167faed2950e52460c301e76a28663"
},
"downloads": -1,
"filename": "txkoji-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "c9a28d13034160a8c61e72593375eaa2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13756,
"upload_time": "2018-07-05T22:02:26",
"url": "https://files.pythonhosted.org/packages/47/2a/89c081249f1dd5f9acf0c66374e22caadc15888f0b91bdf100caf95d8e80/txkoji-0.4.0.tar.gz"
}
],
"0.4.1": [
{
"comment_text": "",
"digests": {
"md5": "159acb16fa91a259bcdd02fcd86e44cd",
"sha256": "61aaede5b19f23e4d0ef8f16501b562f02e0902d78ca1783058a869ca3228bc8"
},
"downloads": -1,
"filename": "txkoji-0.4.1.tar.gz",
"has_sig": true,
"md5_digest": "159acb16fa91a259bcdd02fcd86e44cd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13705,
"upload_time": "2018-07-17T21:46:03",
"url": "https://files.pythonhosted.org/packages/b8/cd/c6a810e6d8b5f329939498977680e699c8ef6ed9c8def3b3081d5c4e27b9/txkoji-0.4.1.tar.gz"
}
],
"0.5.0": [
{
"comment_text": "",
"digests": {
"md5": "a62938351c29b9f8e805ac6244eb8382",
"sha256": "bf815864fd02214e1b5c1645c532c5980aff41bb308db3045aff1db29b65f160"
},
"downloads": -1,
"filename": "txkoji-0.5.0.tar.gz",
"has_sig": true,
"md5_digest": "a62938351c29b9f8e805ac6244eb8382",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14204,
"upload_time": "2018-07-20T23:36:47",
"url": "https://files.pythonhosted.org/packages/7d/da/b2e660f1543731d9cdb59e9db89ad0067b4294b1fd4cd6beef207ff206a2/txkoji-0.5.0.tar.gz"
}
],
"0.6.0": [
{
"comment_text": "",
"digests": {
"md5": "c627cc58acf78e3a7c89b3de84438d77",
"sha256": "85c0ab97710f05862ba7086247ee36e5aa4ed21dcaee33420c5446baf936c281"
},
"downloads": -1,
"filename": "txkoji-0.6.0.tar.gz",
"has_sig": true,
"md5_digest": "c627cc58acf78e3a7c89b3de84438d77",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16459,
"upload_time": "2018-08-03T18:00:18",
"url": "https://files.pythonhosted.org/packages/91/3a/63fa869a7d1fb08b2cbfc61e0dea54531e4984a29cdb238e250e62ed0024/txkoji-0.6.0.tar.gz"
}
],
"0.6.1": [
{
"comment_text": "",
"digests": {
"md5": "c295161197ff41963f75e83571fb5f35",
"sha256": "6fd2596d18779a47a6d0ebcb37c1a35e03f1e2116a21a048ffb9870a385fa7df"
},
"downloads": -1,
"filename": "txkoji-0.6.1.tar.gz",
"has_sig": true,
"md5_digest": "c295161197ff41963f75e83571fb5f35",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16652,
"upload_time": "2018-08-03T20:08:29",
"url": "https://files.pythonhosted.org/packages/9d/65/9c34829e68c522acfe81946f1b2df6899ea44ebb555f2fd134ae61c067d4/txkoji-0.6.1.tar.gz"
}
],
"0.7.0": [
{
"comment_text": "",
"digests": {
"md5": "ef2397e31eafc0a9028401ebf9a82e43",
"sha256": "befe193d3783d260f0a71048b6514be00efce6282d5189c1e36d59f1bf03a116"
},
"downloads": -1,
"filename": "txkoji-0.7.0.tar.gz",
"has_sig": true,
"md5_digest": "ef2397e31eafc0a9028401ebf9a82e43",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17833,
"upload_time": "2018-08-06T22:31:56",
"url": "https://files.pythonhosted.org/packages/95/b2/55c3e8e314682dd1635741fa262a6bdc396604a6e451c124c88b96cf48d8/txkoji-0.7.0.tar.gz"
}
],
"0.8.0": [
{
"comment_text": "",
"digests": {
"md5": "feaac7aefb73cfa013f229b9339e341e",
"sha256": "5a59329d133e381761699f437819dd402257859501ef89a14ead1f41229c2727"
},
"downloads": -1,
"filename": "txkoji-0.8.0.tar.gz",
"has_sig": true,
"md5_digest": "feaac7aefb73cfa013f229b9339e341e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19575,
"upload_time": "2018-09-24T20:52:58",
"url": "https://files.pythonhosted.org/packages/06/2d/d60baaa1c6b0edc3d2ab4180766b8dd8697a6d620810fab3800805651201/txkoji-0.8.0.tar.gz"
}
],
"0.9.0": [
{
"comment_text": "",
"digests": {
"md5": "e34b885370e2973e409ed66a2175bf12",
"sha256": "3a0b0fad245b963ea3da38f8ab20a998c2fb07ac969c5d170ed20034fb3bc246"
},
"downloads": -1,
"filename": "txkoji-0.9.0.tar.gz",
"has_sig": true,
"md5_digest": "e34b885370e2973e409ed66a2175bf12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19646,
"upload_time": "2018-09-27T22:04:15",
"url": "https://files.pythonhosted.org/packages/de/80/f669c0e1906c93be3e4df79313cad3a9b2065164560f28f54c43d6e40f01/txkoji-0.9.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "530963b4e6ea3f42acbba94c3cbf5ba6",
"sha256": "b9c4ee5cf3e349d103647a6cae41feb1feb944d20d83311c37d4add5d6ea64c3"
},
"downloads": -1,
"filename": "txkoji-0.10.0.tar.gz",
"has_sig": true,
"md5_digest": "530963b4e6ea3f42acbba94c3cbf5ba6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23291,
"upload_time": "2018-12-10T23:14:48",
"url": "https://files.pythonhosted.org/packages/8f/0d/5602b85cc95cb77a4bd33a48227bf7275b1969a33855b550271414dca47c/txkoji-0.10.0.tar.gz"
}
]
}