{ "info": { "author": "Igor Maravi\u0107", "author_email": "igor@spotify.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "PUPETDB-API\n===========\n\nPuppetdb-api is python API around the puppetDB REST API.\n\nQUERIES\n_______\n\n*Nodes*, *facts* and *resources* can by queried by matching *nodes*, *facts* and *resources* with boolean operators *or*, *and* and *not*.\n\nAll the queries can be done as a *raw* queries, to obtain the raw JSON, that puppetDB returns.\n\nNODES\n~~~~~\n\n.. code-block:: pycon\n\n >>> p = PuppetDB('https://puppetdb.example.com')\n >>> p.nodes(Or(Fact('role', 'example', '='), Resource('Class', 'Klass_name', '=')))\n [u'node1.example.com', u'node2.example.com']\n >>> p.nodes_raw(Node('node1.example.com', '='))\n [{u'deactivated': None, u'facts_timestamp': u'2014-08-25T19:45:00.707Z', u'name': u'node1.example.com', u'report_timestamp': u'2014-08-25T19:46:09.616Z', u'catalog_timestamp': u'2014-08-25T19:45:14.896Z'}]\n\nFACTS\n~~~~~\n\nValues for multiple facts can be obtained by passing multiple facts names to *facts* argument.\n\n.. code-block:: pycon\n\n >>> p = PuppetDB('https://puppetdb.example.com')\n >>> p.facts(query=And(Fact('role', 'example', '='), Not(Resource('Class', 'Klass_name', '='))), facts=['role', 'hostname'])\n {u'hostname': [u'hostname1'], u'role': [u'example']}\n >>> p.facts_raw(Node('node1.example.com', '~'))\n [{u'certname': u'node1.example.com', u'name': u'clientversion', u'value': u'3.8.7'}, {u'certname': u'node1.example.com', u'name': u'uptime_hours', u'value': u'656'}]\n\nRESOURCES\n~~~~~~~~~\n\nValues for multiple resources can be obtained by passing multiple resources names to *resources* argument.\n\n.. code-block:: pycon\n\n >>> p = PuppetDB('https://puppetdb.example.com')\n >>> p.resources(query=And(Fact('role', 'example', '='), Not(Resource('Class', 'Klass_name', '='))), resources=['Some_resource'])\n {u'Some_resource': [u'Resource_title']}\n >>> p.resources_raw(query=Node('node1.example.com', '~'), resources=['Some_resource'])\n [{u'certname': u'node1.example.com', u'resource': u'8df598f3923a05e543e884d247d74cac08087a45', u'parameters': {}, u'title': u'resource_title', u'tags': [u'tag1', u'tag2'], u'exported': False, u'file': u'/etc/puppet/environments/example/example.pp', u'line': 25, u'type': u'Some_resource'}]\n\nINSTALL\n_______\n\n.. code-block:: bash\n\n $ pip install puppetdb_api", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/i-maravic/puppetdb-api/tarball/1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/i-maravic/puppetdb-api", "keywords": null, "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "puppetdb_api", "package_url": "https://pypi.org/project/puppetdb_api/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/puppetdb_api/", "project_urls": { "Download": "https://github.com/i-maravic/puppetdb-api/tarball/1.1", "Homepage": "https://github.com/i-maravic/puppetdb-api" }, "release_url": "https://pypi.org/project/puppetdb_api/1.1/", "requires_dist": null, "requires_python": null, "summary": "Python wrapper for puppetDB API", "version": "1.1" }, "last_serial": 1204274, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "2aa122ee373831392923cf67378ac1a8", "sha256": "be81072d9b800ace84d723abf320a7d7c5887c26bb6d856b47ce46add5daa47f" }, "downloads": -1, "filename": "puppetdb_api-1.0.tar.gz", "has_sig": false, "md5_digest": "2aa122ee373831392923cf67378ac1a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5796, "upload_time": "2014-08-25T21:45:38", "url": "https://files.pythonhosted.org/packages/df/07/f4ee769aa8aedb581ee82e2668e8ad2d15f25dad695135c747e1696af99d/puppetdb_api-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "0310e4b877d4578e4ad74ae694a8cf0c", "sha256": "a64b305a976d2256be40259e777c8d654f8cb29e83fc06597c54c028eb45e2c7" }, "downloads": -1, "filename": "puppetdb_api-1.1.tar.gz", "has_sig": false, "md5_digest": "0310e4b877d4578e4ad74ae694a8cf0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6011, "upload_time": "2014-08-27T17:00:17", "url": "https://files.pythonhosted.org/packages/22/c7/d4562fb8bd57a165185db41fb6b0e293d88d61118fa568060fb62db1ee8a/puppetdb_api-1.1.tar.gz" } ], "1.1-dev": [ { "comment_text": "", "digests": { "md5": "83951b7623a0e5f6c0c7fe70b7c6e7fb", "sha256": "93b46ef869bdcba41c45901e9f62c25065505d4c944c3b34cb65841db9cf81a2" }, "downloads": -1, "filename": "puppetdb_api-1.1-dev.tar.gz", "has_sig": false, "md5_digest": "83951b7623a0e5f6c0c7fe70b7c6e7fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6023, "upload_time": "2014-08-27T16:55:57", "url": "https://files.pythonhosted.org/packages/79/3c/c2b1f1ada621cc7955c28a41fc5b9f99d3dce830414fec406e6be5806338/puppetdb_api-1.1-dev.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0310e4b877d4578e4ad74ae694a8cf0c", "sha256": "a64b305a976d2256be40259e777c8d654f8cb29e83fc06597c54c028eb45e2c7" }, "downloads": -1, "filename": "puppetdb_api-1.1.tar.gz", "has_sig": false, "md5_digest": "0310e4b877d4578e4ad74ae694a8cf0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6011, "upload_time": "2014-08-27T17:00:17", "url": "https://files.pythonhosted.org/packages/22/c7/d4562fb8bd57a165185db41fb6b0e293d88d61118fa568060fb62db1ee8a/puppetdb_api-1.1.tar.gz" } ] }