{ "info": { "author": "David Barroso", "author_email": "dbarrosop@dravetech.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: System :: Networking" ], "description": "# pySIR\n\nPython API to interact with the SIR agent.\n\n# Installation\n\nTo install execute:\n\n pip install pySIR\n\n# Documentation\n\npySIR implements in python the SIR API. It is just a one to one mapping to avoid dealing with the specifics of making the calls, getting the data or catching the errors. It is just a convenient way of consuming the API. It brings no extra functionality.\n\nYou can use this library like this:\n\n from pySIR.pySIR import pySIR\n sir = pySIR('http://localhost:8080')\n\n result = sir.get_top_prefixes(start_time=\"2015-07-25T14:00\", end_time=\"2015-07-25T15:00\", limit_prefixes=10, net_masks=\"24\", exclude_net_masks=1)\n\nAfter every call you will get a ```Call``` object which has three attributes:\n\n* **meta** - Some information regarding the call.\n\n result.meta\n {u'length': 10, u'request_time': 4.2649, u'error': False}\n\n* **result** - The actual result of the call.\n\n result.result\n [{u'as_dst': 43650, u'sum_bytes': 96527904, u'key': u'194.132.196.0/22'}, {u'as_dst': 1299, u'sum_bytes': 50852480, u'key': u'0.0.0.0/0'}, {u'as_dst': 2856, u'sum_bytes': 42289633, u'key': u'86.128.0.0/10'}, {u'as_dst': 43650, u'sum_bytes': 27442840, u'key': u'194.132.197.72/29'}, {u'as_dst': 3320, u'sum_bytes': 23312608, u'key': u'79.192.0.0/10'}, {u'as_dst': 2856, u'sum_bytes': 22229909, u'key': u'86.128.0.0/11'}, {u'as_dst': 2856, u'sum_bytes': 19337668, u'key': u'86.128.0.0/12'}, {u'as_dst': 3320, u'sum_bytes': 19048046, u'key': u'84.128.0.0/10'}, {u'as_dst': 2856, u'sum_bytes': 18816388, u'key': u'109.144.0.0/12'}, {u'as_dst': 3320, u'sum_bytes': 18002994, u'key': u'91.0.0.0/10'}]\n\n* **parameters** - The parameters used for the call.\n\n result.parameters\n {u'exclude_net_masks': u'1', u'limit_prefixes': 10, u'start_time': u'2015-07-25T14:00', u'end_time': u'2015-07-25T15:00', u'net_masks': u'24'}\n\n## Supported methods\n\nAs I mentioned before, this is a 1:1 mapping of the raw API. You can check the supported methods in the official documentation:\n\nhttp://sdn-internet-router-sir.readthedocs.org/en/latest/api/api_v1.0.html\n\nI recommend you to quickly check the code in the file ```pySIR/pySIR.py``` to quickly see the names of the methods supported. The code and the names are quite straightforward so the code should be easy to read.\n\n## Passing variables\n\nWhen passing variables to the methods just send them *named* using the same names they have in the original API. For example:\n\n sir.get_top_prefixes(start_time=\"2015-07-13T14:00\", end_time=\"2015-07-13T15:00\", limit_prefixes=10, net_masks=\"24\", exclude_net_masks=1)\n sir.put_variables_by_category_and_name(development, whatever, content='231', extra_vars='{\"asd\": \"qwe\" , \"zxc\":\"poi\"}')\n\nThe same apply when you want to send data (for example when storing or updating a variable). For example:\n\n sir.post_variables(name='this_is_a_variable', content='231', category='development', extra_vars='{\"asd\": \"qwe\" , \"zxc\":\"poi\"}')\n sir.put_variables_by_category_and_name(development, whatever, content='231', extra_vars='')\n\n## SSL Verification\n\nBy default pySIR is going to check SSL certificates and raise an exception if the SSL certificate is not valid. However,\nyou can override this behavior and ignore certificates by initializing pySIR like this:\n\n sir = pySIR('https://localhost:8080', verify_ssl=False)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dbarrosop/pySIR", "keywords": null, "license": "Apache version 2.0", "maintainer": null, "maintainer_email": null, "name": "pySIR", "package_url": "https://pypi.org/project/pySIR/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pySIR/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/dbarrosop/pySIR" }, "release_url": "https://pypi.org/project/pySIR/0.46/", "requires_dist": null, "requires_python": null, "summary": "Python API to interact with the SIR agent", "version": "0.46" }, "last_serial": 1711480, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "e52ba94bffe5125b92ef72bcab2e4349", "sha256": "adbac23453bab7f027cb8136d9f7f3b9c823a60a7782e454bc769ee4cc9abe89" }, "downloads": -1, "filename": "pySIR-0.2.tar.gz", "has_sig": false, "md5_digest": "e52ba94bffe5125b92ef72bcab2e4349", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2102, "upload_time": "2015-07-21T14:31:57", "url": "https://files.pythonhosted.org/packages/fd/fc/89fb93aa4ffb1048645bb279ac6d8f433869aedbacfec98205683391d74e/pySIR-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "b40f2089be2c12f6a58b3882c8d580e9", "sha256": "66fc7abe2d72b15f7cbe0a301667ba4d87faaffc6a02ffebc6d95b7c371c60fa" }, "downloads": -1, "filename": "pySIR-0.3.tar.gz", "has_sig": false, "md5_digest": "b40f2089be2c12f6a58b3882c8d580e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6218, "upload_time": "2015-07-21T14:40:32", "url": "https://files.pythonhosted.org/packages/b0/39/0ca3de4b8b33e830ade515a1a68192cd7e7348ef5d747d968c60e0bd0bc6/pySIR-0.3.tar.gz" } ], "0.40": [ { "comment_text": "", "digests": { "md5": "b663e944236c770a13a972284658dd5f", "sha256": "a569de8b2ea02aaa569108911f916e0c1205a48d65a5faf5a1064604a781fcf8" }, "downloads": -1, "filename": "pySIR-0.40.tar.gz", "has_sig": false, "md5_digest": "b663e944236c770a13a972284658dd5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6234, "upload_time": "2015-07-22T07:44:33", "url": "https://files.pythonhosted.org/packages/95/c9/6d8b54931f772569d3769a7cfb94ad3633c7befb00b0e2faf5774d99b78d/pySIR-0.40.tar.gz" } ], "0.41": [ { "comment_text": "", "digests": { "md5": "7c87e15add898b0babe9753556620714", "sha256": "76ca5364a7388ee546dc3930613573e514a242d8713d32dcf6807d30c1b954ef" }, "downloads": -1, "filename": "pySIR-0.41.tar.gz", "has_sig": false, "md5_digest": "7c87e15add898b0babe9753556620714", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6489, "upload_time": "2015-07-30T14:26:57", "url": "https://files.pythonhosted.org/packages/b8/a6/2b4368aa6dfbbc97daa868b68bf80a9345abf51aa56822a72ae984ee1164/pySIR-0.41.tar.gz" } ], "0.42": [ { "comment_text": "", "digests": { "md5": "60ce7d1f9486be2c0592c26377be8084", "sha256": "0c4894c0ef840ef5e34d7286439f88d3bce87dac677a20012c84ef3114a98d48" }, "downloads": -1, "filename": "pySIR-0.42.tar.gz", "has_sig": false, "md5_digest": "60ce7d1f9486be2c0592c26377be8084", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7789, "upload_time": "2015-07-31T09:53:51", "url": "https://files.pythonhosted.org/packages/86/58/8edb72e9992be5a45fa059dc06891a86e055601d595c68fb757e0a7e1a6c/pySIR-0.42.tar.gz" } ], "0.44": [ { "comment_text": "", "digests": { "md5": "11886e259b68e1c638502c3f3c3d3046", "sha256": "cae427a0fd90f48e8f43b68c7275828940fa08171671158cb926f27157ed4278" }, "downloads": -1, "filename": "pySIR-0.44.tar.gz", "has_sig": false, "md5_digest": "11886e259b68e1c638502c3f3c3d3046", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7806, "upload_time": "2015-08-14T10:54:30", "url": "https://files.pythonhosted.org/packages/b2/f9/fa98222b71616682445149c3335b18ee59dbc612afb52b7b4c1086788b17/pySIR-0.44.tar.gz" } ], "0.45": [ { "comment_text": "", "digests": { "md5": "b700bd083e232bc1abef10049d654173", "sha256": "63164739ce7d95b27481ab11395b08337c11861ce6675def6294e574379c77bc" }, "downloads": -1, "filename": "pySIR-0.45.tar.gz", "has_sig": false, "md5_digest": "b700bd083e232bc1abef10049d654173", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7839, "upload_time": "2015-08-19T13:42:40", "url": "https://files.pythonhosted.org/packages/41/d8/e86d2dfe5ec42446748036bc5a46118d7693b21d66c4d6656026724b52f0/pySIR-0.45.tar.gz" } ], "0.46": [ { "comment_text": "", "digests": { "md5": "9f0379c803e2ce2db1398b01afb17bef", "sha256": "207691694d518262fa32e4c30b43a6dd9ebadcaf773940d0b7e32fe9af8dac98" }, "downloads": -1, "filename": "pySIR-0.46.tar.gz", "has_sig": false, "md5_digest": "9f0379c803e2ce2db1398b01afb17bef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7825, "upload_time": "2015-09-07T10:08:48", "url": "https://files.pythonhosted.org/packages/d7/19/9b2b92888228cd7630e92c612b74ed0a2083bcc0ea735214ffc4dd5df1a6/pySIR-0.46.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f0379c803e2ce2db1398b01afb17bef", "sha256": "207691694d518262fa32e4c30b43a6dd9ebadcaf773940d0b7e32fe9af8dac98" }, "downloads": -1, "filename": "pySIR-0.46.tar.gz", "has_sig": false, "md5_digest": "9f0379c803e2ce2db1398b01afb17bef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7825, "upload_time": "2015-09-07T10:08:48", "url": "https://files.pythonhosted.org/packages/d7/19/9b2b92888228cd7630e92c612b74ed0a2083bcc0ea735214ffc4dd5df1a6/pySIR-0.46.tar.gz" } ] }