{ "info": { "author": "SamHDev", "author_email": "sam02h.huddart@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Cosmo Network Discovery API \nDocumentation for The OpenSource Cosmo Network Discovery API \n\nThis is the main implemtation written in python. For other implementations see [Implemtations](implemtations.md)\nand for a description on the API and Protocol see [API Docs](apidocs.md)\n\n### Installation\n\nYou can Install it with Pip and PyPi\n```\npython3 -m pip install cosmodiscovery\n```\nor with Pip and Github without PyPi\n```\npython3 -m pip install git+https://github.com/SamHDev/CosmoDiscovery.git\n```\n\n### Usage\nImport the libary\n```py\nimport cosmodiscovery as discovery\n```\n#### A Discovery Server\n```py\nserver = discovery.DiscoveryServer()\nserver.listen()\n```\nYep! Thats it! \n\nIf you want a custom `scheme` or `port` you can do it like this:\n\n```py\nserver = discovery.DiscoveryServer(port=12892, scheme=\"_discovery._cosmo.home_device\"))\n```\nSending Custom Data with the discovery reply. `cls` is a `DiscoveryRequestMessage` Object\n```py\n@server.discovery_callback\ndef on_msg(cls):\ncls.reply(data={})\n```\n\n#### A Discovery Client\n\nCreate a DiscoveryClient Object like this\n```py\nserver = discovery.DiscoveryServer()\n```\nOr with Paramaters like so\n```py\nclient = discovery.DiscoveryClient(port=12892, scheme=\"_discovery._cosmo.home_device\"))\n```\n\nOne Created you can run this\n```py\nresults = client.discovery()\n```\nThis function returns a list of `DiscoveryResult` objects. If the list is empty, then no devices were found.\n\nIf you wish to add arguments such as custom data to send within the Discovery Request or shorten the discovey reply wait time\nyou can do so like this:\n`\nresults = discovery(timeout=1, data={})\n`\nAgain! Its that simple\n\n#### Further Documentation\nFor Further Documentation see docs.md\n\n---\n\nWritten for [CosmoHome](https://cosmosmarthome.com) by [SamHDev](https://github.com/SamHDev/). Licensed under `GNU General Public License v3.0` as per [License File](LICENSE)\n\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/SamHDev/CosmoDiscovery/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "cosmodiscovery", "package_url": "https://pypi.org/project/cosmodiscovery/", "platform": "", "project_url": "https://pypi.org/project/cosmodiscovery/", "project_urls": { "Homepage": "https://github.com/SamHDev/CosmoDiscovery/" }, "release_url": "https://pypi.org/project/cosmodiscovery/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "A Free Network Discovery Service", "version": "0.1.0" }, "last_serial": 5727804, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f9bca0f59047d5f650d9319ec5a8493a", "sha256": "4523ca40ed4b522ba3d209066f3af585bdfe55c5209d5281ae8f92fafffd2103" }, "downloads": -1, "filename": "cosmodiscovery-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f9bca0f59047d5f650d9319ec5a8493a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17507, "upload_time": "2019-08-25T19:39:55", "url": "https://files.pythonhosted.org/packages/22/0b/cc1fd5965bbaedff2fe1ea645c450c9e92da790de1cdb1a5876271a156f1/cosmodiscovery-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "25a0007693e2438917368184cd3461bf", "sha256": "719d7bd979b62a55464e99eb9c8d6790cd5a6cbae32f7f88320f324575ba7107" }, "downloads": -1, "filename": "cosmodiscovery-0.1.0.tar.gz", "has_sig": false, "md5_digest": "25a0007693e2438917368184cd3461bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3523, "upload_time": "2019-08-25T19:39:58", "url": "https://files.pythonhosted.org/packages/a8/24/fd2dcb6babee9ee93472cbccd45d42aad0914f4e146fdef6261dcab61e29/cosmodiscovery-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f9bca0f59047d5f650d9319ec5a8493a", "sha256": "4523ca40ed4b522ba3d209066f3af585bdfe55c5209d5281ae8f92fafffd2103" }, "downloads": -1, "filename": "cosmodiscovery-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f9bca0f59047d5f650d9319ec5a8493a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17507, "upload_time": "2019-08-25T19:39:55", "url": "https://files.pythonhosted.org/packages/22/0b/cc1fd5965bbaedff2fe1ea645c450c9e92da790de1cdb1a5876271a156f1/cosmodiscovery-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "25a0007693e2438917368184cd3461bf", "sha256": "719d7bd979b62a55464e99eb9c8d6790cd5a6cbae32f7f88320f324575ba7107" }, "downloads": -1, "filename": "cosmodiscovery-0.1.0.tar.gz", "has_sig": false, "md5_digest": "25a0007693e2438917368184cd3461bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3523, "upload_time": "2019-08-25T19:39:58", "url": "https://files.pythonhosted.org/packages/a8/24/fd2dcb6babee9ee93472cbccd45d42aad0914f4e146fdef6261dcab61e29/cosmodiscovery-0.1.0.tar.gz" } ] }