{ "info": { "author": "Fabio Viola, Francesco Antoniazzi", "author_email": "fabio.viola@unibo.it, francesco.antoniazzi@unibo.it", "bugtrack_url": null, "classifiers": [], "description": "# SEPA-python3-APIs\nClient-side libraries for the SEPA platform (Python3)\n\n## Installation and usage\n\nClone the repository.\n\n```\ncd SEPA-python3-APIs\nsudo python3 setup.py build\nsudo python3 setup.py sdist\nsudo python3 setup.py install\n```\n\nTo use the classes you have to import them in this way:\n```\nfrom sepy. import *\n```\n\nFor example, if you want to import the SAPObject (used to handle JSAP files) \nyou have to write:\n```python3\nfrom sepy.SAPObject import *\n```\n\nThis library consists of 5 modules that can be used for different purposes:\n\n- SAPObject: An handler class for SAP files\n- SEPA: A low-level class used to develop a client for SEPA\n- ConnectionHandler: A class for connection handling\n- Exceptions\n- tablaze: A runnable script (also callable as a function, to nicely print SEPA output)\n\nLet's talk about some classes deeply:\n\n## SEPA\n\nThese APIs allow to develop a client for the SEPA platform using a simple interface. \nFirst of all the class SEPA must be initialized. Then the standard methods \nto interact with the broker are available.\n\n### Parameters:\n- sapObject :\n A SAPObject file Default = None\n- logLevel :\n A number indicating the desired log level. Default = 40\nThe parameters are optional. If present, they activate query, update, subscribe, \nmethods by SAPObject pick. If absent, only the equivalnt `sparql_*` methods \nare available, giving the host communication information each time.\n\n### Attributes:\n- logger\n- sap:\n the SAPObject\n- connectionManager :\n The underlying responsible for network connections\n\n### Creating a SEPA client\n\n```python3\nmySAP = open(path_to_sap,\"r\")\nsap = SAPObject(yaml.load(mySAP))\nsc = SEPA(sapObject=sap)\n```\n\n### Query and Update\n\nThese four methods (`query`, `sparql_query`, `update`, `sparql_update`, \n`query_all`, `clear`) expect either a sap entry or a SPARQL query/update. \nIn addition, it is possible to overwrite the sap communication parameters \nwith sepa. When a new query/update is issued, it may be preferrable to \ncatch the `RegistrationFailedExceptions`, `TokenExpiredException` and \n`TokenRequestFailedException` errors. The query methods return the SEPA answer.\n\n### Subscribe and Unsubscribe\n\nThe `subscribe` and `sparql_subscribe` primitive requires a sap entry or \na SPARQL query, an alias for the subscription, an handler (a lambda expression\nor a method with two parameters, one for added, the other for removed) \nand if needed the overwriting params for communication. \nThe `unsubscribe` primitive only needs to know the ID of the subscription.\n\n## SAPObject\n\nThis package supports Semantic Application Profiles. The package is encoding\nfree, since it expects a dictionary in input. Therefore, for a ysap we have\n```\nmySAP = open(path_to_sap,\"r\")\nsap = SAPObject(yaml.load(mySAP))\n```\nwhile for a jsap we have\n```\nmySAP = open(path_to_sap,\"r\")\nsap = SAPObject(json.load(mySAP))\n```\n\n## Something else?\n\nDocumentation is being written...\n\n## Foreseen changes\nMinors, plus the addition of some utilities.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/arces-wot/SEPA-python3-APIs", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "sepy", "package_url": "https://pypi.org/project/sepy/", "platform": "", "project_url": "https://pypi.org/project/sepy/", "project_urls": { "Homepage": "https://github.com/arces-wot/SEPA-python3-APIs" }, "release_url": "https://pypi.org/project/sepy/0.3/", "requires_dist": [ "websocket-client", "argparse", "prettytable", "pyyaml", "jinja2" ], "requires_python": "", "summary": "Client-side libraries for the SEPA platform (Python3)", "version": "0.3" }, "last_serial": 4744112, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "97b4d69c3123ab2a9549a97ecc82a760", "sha256": "1d45328e5f97dd55d14814649e6e031dde10c1b7d19549bc72935e5d53d87425" }, "downloads": -1, "filename": "sepy-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "97b4d69c3123ab2a9549a97ecc82a760", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22141, "upload_time": "2019-01-26T17:49:59", "url": "https://files.pythonhosted.org/packages/48/94/8432ead21fb95f405f0fd7221be46bd1eebfa929721ba95e2b280184909a/sepy-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9d6ff88673427e904f0f19666dbe24ec", "sha256": "b470806a2cb4c6acdd9c7db828ef7e9853808ae4a187c414a4b705af3b238df0" }, "downloads": -1, "filename": "sepy-0.3.tar.gz", "has_sig": false, "md5_digest": "9d6ff88673427e904f0f19666dbe24ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14572, "upload_time": "2019-01-26T17:50:03", "url": "https://files.pythonhosted.org/packages/0a/8f/bcc0b1296c8c6eb362a4eeb375ce9f7d0fd5ab5cfd6438e50cbd1e58be41/sepy-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "97b4d69c3123ab2a9549a97ecc82a760", "sha256": "1d45328e5f97dd55d14814649e6e031dde10c1b7d19549bc72935e5d53d87425" }, "downloads": -1, "filename": "sepy-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "97b4d69c3123ab2a9549a97ecc82a760", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22141, "upload_time": "2019-01-26T17:49:59", "url": "https://files.pythonhosted.org/packages/48/94/8432ead21fb95f405f0fd7221be46bd1eebfa929721ba95e2b280184909a/sepy-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9d6ff88673427e904f0f19666dbe24ec", "sha256": "b470806a2cb4c6acdd9c7db828ef7e9853808ae4a187c414a4b705af3b238df0" }, "downloads": -1, "filename": "sepy-0.3.tar.gz", "has_sig": false, "md5_digest": "9d6ff88673427e904f0f19666dbe24ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14572, "upload_time": "2019-01-26T17:50:03", "url": "https://files.pythonhosted.org/packages/0a/8f/bcc0b1296c8c6eb362a4eeb375ce9f7d0fd5ab5cfd6438e50cbd1e58be41/sepy-0.3.tar.gz" } ] }