{"id":23469883,"url":"https://github.com/vapor-ware/synse-client-python","last_synced_at":"2025-08-15T14:14:56.087Z","repository":{"id":52697196,"uuid":"152621810","full_name":"vapor-ware/synse-client-python","owner":"vapor-ware","description":"Python client for interacting with Synse Server","archived":false,"fork":false,"pushed_at":"2023-01-04T03:10:08.000Z","size":157,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-16T23:06:46.254Z","etag":null,"topics":["async","http-client","python","synse","websocket-client"],"latest_commit_sha":null,"homepage":"https://synse-client-python.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vapor-ware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-11T16:22:45.000Z","updated_at":"2021-01-13T15:39:47.000Z","dependencies_parsed_at":"2023-02-01T18:16:42.765Z","dependency_job_id":null,"html_url":"https://github.com/vapor-ware/synse-client-python","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Fsynse-client-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Fsynse-client-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Fsynse-client-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-ware%2Fsynse-client-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vapor-ware","download_url":"https://codeload.github.com/vapor-ware/synse-client-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647256,"owners_count":21139081,"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":["async","http-client","python","synse","websocket-client"],"created_at":"2024-12-24T15:36:44.465Z","updated_at":"2025-04-12T23:46:18.617Z","avatar_url":"https://github.com/vapor-ware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Synse Client (Python)\n\nThe official Python client for the [Synse](https://github.com/vapor-ware/synse) API.\n\nThis package provides clients for [Synse Server's](https://github.com/vapor-ware/synse-server)\nHTTP and WebSocket API, making it easy to control and manage physical and virtual devices\nand infrastructure from Python.\n\n## Installation\n\nThe Synse Python client package can be installed with `pip`:\n\n```\npip install synse\n```\n\n## Compatibility\n\nBelow is a table describing the compatibility of Synse python client versions with Synse platform versions.\n\n|                            | Synse v2 | Synse v3 |\n| -------------------------- | -------- | -------- |\n| *synse* python client v1.x | ✗        | ✓        |\n\n## Documentation\n\n\u003e https://synse-client-python.readthedocs.io\n\nIn addition to the hosted documentation, the package source code is well-commented,\nproviding basic information on client capabilities and the Synse data model.\n\nFor more information on the Synse platform, see the\n[Synse Documentation](https://synse.readthedocs.io).\n\n## Example\n\nBelow is a basic example of using the HTTP API, showcasing getting the server status,\ngetting the devices managed by the server, and reading from devices.\n\n```python\n\nimport asyncio\nfrom synse import client\n\n\nasync def main():\n    async with client.HTTPClientV3(host='localhost') as c:\n\n        # Get the status\n        resp = await c.status()\n        print(f'Status:    {resp.status}')\n        print(f'Timestamp: {resp.timestamp}')\n\n        # Get all device IDs\n        print('Devices:')\n        for device in await c.scan():\n            print(f' • {device.id}')\n\n        # Read from all devices\n        print('Readings:')\n        for reading in await c.read():\n            print('{:\u003c15}{} {}'.format(\n                reading.type,\n                reading.value,\n                reading.unit['symbol']if reading.unit else '',\n            ))\n\n\nif __name__ == '__main__':\n    asyncio.get_event_loop().run_until_complete(main())\n\n```\n\nRunning the above prints the following:\n\n```\nStatus:    ok\nTimestamp: 2020-04-08 18:17:19+00:00\nDevices:\n • 01976737-085c-5e4c-94bc-a383d3d130fb\n • 0570c34a-32fd-56c5-a0a3-d4a229e89536\n • 0da9a0cb-9d58-5ac7-8293-7c29485fa65f\n • 1b714cf2-cc56-5c36-9741-fd6a483b5f10\n • 494bd3ed-72ec-53e9-ba65-729610516e25\n • 51fe41da-7631-5984-a93e-bc544f31a6e9\n • 6944ec43-2dc5-5b3a-a934-8f3937d7e93d\n • 69c2e1e2-e658-5d71-8e43-091f68aa6e84\n • 89fd576d-462c-53be-bcb6-7870e70c304a\n • 9669ca7a-41c1-5ad8-8c45-c359ca47f7f4\n • 9907bdfa-75e1-5af5-8385-87184f356b22\n • 998e6025-ddfb-533a-9efe-dd26d512b555\n • a75917de-920c-59b0-9df3-7d95b4cc50f8\n • b079f4b8-42b8-5e62-8ee7-b74040a40561\n • b30f844d-f0db-557f-b073-893917f909ad\n • b9324904-385b-581d-b790-5e53eaabfd20\n • bc583d62-c9c9-5778-863b-0ebe360ebcb0\n • c2f6f762-fa30-5f0a-ba6c-f52d8deb3c07\n • d755b2a9-1df5-5202-ab9f-f9b928592e1a\n • dde22569-deea-5d06-a0a4-1320993c110a\n • e8525fdf-73f1-5e2b-aa45-17ad12199a49\n • f041883c-cf87-55d7-a978-3d3103836412\n • fef34490-4952-5e92-bf4d-aad169df980e\nReadings:\nstatus         locked \ntemperature    6 C\ndirection      forward \nfrequency      0 RPM\npower          1919 W\npower          2072 W\nenergy         680 kWh\nstate          off \ncolor          000000 \nstate          off \ncolor          000000 \nstate          ready \nstatus         stopped \nposition       1 \npower          1994 W\npower          2003 W\nenergy         680 kWh\nvoltage        275 V\npressure       5 Pa\ntemperature    91 C\ntemperature    18 C\nspeed          40 mm/s\nhumidity       60 %\ntemperature    62 C\ntemperature    98 C\npressure       -2 Pa\ntemperature    6 C\npower          2055 W\nvoltage        307 V\n```\n\nNote that while the client is async by default, individual commands may be\nrun synchronously when wrapped with the client's `sync` method, e.g.\n\n```python\nfrom synse import client\n\nc = client.HTTPClientV3(host='localhost')\n\nresp = c.sync(c.status())\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-ware%2Fsynse-client-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvapor-ware%2Fsynse-client-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-ware%2Fsynse-client-python/lists"}