{"id":20509269,"url":"https://github.com/futuremind/hms","last_synced_at":"2025-10-23T18:49:19.272Z","repository":{"id":100256309,"uuid":"309678725","full_name":"FutureMind/hms","owner":"FutureMind","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-03T12:25:32.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T09:19:52.354Z","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/FutureMind.png","metadata":{"files":{"readme":"README.md","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":"2020-11-03T12:25:20.000Z","updated_at":"2020-11-03T12:32:05.000Z","dependencies_parsed_at":"2023-05-13T05:45:26.464Z","dependency_job_id":null,"html_url":"https://github.com/FutureMind/hms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FutureMind/hms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FutureMind%2Fhms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FutureMind%2Fhms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FutureMind%2Fhms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FutureMind%2Fhms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FutureMind","download_url":"https://codeload.github.com/FutureMind/hms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FutureMind%2Fhms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018576,"owners_count":26086396,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-15T20:23:40.479Z","updated_at":"2025-10-14T09:19:56.528Z","avatar_url":"https://github.com/FutureMind.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pushkit-python-sample\n\n![Sample](push_kit_server_sample.gif)\n\n\n\n\n## Table of Contents\n\n * [Introduction](#introduction)\n * [Installation](#installation)\n * [Configuration ](#configuration )\n * [Supported Environments](#supported-environments)\n * [Sample Code](#sample-code)\n * [License](#license)\n\n\n## Introduction\n\nPython sample code encapsulates APIs of the HUAWEI Push Kit server. It provides many sample programs about quick access to HUAWEI Push Kit for your reference or usage.\n\nThe following table describes packages of Python sample code.\n\n| Package    | Description                                                  |\n| ---------- | ------------------------------------------------------------ |\n| examples   | Sample code packages. Each package can run independently.    |\n| hms        | Package where APIs of the HUAWEI Push Kit server are encapsulated. |\n\n## Installation\n\nTo install pushkit-python-sample, you should extract the compressed ZIP file, execute the following command in the unzipped directory:\n```\npython setup.py install\n```\n\n## Supported Environments\nFor pushkit-python-sample, We currently support Python 3.8 and JetBrains PyCharm are recommended.\n\nAdd src file into source file your project:\n\nFile -\u003e Settings -\u003e Project:... -\u003e Project Structure -\u003e [click src file] -\u003e Mark as **Sources**\n\n\n## Configuration \nThe following table describes parameters of the initialize_app method.\n\n| Parameter      |    Description |\n| -------------  |   ------------------------------------------------------------------------- |\n| appid          |    App ID, which is obtained from app information. |\n| appsecret      |    Secret access key of an app, which is obtained from app information. |\n| token_server   |    URL for the Huawei OAuth 2.0 service to obtain a token, please refer to [Generating an App-Level Access Token](https://developer.huawei.com/consumer/en/doc/development/parts-Guides/generating_app_level_access_token). |\n| push_open_url  |    URL for accessing HUAWEI Push Kit, please refer to [Sending Messages](https://developer.huawei.com/consumer/en/doc/development/HMS-References/push-sendapi).|\n| test_device_token | Add test device token, please refer to [Receive Token Application](https://github.com/Huawei/Consumer/tree/master/Codelabs/PushKit) |\n\n\n## Sample Code\nDownload Python sample code in Downloading Server Sample Code.\n\n\nPython sample code uses the Messaging structure in the push_admin package as the entry. Each method in the Messaging \nstructure calls an API of the HUAWEI Push Kit server.\n\nThe following table describes methods in the Messaging structure.\n\n| Method              |     Description\n| -----------------   |     --------------------------------------------------- |\n| send_message        |     Sends a message to a device. |\n| subscribe_topic     |     Subscribes to a topic. |\n| unsubscribe_topic   |     Unsubscribes from a topic. |\n| list_topics         |     Queries the list of topics subscribed by a device. |\n| initialize_app      |     Initializes the configuration parameters. |\n\n1) Send an Android data message.\nCode location: examples/send_data_message.py\n\n2) Send an Android notification message.\nCode location: examples/send_notify_message.py\n\n3) Send a message by topic.\nCode location: examples/send_topic_message.py\n\n4) Send a message by conditions.\nCode location: examples/send_condition_message.py\n\n5) Send a message to a Huawei quick app.\nCode location: examples/send_instance_app_message.py\n\n6) Send a message through the WebPush agent.\nCode location: examples/send_webpush_message.py\n\n7) Send a message through the APNs agent.\nCode location: examples/send_apns_message.py\n\n8) Send a test message.\nCode location: examples/send_test_message.py\n\n## License\n\npushkit Python sample is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\n\u003e This project based on official [HMS Push Kit python integration](https://github.com/HMS-Core/hms-push-serverdemo-python) documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturemind%2Fhms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuturemind%2Fhms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturemind%2Fhms/lists"}