{ "info": { "author": "John Hutchison", "author_email": "hutch@evident.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython" ], "description": "ESP SDK Python\n==============\n\nA Python interface for calling the Evident.io_ API.\n\n.. _Evident.io: https://evident.io\n\nThis is still being built and subject to changes.\n\nInstallation\n------------\n\nInstall the latest stable using pip::\n\n pip install esp\n\nIf you prefer to install from the latest git HEAD, you can use the setup.py script::\n\n git clone https://github.com/EvidentSecurity/esp-sdk-python\n cd esp-sdk-python\n python setup.py install\n\nConfiguration\n-------------\n\nThe recommended way to set your keys is with environment variables. Export one\nfor your access key and another one for your secret access key::\n\n export ENV['ESP_ACCESS_KEY_ID']='access key from ESP'\n export ENV['ESP_SECRET_ACCESS_KEY']='secret access key from ESP'\n\nYou can also set them in the ESP module directly::\n\n from esp.settings import settings\n \n settings.access_key_id = 'access key from ESP'\n settings.secret_access_key = 'secret access key from ESP'\n\nIf you need to use an http proxy to hit the ESP API, you can set that using the\nsettings as well::\n\n settings.http_proxy = 'your-proxy-uri:8080'\n\nFor appliance users, you can change the host the SDK points at in the settings::\n\n settings.host = 'esp.my-host'\n\nUsage\n-----\n\nAll resources provided are class objects. You they export common methods to help\nyou interact with the ESP API. Below are a few examples that describe how the\nSDK can be used.\n\nImport the SDK using the \"esp\" namespace::\n\n In [1]: import esp\n\nFetching reports is simple::\n\n In [2]: reports = esp.Report.find()\n\n In [3]: reports\n Out[3]: \n\nThis returns a paginated collection object that will let you navigate the pages returned::\n\n In [4]: reports.current_page_number\n Out[4]: '1'\n\n In [5]: reports = reports.next_page()\n\n In [6]: reports.current_page_number\n Out[6]: '2'\n\nThis object acts like a list and supports indexing and the len() function::\n\n In [7]: len(reports)\n Out[7]: 20\n\n In [8]: reports[0]\n Out[8]: \n\nLets checkout that report::\n\n In [10]: report.id_\n Out[10]: '592'\n\n In [11]: report.status\n Out[11]: 'complete'\n\n In [12]: report.alerts\n Out[12]: \n\nLooks like it's complete and we have alerts attached to it. calling .alerts\nreturns a PaginatedCollection of Alert objects, lets look at one::\n\n In [14]: alert = report.alerts[0]\n\n In [15]: alert.id_\n Out[15]: '97'\n\n In [16]: alert.resource\n Out[16]: 'fisheye-rel-build'\n\n In [17]: alert.status\n Out[17]: 'pass'\n\n In [19]: alert.signature.name\n Out[19]: 'VPC ELB Security Groups'\n\nIn that last line we accessed the signature object by calling .signature, then\ncalled .name on that object to get the name of the signature. Method chaining like\nthis makes using the ESP API data very useful and simple.\n\nOkay, so we know a report ID we want to look up, lets try that::\n\n In [20]: report = esp.Report.find(1)\n\n In [21]: report\n Out[21]: \n\nHere we used find() again, but we passed in an ID as a argument. This did not\nreturn a paginated collection, but instead returned an instance of the report by\nitself.\n\nSo maybe we want to get a collection of signatures who check for DNS related stuff,\nwe can do that::\n\n In [22]: signatures = esp.Signature.where(name_cont='dns')\n\n In [23]: len(signatures)\n Out[23]: 3\n\n In [24]: signatures[0].name\n Out[24]: 'Global DNS TCP'\n\n In [25]: signatures[1].name\n Out[25]: 'Global DNS UDP'\n\n In [26]: signatures[2].name\n Out[26]: 'Route53 DNS'\n\nLooks like the API gaves us 3 and all of them have DNS in the name. Good job!\nwhere() takes parameters and converts them into search filters for ESP. There\nis a list of predicates available can be found here http://api-docs.evident.io/?json#available-predicates\n\nPredicates are used within Evident.io API search queries to determine what information to match. For instance, the cont predicate, when added to the name attribute, will check to see if name` contains a value using a wildcard query.\n\nYou can add more to where() to form complex queries::\n\n In [2]: esp.Suppression.where(regions_code_start='us', resource_not_null='1')\n Out[2]: \n\nYou can also change the combinator for complex queries from the default AND to OR by adding the m='or' parameter::\n\n In [5]: esp.Suppression.where(regions_code_start='us', resource_not_null='1', m='or')", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "esp", "package_url": "https://pypi.org/project/esp/", "platform": "", "project_url": "https://pypi.org/project/esp/", "project_urls": null, "release_url": "https://pypi.org/project/esp/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Evident Security Platform (ESP) SDK for Python", "version": "0.2.0" }, "last_serial": 2947271, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "143ce42447a7a6a4a468791c1658b65f", "sha256": "21140538c7adb2d6f1be9f1696f9fec7cd86c3bdc9c94fdf75938b85865b595f" }, "downloads": -1, "filename": "esp-0.1.1.tar.gz", "has_sig": false, "md5_digest": "143ce42447a7a6a4a468791c1658b65f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 265945, "upload_time": "2016-06-24T17:17:26", "url": "https://files.pythonhosted.org/packages/93/eb/ff4c4befec5dc6591524e4d366904eea3d805ba8fd752d767316206f4542/esp-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4b75d1aa56853d6d373244442f453b0f", "sha256": "0f8f1d7ed78925f66a467050ecea8e9ee260f733d63c37b56e47ac665a36d69d" }, "downloads": -1, "filename": "esp-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4b75d1aa56853d6d373244442f453b0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 455333, "upload_time": "2016-06-30T16:51:13", "url": "https://files.pythonhosted.org/packages/e0/5a/ecd9ab6e12cfe8011cfef2c319334091ada72defdca8f0ac3413cf1bc61f/esp-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "be06624e071b19f6b766d3f08c62aa43", "sha256": "875eca1b4a3844f088b61a1e79581e8fe223bd9697bd930fe6ace50f62a70732" }, "downloads": -1, "filename": "esp-0.1.3.tar.gz", "has_sig": false, "md5_digest": "be06624e071b19f6b766d3f08c62aa43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452310, "upload_time": "2016-07-05T17:59:44", "url": "https://files.pythonhosted.org/packages/05/3d/b829368bdabf4e82dd33c20110ad63ce3abd8d7a7c1b0543b43324bf8cfd/esp-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "e22240da091dbca33efd514228e7cc6d", "sha256": "abba5f63d74c914e0142773fcf2d972f21da5111001f0862195ca38d14685120" }, "downloads": -1, "filename": "esp-0.1.4.tar.gz", "has_sig": false, "md5_digest": "e22240da091dbca33efd514228e7cc6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452362, "upload_time": "2016-07-28T22:54:52", "url": "https://files.pythonhosted.org/packages/b8/65/612e7f408381d8bef7915934456e9f53c390c5025c3fc28be4cf0f0c0c3a/esp-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "17e9be3fa3ba47d2b47709f06921ee76", "sha256": "afabb390e27aec8e1e6da1c642231f343305d64b3949fa9c063995d5997bf26e" }, "downloads": -1, "filename": "esp-0.1.5.tar.gz", "has_sig": false, "md5_digest": "17e9be3fa3ba47d2b47709f06921ee76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452096, "upload_time": "2017-03-29T18:46:54", "url": "https://files.pythonhosted.org/packages/03/36/1443c70ece160f28cb72f8874101f005f03fdafb5d08f5e21ad3dc9cbd53/esp-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "839a719fd2e35e59d55356af784618a4", "sha256": "da1ccad34cbfd9a3e51571b164a99b3ecc28bcd5e163590f0b40f179cad71d64" }, "downloads": -1, "filename": "esp-0.1.6.tar.gz", "has_sig": false, "md5_digest": "839a719fd2e35e59d55356af784618a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452132, "upload_time": "2017-03-30T20:50:42", "url": "https://files.pythonhosted.org/packages/d4/1c/7a87358cdd7665ceb9e500d60e1b7cc42a45dc402e001d030d8aa11436b3/esp-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "caf232f9799dae7272e70e5d676f88ce", "sha256": "905f6f0a9f5847832db50dd3b9233ddf1f296378bc28c71fd7a1526dbe7d548f" }, "downloads": -1, "filename": "esp-0.1.7.tar.gz", "has_sig": false, "md5_digest": "caf232f9799dae7272e70e5d676f88ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452258, "upload_time": "2017-05-24T16:20:15", "url": "https://files.pythonhosted.org/packages/30/c7/a73709fd466eff0df3a4a05bbed34cba299e2009f93a34ebcf2699171eaa/esp-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "79f93e1f0dd024790f7a082c1ee570b9", "sha256": "a7fff469ac7f15133c8239d914419dcd30aa1069556f7d726c697004837efd21" }, "downloads": -1, "filename": "esp-0.1.8.tar.gz", "has_sig": false, "md5_digest": "79f93e1f0dd024790f7a082c1ee570b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452328, "upload_time": "2017-06-01T17:54:57", "url": "https://files.pythonhosted.org/packages/85/a0/b96e00f2ac9d98ca76dd9de0d70cc8a6b1da232a9050c00acbba83acd1e6/esp-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "09cd6cf57d4f838f8e9d5b37f327b114", "sha256": "88709199cada60579569063738bd696e1a2a1ec0b5a1e258aa568b7cde2e92de" }, "downloads": -1, "filename": "esp-0.1.9.tar.gz", "has_sig": false, "md5_digest": "09cd6cf57d4f838f8e9d5b37f327b114", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452341, "upload_time": "2017-06-02T18:31:15", "url": "https://files.pythonhosted.org/packages/b2/bb/a02c75c268f27b8782bd396ecfe149a0f42f567efc030e50d75e3a6efb1d/esp-0.1.9.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "eefbd24f0e0182d8828253506b93496d", "sha256": "d8d2b7fddf35d61af42ff9493d3ae5d99d7a029f9fc9882afee46fd9c5067d7d" }, "downloads": -1, "filename": "esp-0.2.0.tar.gz", "has_sig": false, "md5_digest": "eefbd24f0e0182d8828253506b93496d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452315, "upload_time": "2017-06-13T15:11:58", "url": "https://files.pythonhosted.org/packages/ed/be/fb27811ec7438cf2cda3c4a52f1219f851801dd4cdb523046c86cb859721/esp-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eefbd24f0e0182d8828253506b93496d", "sha256": "d8d2b7fddf35d61af42ff9493d3ae5d99d7a029f9fc9882afee46fd9c5067d7d" }, "downloads": -1, "filename": "esp-0.2.0.tar.gz", "has_sig": false, "md5_digest": "eefbd24f0e0182d8828253506b93496d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 452315, "upload_time": "2017-06-13T15:11:58", "url": "https://files.pythonhosted.org/packages/ed/be/fb27811ec7438cf2cda3c4a52f1219f851801dd4cdb523046c86cb859721/esp-0.2.0.tar.gz" } ] }