{"id":21258852,"url":"https://github.com/spacebro/pyspacebroclient","last_synced_at":"2025-03-15T06:35:03.711Z","repository":{"id":144090553,"uuid":"98527352","full_name":"spacebro/pySpacebroClient","owner":"spacebro","description":"Connect easily to a spacebro server","archived":false,"fork":false,"pushed_at":"2017-07-28T13:26:51.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T01:48:30.558Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacebro.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-27T11:17:43.000Z","updated_at":"2017-07-27T11:18:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"f402ca27-d495-47aa-86b4-cab632cfbc7b","html_url":"https://github.com/spacebro/pySpacebroClient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacebro%2FpySpacebroClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacebro%2FpySpacebroClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacebro%2FpySpacebroClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacebro%2FpySpacebroClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacebro","download_url":"https://codeload.github.com/spacebro/pySpacebroClient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695478,"owners_count":20332622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T04:11:11.103Z","updated_at":"2025-03-15T06:35:03.655Z","avatar_url":"https://github.com/spacebro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pySpacebroClient\n==================\n\n🌟 Connect easily to a [spacebro server](https://github.com/spacebro/spacebro).\n\na port of nodejs `spacebro-client \u003chttps://github.com/spacebro/spacebro-client/\u003e`_\n\n\nWhy\n---\n\nNo more custom socket.io server.\n\nEasily connect with socket.io to other clients.\n\nSpacebro offers an API to connect clients input and output together.\n\nInstallation\n------------\n\n.. code:: bash\n\n  pip install pySpacebroClient\n\nUsage\n-----\n\n1. Connect\n\n.. code:: python\n\n  from pySpacebroClient import SpacebroClient\n\n  settings = {\n      'host': 'spacebro.space',\n      'port': 3333,\n      'client': {\n          'name': 'python-bro'\n      },\n      'channelName': 'mychannelname'\n  }\n  spacebroClient = SpacebroClient(settings)\n  spacebroClient.wait()\n\n2. Emit a message for an app called `node-bro`\n\n.. code:: python\n\n  from pySpacebroClient import SpacebroClient\n\n  settings = {\n      'host': 'spacebro.space',\n      'port': 3333,\n      'client': {\n          'name': 'python-bro'\n          'out': {\n              'outMedia': {\n                  'eventName': 'outMedia',\n                  'description': 'Output media',\n                  'type': 'all'\n              }\n          }\n      },\n      'channelName': 'mychannelname',\n      'connection': 'python-bro/outMedia =\u003e node-bro/inMedia'\n  }\n  spacebroClient = SpacebroClient(settings)\n  spacebroClient.emit(settings.client.out.outMedia.eventName, {'value': 5})\n  spacebroClient.wait()\n\n3. Receive a message from an app called `chokibro`\n\n.. code:: python\n\n  from pySpacebroClient import SpacebroClient\n\n  def on_inMedia(self, args):\n      print('received', args)\n\n  settings = {\n      'host': 'spacebro.space',\n      'port': 3333,\n      'client': {\n          'name': 'python-bro'\n          'in': {\n              'inMedia': {\n                  'eventName': 'inMedia',\n                  'description': 'Input media',\n                  'type': 'all'\n              }\n          }\n      },\n      'channelName': 'mychannelname',\n      'connection': 'chokibro/outMedia =\u003e python-bro/inMedia'\n  }\n  spacebroClient = SpacebroClient(settings)\n  spacebroClient.on(settings.client['in'].inMedia.eventName, self.on_inMedia)\n  spacebroClient.wait()\n\ntest command\n============\n\n.. code:: bash\n\n  python -m tests.test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacebro%2Fpyspacebroclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacebro%2Fpyspacebroclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacebro%2Fpyspacebroclient/lists"}