{"id":21081843,"url":"https://github.com/openvoiceos/ovos-backend-client","last_synced_at":"2025-05-16T09:31:12.749Z","repository":{"id":57893630,"uuid":"439081666","full_name":"OpenVoiceOS/ovos-backend-client","owner":"OpenVoiceOS","description":"client library for interaction with all compatible ovos-core backend services","archived":true,"fork":false,"pushed_at":"2024-11-11T18:05:40.000Z","size":340,"stargazers_count":3,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-04-29T08:07:01.475Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenVoiceOS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2021-12-16T17:58:18.000Z","updated_at":"2024-11-20T12:26:47.000Z","dependencies_parsed_at":"2023-07-13T22:09:22.869Z","dependency_job_id":"e7d04e9e-b9f1-4914-ab68-ba4f94d40ca4","html_url":"https://github.com/OpenVoiceOS/ovos-backend-client","commit_stats":{"total_commits":91,"total_committers":6,"mean_commits":"15.166666666666666","dds":0.6813186813186813,"last_synced_commit":"529a325a89ad6a13b08ff063e0244a19dedaf39b"},"previous_names":["openvoiceos/selene_api"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenVoiceOS%2Fovos-backend-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenVoiceOS%2Fovos-backend-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenVoiceOS%2Fovos-backend-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenVoiceOS%2Fovos-backend-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenVoiceOS","download_url":"https://codeload.github.com/OpenVoiceOS/ovos-backend-client/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254504764,"owners_count":22082082,"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":["hacktoberfest"],"created_at":"2024-11-19T20:11:12.818Z","updated_at":"2025-05-16T09:31:12.184Z","avatar_url":"https://github.com/OpenVoiceOS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OVOS Backend Client\n\nPython client library for interaction with several supported backends under a single unified interface\n\n- Personal backend - [self hosted](https://github.com/OpenVoiceOS/OVOS-local-backend)\n- Offline - support for setting your own api keys and query services directly\n\n## Backend Overview\n\n| API       | Offline | Personal |\n|-----------|---------|----------|\n| Admin     | yes [1] | yes      |\n| Device    | yes     | yes      |\n| Metrics   | yes     | yes      |\n| Dataset   | yes     | yes      |\n| OAuth     | yes     | yes      |\n| Wolfram   | yes [2] | yes      |\n| Geolocate | yes     | yes      |\n| STT       | yes [2] | yes      |\n| Weather   | yes [2] | yes      |\n| Email     | yes [2] | yes      |\n\n    [1] will update user level mycroft.conf\n    [2] needs additional configuration (eg. credentials)\n    [3] uses offline_backend functionality\n\n\n## Geolocation\n\n```python\nfrom ovos_backend_client.api import GeolocationApi\n\ngeo = GeolocationApi()\ndata = geo.get_geolocation(\"Lisbon Portugal\")\n# {'city': 'Lisboa',\n# 'country': 'Portugal', \n# 'latitude': 38.7077507, \n# 'longitude': -9.1365919, \n# 'timezone': 'Europe/Lisbon'}\n```\n\n## OpenWeatherMap Proxy\n\n```python\nfrom ovos_backend_client.api import OpenWeatherMapApi\n\nowm = OpenWeatherMapApi()\ndata = owm.get_weather()\n# dict - see api docs from owm onecall api\n```\n\nDEPRECATED - weather skill now uses open meteo\n\n## Wolfram Alpha proxy\n\n```python\nfrom ovos_backend_client.api import WolframAlphaApi\n\nwolf = WolframAlphaApi()\nanswer = wolf.spoken(\"what is the speed of light\")\n# The speed of light has a value of about 300 million meters per second\n\ndata = wolf.full_results(\"2+2\")\n# dict - see api docs from wolfram\n```\n\n## STT\n\na companion stt plugin is available - [ovos-stt-plugin-selene](https://github.com/OpenVoiceOS/ovos-stt-plugin-selene)\n\nDEPRECATED - use https://github.com/OpenVoiceOS/ovos-stt-plugin-server with a public server instead\n\n\n## Remote Settings\n\nTo interact with skill settings on selene\n\n```python\nfrom ovos_backend_client.settings import RemoteSkillSettings\n\n# in ovos-core skill_id is deterministic and safe\ns = RemoteSkillSettings(\"skill.author\")\n# in mycroft-core please ensure a valid remote_id\n# in MycroftSkill class you can use\n# remote_id = self.settings_meta.skill_gid\n# s = RemoteSkillSettings(\"skill.author\", remote_id=\"@|whatever_msm_decided\")\ns.download()\n\ns.settings[\"existing_value\"] = True\ns.settings[\"new_value\"] = \"will NOT show up in UI\"\ns.upload()\n\n# auto generate new settings meta for all new values before uploading\ns.settings[\"new_value\"] = \"will show up in UI\"\ns.generate_meta()  # now \"new_value\" is in meta\ns.upload()\n\n\n```\n\n## Selene Cloud\n\nby hijacking skill settings we allows storing arbitrary data in selene and use it across devices and skills\n\n```python\nfrom ovos_backend_client.cloud import SeleneCloud\n\ncloud = SeleneCloud()\ncloud.add_entry(\"test\", {\"secret\": \"NOT ENCRYPTED MAN\"})\ndata = cloud.get_entry(\"test\")\n```\n\nan encrypted version is also supported if you dont trust selene!\n\n```python\nfrom ovos_backend_client.cloud import SecretSeleneCloud\n\nk = \"D8fmXEP5VqzVw2HE\"  # you need this to read back the data\ncloud = SecretSeleneCloud(k)\ncloud.add_entry(\"test\", {\"secret\": \"secret data, selene cant read this\"})\ndata = cloud.get_entry(\"test\")\n```\n\n![](https://matrix-client.matrix.org/_matrix/media/r0/download/matrix.org/SrqxZnxzRNSqJaydKGRQCFKo)\n\n## Admin Api (local backend only!)\n\nsince local backend does not provide a web ui a [admin api](https://github.com/OpenVoiceOS/OVOS-local-backend#admin-api)\ncan be used to manage your devices\n\n```python\nfrom ovos_backend_client.api import AdminApi\n\nadmin = AdminApi(\"secret_admin_key\")\nuuid = \"...\"  # check identity2.json in the device you want to manage\n\n# manually pair a device\nidentity_json = admin.pair(uuid)\n\n# set device info\ninfo = {\"opt_in\": True,\n        \"name\": \"my_device\",\n        \"device_location\": \"kitchen\",\n        \"email\": \"notifications@me.com\",\n        \"isolated_skills\": False,\n        \"lang\": \"en-us\"}\nadmin.set_device_info(uuid, info)\n\n# set device preferences\nprefs = {\"time_format\": \"full\",\n         \"date_format\": \"DMY\",\n         \"system_unit\": \"metric\",\n         \"lang\": \"en-us\",\n         \"wake_word\": \"hey_mycroft\",\n         \"ww_config\": {\"phonemes\": \"HH EY . M AY K R AO F T\",\n                       \"module\": \"ovos-ww-plugin-pocketsphinx\",\n                       \"threshold\": 1e-90},\n         \"tts_module\": \"ovos-tts-plugin-mimic\",\n         \"tts_config\": {\"voice\": \"ap\"}}\nadmin.set_device_prefs(uuid, prefs)\n\n# set location data\nloc = {\n    \"city\": {\n        \"code\": \"Lawrence\",\n        \"name\": \"Lawrence\",\n        \"state\": {\n            \"code\": \"KS\",\n            \"name\": \"Kansas\",\n            \"country\": {\n                \"code\": \"US\",\n                \"name\": \"United States\"\n            }\n        }\n    },\n    \"coordinate\": {\n        \"latitude\": 38.971669,\n        \"longitude\": -95.23525\n    },\n    \"timezone\": {\n        \"code\": \"America/Chicago\",\n        \"name\": \"Central Standard Time\",\n        \"dstOffset\": 3600000,\n        \"offset\": -21600000\n    }\n}\nadmin.set_device_location(uuid, loc)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenvoiceos%2Fovos-backend-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenvoiceos%2Fovos-backend-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenvoiceos%2Fovos-backend-client/lists"}