{"id":37074457,"url":"https://github.com/eclipse-iofog/iofog-python-sdk","last_synced_at":"2026-01-14T08:46:41.599Z","repository":{"id":52401880,"uuid":"126320636","full_name":"eclipse-iofog/iofog-python-sdk","owner":"eclipse-iofog","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-12T05:31:25.000Z","size":115,"stargazers_count":11,"open_issues_count":3,"forks_count":8,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-12-10T06:48:39.041Z","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/eclipse-iofog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-22T10:46:19.000Z","updated_at":"2021-04-29T14:42:11.000Z","dependencies_parsed_at":"2022-08-31T20:01:55.638Z","dependency_job_id":null,"html_url":"https://github.com/eclipse-iofog/iofog-python-sdk","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-iofog/iofog-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-iofog%2Fiofog-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-iofog%2Fiofog-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-iofog%2Fiofog-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-iofog%2Fiofog-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-iofog","download_url":"https://codeload.github.com/eclipse-iofog/iofog-python-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-iofog%2Fiofog-python-sdk/sbom","scorecard":{"id":365372,"data":{"date":"2025-08-11","repo":{"name":"github.com/eclipse-iofog/iofog-python-sdk","commit":"647c767e54d6fb535a18886b61354f7f0dbbf29a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"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":-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":"Code-Review","score":1,"reason":"Found 4/24 approved changesets -- score normalized to 1","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":"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: downloadThenRun not pinned by hash: test/bootstrap.bash:6","Warn: pipCommand not pinned by hash: test/bootstrap.bash:11","Warn: pipCommand not pinned by hash: test/bootstrap.bash:12","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   2 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":"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":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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/eclipse-iofog/.github/SECURITY.md:1","Info: Found linked content: github.com/eclipse-iofog/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/eclipse-iofog/.github/SECURITY.md:1","Info: Found text in security policy: github.com/eclipse-iofog/.github/SECURITY.md:1"],"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":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q"],"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 11 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-18T11:44:02.650Z","repository_id":52401880,"created_at":"2025-08-18T11:44:02.650Z","updated_at":"2025-08-18T11:44:02.650Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"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":"2026-01-14T08:46:41.066Z","updated_at":"2026-01-14T08:46:41.586Z","avatar_url":"https://github.com/eclipse-iofog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ioFog Python SDK\n\nThis SDK provides the following modules:\n* microservices: Clients for Microservices to talk to ioFog (e.g. ioMessage and Web Socket clients)\n* rest.controller: Client for Controller REST API\n\n## Installation\n\nInstall python package:\n```bash\nsudo python3 -m pip install iofog\n```\n\n## Microservices\n\nThis module lets you easily build an ioElement. It gives you all the functionality to interact with ioFog via Local API. It contains all necessary methods for IoMessage transformation as well.\n\n - send new message to ioFog (post_message)\n - fetch next unread messages from ioFog (get_next_messages)\n - fetch messages for time period and list of accessible publishers (get_next_messages_from_publishers_within_timeframe)\n - get config options (get_config)\n - get Agent's Edge Resources (get_edge_resources)\n - create IoMessage, encode(decode) to(from) raw bytes, marshall(unmarshall) into(from) JSON object (IoMessage class methods)\n - connect to ioFog Control Channel via WebSocket (establish_control_ws_connection)\n - connect to ioFog Message Channel via WebSocket (establish_message_ws_connection) and publish new message via this channel (post_message_via_socket)\n\n### Usage\n\nImport iofog client and additional classes to your project:\n```python\nfrom iofog.microservices.client import Client\nfrom iofog.microservices.exception import IoFogException\nfrom iofog.microservices.iomessage import IoMessage\nfrom iofog.microservices.listener import *\n```\n\nCreate IoFog client with default settings:\n```python\ntry:\n    client = Client()\nexcept IoFogException as e:\n # client creation failed, e contains description\n```\n\nOr specify host, port, and container id explicitly:\n```python\ntry:\n    client = Client(id='container_id', host='iofog_host', port=6666)\nexcept IoFogException as e:\n # client creation failed, e contains description\n```\n\n##### REST calls\n\nGet list of next unread IoMessages:\n```python\ntry:\n    messages = client.get_next_messages()\nexcept IoFogException as e:\n # some error occurred, e contains description\n```\n\nPost new IoMessage to ioFog via REST call:\n```python\nmsg=IoMessage()\nmsg.infotype=\"infotype\"\nmsg.infoformat=\"infoformat\"\nmsg.contentdata=\"sdkjhwrtiy8wrtgSDFOiuhsrgowh4touwsdhsDFDSKJhsdkljasjklweklfjwhefiauhw98p328946982weiusfhsdkufhaskldjfslkjdhfalsjdf=serg4towhr\"\nmsg.contextdata=\"\"\nmsg.tag=\"tag\"\nmsg.groupid=\"groupid\"\nmsg.authid=\"authid\"\nmsg.authgroup=\"authgroup\"\nmsg.hash=\"hash\"\nmsg.previoushash=\"previoushash\"\nmsg.nonce=\"nonce\"\n\ntry:\n    receipt = client.post_message(msg)\nexcept IoFogException, e:\n # some error occurred, e contains description\n```\n\nGet an array of IoMessages from specified publishers within given timeframe:\n```python\nquery = {\n    \t'timeframestart': 1234567890123,\n    \t'timeframeend': 1234567890123,\n    \t'publishers': ['sefhuiw4984twefsdoiuhsdf', 'd895y459rwdsifuhSDFKukuewf', 'SESD984wtsdidsiusidsufgsdfkh']\n}\ntry:\n    query_response = client.get_next_messages_from_publishers_within_timeframe(query)\nexcept IoFogException, e:\n # some error occurred, e contains description\n```\n\nGet container's config:\n```python\ntry:\n    config = client.get_config()\nexcept IoFogException, ex:\n # some error occurred, ex contains description\n```\n\nGet Agent's Edge Resources:\n```python\ntry:\n    edge_resources = client.get_edge_resources()\nexcept IoFogException, ex:\n # some error occurred, ex contains description\n```\n\n##### WebSocket calls\n\nTo use websocket connections you should implement listeners as follows:\n```python\nclass MyControlListener(IoFogControlWsListener):\n    def on_control_signal(self):\n        # do smth on control signal\n    def on_edge_resources_signal(self):\n        # Agent's Edge Resource list has been updated\n\n\nclass MyMessageListener(IoFogMessageWsListener):\n    def on_receipt(self, message_id, timestamp):\n        # do smth with message receipt\n\n    def on_message(self, io_msg):\n        # do smth with new message\n\n```\n\nAfter that you can establish websocket connections:\n```python\nclient.establish_message_ws_connection(MyMessageListener())\nclient.establish_control_ws_connection(MyControlListener())\n```\nEach of those connections will be managed in a separate thread.\n \n \nAfter successful connection to message websocket you can send to it:\n```python\nclient.post_message_via_socket(io_msg_instance)\n```\n\n\n##### Message utils\n\nConstruct IoMessage from JSON(both json string and python dictionary are acceptable):\n```python\nmsg = IoMessage.from_json(json_msg)\n ```\n\nIoMessage to JSON:\n```python\njson_str = io_msg_instance.to_json()\n```\n\nConstruct IoMessage from raw bytes:\n```python\nmsg = IoMessage.from_bytearray([0, 4, ...])\n```\n\nPack IoMessage into bytearray:\n```python\nmsg_bytes = io_msg_instance.to_bytearray()\n```\n\n#### Logging\n\n```python\nfrom iofog.microservices.log import Logger\n\nlog = Logger(\"logger1\")\nlog.debug(\"hello\")\nlog.info(\"world\")\nlog.warning(\"good\")\nlog.error(\"bye\")\n```\n\n## Controller REST API Client\n\nThis module provides a client for talking to [ioFog Controller's REST API](https://iofog.org/docs/2/reference-controller/rest-api.html).\n\n### Usage\n\n```python\n# Import Client class\nfrom iofog.rest.controller.client import Client\n\n# Instantiate Client\nclient = Client(\n    host=\"123.123.123.123\",\n    port=51121,\n    email=\"hello@world.io\"\n    password=\"2uhi40ghas9\")\n\n# Get Controller status and API version\nstatus = client.get_status()\nprint(status['versions']['controller'])\n\n# Create an Agent\nname = \"agent1\"\nhost = \"123.123.123.124\"\nresp = client.create_agent(name, host)\n\n# Upgrade an Agent\nresp = client.upgrade_agent(name)\n\n# Create an Application\nyaml_file = \"/tmp/app.yaml\"\nresp = client.create_app_from_yaml(yaml_file)\n\n# Get an Application\napp_name = \"app1\"\nresp = client.get_app(app_name)\n\n# Delete an Application\nresp = client.delete_app(app_name)\n```\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-iofog%2Fiofog-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-iofog%2Fiofog-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-iofog%2Fiofog-python-sdk/lists"}