{"id":15532848,"url":"https://github.com/tito/pymoodstocks","last_synced_at":"2025-07-28T22:35:09.560Z","repository":{"id":27939236,"uuid":"31431784","full_name":"tito/pymoodstocks","owner":"tito","description":"Kivy/Python wrapper for the Moodstocks SDK, iOS and Android supported","archived":false,"fork":false,"pushed_at":"2015-09-04T10:48:17.000Z","size":344,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T13:44:16.799Z","etag":null,"topics":[],"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/tito.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}},"created_at":"2015-02-27T17:52:39.000Z","updated_at":"2020-09-10T09:52:19.000Z","dependencies_parsed_at":"2022-08-07T13:01:21.719Z","dependency_job_id":null,"html_url":"https://github.com/tito/pymoodstocks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tito/pymoodstocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tito%2Fpymoodstocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tito%2Fpymoodstocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tito%2Fpymoodstocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tito%2Fpymoodstocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tito","download_url":"https://codeload.github.com/tito/pymoodstocks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tito%2Fpymoodstocks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259320529,"owners_count":22840001,"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":[],"created_at":"2024-10-02T11:33:26.041Z","updated_at":"2025-06-11T19:07:27.398Z","avatar_url":"https://github.com/tito.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moodstocks Python wrapper\n\nThis wrapper allow you to use the Moodstock iOS and Android SDK with Kivy /\nPython. This current version include an UI for both iOS and Android, and do all\nthe effort to display it correctly. The default configuration searchs for\nqrcode, barcode and image.\n\n![Scanner in action](https://cloud.githubusercontent.com/assets/37904/6444358/6661b88a-c0fd-11e4-8bc9-ed1d4de44f82.png)\n![Scanner result](https://cloud.githubusercontent.com/assets/37904/6444362/6b3603fc-c0fd-11e4-93e3-f48c9f2addbb.png)\n\n## Installation\n\n### iOS\n\nYou need to use the latest kivy-ios toolchain:\n\n    ./toolchain.py build pymoodstocks\n\nThen either create or update an Xcode project with the toolchain. It will add\nthe frameworks necessary for Moodstocks and libraries for pymoodstocks.\n\n### Android\n\nWith buildozer, you need to download the SDK for eclipse, and extract the libs/\ndirectory into a directory named sdk (for example). Then changes in the\nbuildozer.spec:\n\n\t[app]\n\tsource.exclude_dirs = sdk\n\tandroid.permissions = INTERNET, CAMERA, WRITE_EXTERNAL_STORAGE\n\tandroid.add_libs_armeabi = sdk/libs/armeabi/*.so\n\tandroid.add_libs_armeabi_v7a = sdk/libs/armeabi-v7a/*.so\n\tandroid.add_libs_x86 = sdk/libs/x86/*.so\n\tandroid.add_libs_mips = sdk/libs/mips/*.so\n\nThen (currently), you need to copy the pymoodstocks directory into your app.\n\n\n## Usage\n\nCreate a Moodstocks instance and pass your Moodstocks API key/secret:\n\n\tfrom pymoodstocks import Moodstocks\n\tmoodstocks = Moodstocks(KEY, SECRET)\n\nThen, you can bind a method to get the scan result on the fly:\n\n\tdef on_scan(self, result_type, result_data):\n\t\tprint(\"I got something of type {}: {}\".format(\n\t\t\t  result_type, result_data))\n\t\tmoodstocks.stop()\n\n\tdef on_button_clicked(self, result_type, result_data):\n\t\tprint(\"Button DONE click, stop the scanner\")\n\t\tmoodstocks.stop()\n\n\tmoodstocks.bind(on_scan=self.on_scan,\n\t\t\t\t\ton_button_clicked=self.on_button_clicked)\n\nAt any time, you can start the scanner:\n\n\tmoodstocks.start()\n\nThe scanner will stop processing after it detect something / on_scan method is\ncalled. You could resume the scanner instead of closing it by calling:\n\n\tmoodstocks.resume()\n\n\n## Todo\n\n- Let the user choose which type to search for\n- Implement synchronisation callback on iOS\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftito%2Fpymoodstocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftito%2Fpymoodstocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftito%2Fpymoodstocks/lists"}