{"id":24592716,"url":"https://github.com/synodriver/qingping_sdk","last_synced_at":"2026-02-02T09:32:43.324Z","repository":{"id":270219258,"uuid":"909576707","full_name":"synodriver/qingping_sdk","owner":"synodriver","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-30T06:38:24.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T09:26:14.942Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/synodriver.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-12-29T06:05:07.000Z","updated_at":"2025-05-08T11:03:52.000Z","dependencies_parsed_at":"2024-12-30T06:46:42.375Z","dependency_job_id":null,"html_url":"https://github.com/synodriver/qingping_sdk","commit_stats":null,"previous_names":["synodriver/qingpingiot","synodriver/qingping_sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/synodriver/qingping_sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fqingping_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fqingping_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fqingping_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fqingping_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/synodriver","download_url":"https://codeload.github.com/synodriver/qingping_sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/synodriver%2Fqingping_sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29009631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T08:40:12.472Z","status":"ssl_error","status_checked_at":"2026-02-02T08:40:10.926Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-01-24T10:16:00.234Z","updated_at":"2026-02-02T09:32:43.307Z","avatar_url":"https://github.com/synodriver.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003ci\u003e✨ qingping_sdk ✨ \u003c/i\u003e\u003c/h1\u003e\n\n\n[![pypi](https://img.shields.io/pypi/v/qingping_sdk.svg)](https://pypi.org/project/qingping_sdk/)\n![python](https://img.shields.io/pypi/pyversions/qingping_sdk)\n![implementation](https://img.shields.io/pypi/implementation/qingping_sdk)\n![wheel](https://img.shields.io/pypi/wheel/qingping_sdk)\n![license](https://img.shields.io/github/license/synodriver/qingping_sdk.svg)\n![action](https://img.shields.io/github/actions/workflow/status/synodriver/qingping_sdk/upload.yaml?branch=main)\n\n# Usage \n```python\nimport os\nimport time\nfrom qingping_sdk import Client\n\nasync def main():\n    async with Client(os.getenv(\"APP_KEY\"), os.getenv(\"APP_SECRET\")) as client:\n        device = await client.get_devices()\n        print(device)\n        mac = device[\"devices\"][0][\"info\"][\"mac\"]\n        print(\n            await client.get_history_data(\n                mac, int(time.time()) - 3600, int(time.time())\n            )\n        )\n        print(\n            await client.get_history_events(\n                mac, int(time.time()) - 3600, int(time.time())\n            )\n        )\n        d = await client.change_settings(\n            [mac], 60, 60\n        )\n        alert = await client.get_alert(mac)\n        print(alert)\n        print(await client.delete_alert(mac, [alert[\"alert_configs\"][0][\"id\"]]))\n        print(\"---groups----\")\n        print(await client.get_groups())\n        print(\"---sn----\")\n        print(await client.get_device_info([mac], [\"sn\"]))\n\nasyncio.run(main())\n```\n\n# Public functions\n```python\nclass Client:\n\n    def __init__(self, app_key: str, app_secret: str, endpoint: str = None, api_endpoint: str = None, client_session: Incomplete | None = None, close_on_exit: bool = True, loop: asyncio.AbstractEventLoop = None, **kw) -\u003e None: ...\n    async def aclose(self) -\u003e None: ...\n    async def __aenter__(self): ...\n    async def __aexit__(self, exc_type, exc_val, exc_tb): ...\n    async def send_request(self, method: str = 'GET', url: str = None, params: dict = None, json: dict = None): ...\n    async def bind_device(self, device_token: str, product_id: int, timestamp: int = None) -\u003e Device: ...\n    async def delete_device(self, mac: list[str], timestamp: int = None): ...\n    async def get_devices(self, group_id: int = None, offset: int = None, limit: int = None, role: str = None, timestamp: int = None) -\u003e DeviceResponse: ...\n    async def get_history_data(self, mac: str, start_time: int, end_time: int, timestamp: int = None, offset: int = None, limit: int = None) -\u003e HistoryDataResponse: ...\n    async def get_history_events(self, mac: str, start_time: int, end_time: int, timestamp: int = None, offset: int = None, limit: int = None) -\u003e HistoryEventResponse: ...\n    async def change_settings(self, mac: list[str], report_interval: int, collect_interval: int, timestamp: int = None): ...\n    async def add_alert(self, mac: str, alert_config: AlertConfig, timestamp: int = None): ...\n    async def get_alert(self, mac: str, timestamp: int = None) -\u003e GetAlertResponse: ...\n    async def change_alert(self, mac: str, alert_config: AlertConfig, timestamp: int = None): ...\n    async def delete_alert(self, mac: str, config_id: list[int], timestamp: int = None): ...\n    async def get_groups(self, timestamp: int = None) -\u003e GetGroupsResponse: ...\n    async def get_device_info(self, mac_list: list[str], profile: list[str], timestamp: int = None) -\u003e DeviceInfoResponse: ...\n\n\n@dataclass\nclass Event:\n    sop: bytes\n    cmd: int\n    length: int\n    payload: bytes\n    checksum: int\n    @property\n    def keys(self) -\u003e dict: ...\n    @keys.setter\n    def keys(self, value) -\u003e None: ...\n    def to_bytes(self) -\u003e bytes: ...\n    def __init__(self, sop, cmd, length, payload, checksum) -\u003e None: ...\n\ndef parse_history_data(data: bytes): ...\ndef build_history_data(time: int, internal: int, history: list) -\u003e bytes: ...\n\nclass Connection:\n    def __init__(self) -\u003e None: ...\n    def feed_data(self, data: bytes) -\u003e Generator[Event, None, None]: ...\n    def send(self, event: Event) -\u003e bytes: ...\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Fqingping_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynodriver%2Fqingping_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynodriver%2Fqingping_sdk/lists"}