{"id":50318635,"url":"https://github.com/kaspagang/kaspy","last_synced_at":"2026-05-29T02:00:53.937Z","repository":{"id":44938227,"uuid":"445264457","full_name":"kaspagang/kaspy","owner":"kaspagang","description":"Python implementation of a kaspa grpc client","archived":false,"fork":false,"pushed_at":"2022-07-10T08:57:45.000Z","size":222,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-29T10:19:40.318Z","etag":null,"topics":["blockchain","client","client-side","dag","grpc","kaspa","kaspad","p2p","python","rpc","stub"],"latest_commit_sha":null,"homepage":"","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/kaspagang.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}},"created_at":"2022-01-06T18:02:53.000Z","updated_at":"2024-04-01T15:05:53.000Z","dependencies_parsed_at":"2022-07-20T09:34:06.713Z","dependency_job_id":null,"html_url":"https://github.com/kaspagang/kaspy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kaspagang/kaspy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspagang%2Fkaspy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspagang%2Fkaspy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspagang%2Fkaspy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspagang%2Fkaspy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaspagang","download_url":"https://codeload.github.com/kaspagang/kaspy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaspagang%2Fkaspy/sbom","scorecard":{"id":551195,"data":{"date":"2025-08-11","repo":{"name":"github.com/kaspagang/kaspy","commit":"ab953640c45eab766f4f69c6306f4c6e6bd599b1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENCE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENCE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-496j-2rq6-j6cc","Warn: Project is vulnerable to: PYSEC-2017-101","Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T10:55:26.257Z","repository_id":44938227,"created_at":"2025-08-20T10:55:26.257Z","updated_at":"2025-08-20T10:55:26.257Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33633468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":["blockchain","client","client-side","dag","grpc","kaspa","kaspad","p2p","python","rpc","stub"],"created_at":"2026-05-29T02:00:48.060Z","updated_at":"2026-05-29T02:00:53.930Z","avatar_url":"https://github.com/kaspagang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kaspy\n\nPython implementation of a kaspa-grpc client.\n \n\n## work in progress...\n\n**Breaking changes will occur without prior notice!**\n\n## Installaton:\n\n```bash\npip install kaspy\n```\n\n## Basic Documentaion:\n\n### Connecting to a RPC server with `connect()` or `auto_connect()`:\n\n```python\n\n# Import the kaspa client\nfrom kaspy.kaspa_clients import RPCClient\n\n#Initialize a client instance\nclient = RPCClient() \n\n#Connect to a predefined host\nclient.connect(host='\u003cip\u003e', port='\u003cport\u003e') \n\n#OR\n\n#Connect to a a publicaly broadcasted node from the dns_seed_servers.\nclient.auto_connect() \n#note: \n# 1) it may take a while to find a responsive nodes, timeout should be issued to not get stuck searching\n# 2) min node requirements for auto-connect is v0.12.2\n```\n\n### Sending a `request()`:\n\n*continued...*\n```python\n#define the command you want to send\ncommand = 'getInfoRequest'\n\n#build the payload for the command\npayload = {} #in our case we don't need to send additional information \n\n#send the request to the server and retrive the response\nresp  = client.request(command=command, payload=payload)\n\nprint(resp) # print response\n```\n\n### Subscribing to a stream with `subscribe()`:\n\n*continued...*\n```python \n\ncommand = 'notifyVirtualSelectedParentChainChangedRequest'\n\npayload = {}\n\ndef callback_func(notification : dict) # create a callback function to process the notifications\n    print(notification)\n\n#send the request to the server and retrive the response\nresp  = client.subscribe(command=command, payload=payload, callback=callback_func)\n\nimport time\ntime.sleep(5) # do stuff\n\nclient.unsubscribe(command) #unsubscribe to the stream\n```\n\n### Disenganging the service with `close()` or `disconnect()`\n\n*continued...*\n```python\n\nclient.disconnect() # finishes sending all requests and responses in Que, halts all operations, but keeps the channel open.\n\nclient.close() # closes the channel completely\n\n```\n\nfor more references on commands and payloads see:\n\nhttps://github.com/kaspanet/kaspad/blob/master/infrastructure/network/netadapter/server/grpcserver/protowire/rpc.md \n\nfor conversions to KaspaMessage command names reference:\n\nhttps://github.com/kaspagang/kaspy/blob/master/kaspy/protos/messages.proto\n## known issues:\n\n- `GLIBC_2.33' not found` : https://github.com/kaspagang/kaspy/issues/4 **[Workaround]**\n\n## To Do:\n~~Fix breaking issue~~\n\n~~Clean up, lots of unused code left in place.~~\n\n~~Implement error handling and timeouts~~\n\n~~Implement Streaming Callback handling of notification messages~~\n\n~~add to pip~~\n\n~~Implement auto-reconnect options to client~~\n\n- Implement P2P communication \n- 2nd cleanup\n- Documentation\n- Allow for commandline use\n- ...\n- Async Implementation\n\n## Requirements\n- grpc\n\n## Contribute\nfeel free to open a pull request. \n\n## Authors \n[@D-Stacks](https://github.com/D-Stacks)\n\n**Donations welcome @ kaspa:qzyjckdvgyxgwqj8zztw7qkqylsp864fyquzg8ykmmwkz58snu85zlk0mfy89**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaspagang%2Fkaspy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaspagang%2Fkaspy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaspagang%2Fkaspy/lists"}