{"id":25094740,"url":"https://github.com/unilorn/python-optimcios","last_synced_at":"2025-04-01T23:47:57.764Z","repository":{"id":114312616,"uuid":"132710148","full_name":"UNILORN/python-optimcios","owner":"UNILORN","description":"OptimCloudIoTOS APIv1 v2 Python Package","archived":false,"fork":false,"pushed_at":"2018-10-12T04:53:18.000Z","size":64,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T15:36:12.144Z","etag":null,"topics":["cios","optim","package","pip","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UNILORN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-05-09T06:13:11.000Z","updated_at":"2020-12-15T02:28:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9badffa-08da-44e9-a8cb-726f8f61e5bf","html_url":"https://github.com/UNILORN/python-optimcios","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNILORN%2Fpython-optimcios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNILORN%2Fpython-optimcios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNILORN%2Fpython-optimcios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNILORN%2Fpython-optimcios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UNILORN","download_url":"https://codeload.github.com/UNILORN/python-optimcios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246730272,"owners_count":20824396,"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","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":["cios","optim","package","pip","python3"],"created_at":"2025-02-07T15:28:38.955Z","updated_at":"2025-04-01T23:47:57.756Z","avatar_url":"https://github.com/UNILORN.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Optim CIOS APIv1,v2 Python Package\n\n## Usage\n\nClone from GitHub.\n\n`git clone https://github.com/UNILORN/python-optimcios`\n\nExecute the following command.\n\n```bash\n\n$ cd python-optimcios\n$ make\n\n```\n\n\n## CIOSv1 Sample Codes In Messaging\n\n```python\n\nfrom python_optimcios.v1 import messaging\n\nchannel_id = \"\"\naccess_token = \"\"\ncios = messaging.Messaging('ws://0.0.0.0:9999',channel_id,access_token)\n\ncios.connection()\n\ncios.sendMessage('Hello world')\n\nmes = cios.receiveMessage()\nprint(mes)\n\n```\n\n## CIOSv2 Sample Codes\n\n### Authorization\n\n```python\nfrom python_optimcios.v2 import authorization\n\nauth = authorization.Authorization(\n            auth_uri=\"AUTH_URI\",\n            client_id=\"CLIENT_ID\",\n            client_secret=\"CLIENT_SECRET\",\n            log=True\n        )\n\naccess_token = auth.getRefreshAccessToken(\n    scope=\"SCOPE\",\n    refresh_token=\"REFRESH_TOKEN\"\n)\n\nprint(access_token)\n```\n\n### Datastore\n\n```python\nfrom python_optimcios.v2 import authorization, datastore\n\nauth = authorization.Authorization(\n            auth_uri=\"AUTH_URI\",\n            client_id=\"CLIENT_ID\",\n            client_secret=\"CLIENT_SECRET\",\n            log=True\n        )\naccess_token = auth.getRefreshAccessToken(\n    scope=\"SCOPE\",\n    refresh_token=\"REFRESH_TOKEN\"\n)\n\ndatastore = datastore.Datastore(\n            access_token=access_token,\n            api_uri=\"API_URI\",\n            log=True\n        )\n\n# Datastore Channel List\ndatastore.getListChannel()\n\n# Datastore Channel Info\ndatastore.getChannel(channel_id=\"CHANNEL_ID\")\n\n# Datastore Object List\ndatastore.getListObjects(channel_id=\"CHANNEL_ID\")\n\n# Datastore Create Object\ndatastore.postObject(channel_id=\"CHANNEL_ID\",data=\"POST_DATA_JSON\")\n\n# Datastore Object Info\ndatastore.getObject(channel_id=\"CHANNEL_ID\",object_id=\"OBJECT_ID\")\n\n# Datastore Latest Object Info\ndatastore.getObject(channel_id=\"CHANNEL_ID\")\n\n# Datasotre Delete Object\ndatastore.deleteObject(channel_id=\"CHANNEL_ID\",object_id=\"OBJECT_ID\")\n\n```\n\n### Messaging\n\n`In Development`\n\n\n## Development\n\n### Required\n\n```\n\nPython \u003e= 3.6.0\npip \u003e= 10.0.1\n\n```\n\n### It work\n\n1. Please install with the following command.\n\n    ```bash\n    \n    $ make inst-dev\n    \n    ```\n\n2. Change the .env file\n\n3. Run the test and make sure there are no errors\n\n    ```bash\n    $ python3 setup.py test\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funilorn%2Fpython-optimcios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funilorn%2Fpython-optimcios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funilorn%2Fpython-optimcios/lists"}