{"id":37071743,"url":"https://github.com/grimadas/p2psimpy","last_synced_at":"2026-01-14T08:25:32.013Z","repository":{"id":57450075,"uuid":"442170408","full_name":"grimadas/p2psimpy","owner":"grimadas","description":"A simple simulator for peer-to-peer protocols based on SimPy","archived":false,"fork":false,"pushed_at":"2021-12-29T12:14:26.000Z","size":36,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-22T18:46:12.011Z","etag":null,"topics":["peer-to-peer","simulator"],"latest_commit_sha":null,"homepage":"","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/grimadas.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":"2021-12-27T13:37:36.000Z","updated_at":"2021-12-29T18:11:47.000Z","dependencies_parsed_at":"2022-08-25T23:00:18.486Z","dependency_job_id":null,"html_url":"https://github.com/grimadas/p2psimpy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/grimadas/p2psimpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimadas%2Fp2psimpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimadas%2Fp2psimpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimadas%2Fp2psimpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimadas%2Fp2psimpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grimadas","download_url":"https://codeload.github.com/grimadas/p2psimpy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grimadas%2Fp2psimpy/sbom","scorecard":{"id":445705,"data":{"date":"2025-08-11","repo":{"name":"github.com/grimadas/p2psimpy","commit":"dcd4962a86fd1fb20a86c0c172a813e52306e008"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/grimadas/p2psimpy/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/grimadas/p2psimpy/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/grimadas/p2psimpy/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/grimadas/p2psimpy/tests.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:16","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:17","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:14","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:15","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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 'main'"],"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":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T06:40:39.062Z","repository_id":57450075,"created_at":"2025-08-19T06:40:39.062Z","updated_at":"2025-08-19T06:40:39.062Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:16:59.381Z","status":"ssl_error","status_checked_at":"2026-01-14T08:13:45.490Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["peer-to-peer","simulator"],"created_at":"2026-01-14T08:25:31.385Z","updated_at":"2026-01-14T08:25:32.005Z","avatar_url":"https://github.com/grimadas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# p2psimpy\n\n[![Tests](https://github.com/grimadas/p2psimpy/workflows/Tests/badge.svg)](https://github.com/grimadas/p2psimpy/actions?workflow=Tests)\n[![PyPI](https://img.shields.io/pypi/v/p2psimpy.svg)](https://pypi.org/project/p2psimpy/)\n\n\nA simple simulator for peer-to-peer protocols based on [SimPy](https://simpy.readthedocs.io/en/latest/).\n\n  \nThe library provides means to simulate distributed or decentralized system run over a network.\nThe simulation runs as a multi-agent system each running  services and exchanging messages. \n\n## Installation \nIf you have pip installed, just type: \n```bash\n$ pip install p2psimpy \n```\n\n## Simulation example\n\nFor each simulation you should specify what each agent should run, the latency for the messages and the physical attributes on an agent.\n\nHere is an example in which peers are connected in a random network, and each peer runs a connection manager. The connection manager periodically pings the connected peers and disconnects them if they are unresponsive.  \n The simulation looks like this: \n\n```python\nimport networkx as nx\n\nfrom p2psimpy.config import Config, Dist, PeerType\nfrom p2psimpy.consts import MBit\nfrom p2psimpy.simulation import Simulation\nfrom p2psimpy.services.connection_manager import BaseConnectionManager\n\n# Locations and latency matrix between the locations \nclass Locations(Config):\n\tlocations = ['LocA', 'LocB']\n\tlatencies = {\n\t\t\t\t 'LocB': {'LocB': Dist('gamma', (1, 1, 1))},\n\t\t\t\t 'LocA': {'LocB': Dist('norm', (12, 2)), \n\t\t\t\t\t\t  'LocA': Dist('norm', (2, 0.5))},\n\t\t\t\t}\n\nN = 10\n# Generate network topology\nG = nx.erdos_renyi_graph(N, 0.5)\nnx.set_node_attributes(G, {k: 'basic' for k in G.nodes()}, 'type')\t\n\n# Physical properties of a peer. Peer will randomly get an attribute from a given distribution.\nclass PeerConfig(Config):\n\tlocation = Dist('sample', Locations.locations)\n\tbandwidth_ul = Dist( 'norm', (50*MBit, 10*MBit))\n\tbandwidth_dl = Dist( 'norm', (50*MBit, 10*MBit))\n\n# Each basic peer runs a ConnectionManager: that will periodically ping neighbours and check if they are online\nservices = (BaseConnectionManager,)\npeer_types = {'basic': PeerType(PeerConfig, services)}\n\nsim = Simulation(Locations, G, peer_types)\n# run the simulation for 1_000 milliseconds \nsim.run(1_000)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimadas%2Fp2psimpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrimadas%2Fp2psimpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrimadas%2Fp2psimpy/lists"}