{"id":15015530,"url":"https://github.com/amwebexpert/poc-mobile-python","last_synced_at":"2025-04-12T09:40:31.758Z","repository":{"id":172551523,"uuid":"649436487","full_name":"amwebexpert/poc-mobile-python","owner":"amwebexpert","description":"Python multi-platform app using the KivyMD framework, integrating Artificial Intelligence features.","archived":false,"fork":false,"pushed_at":"2024-01-19T13:25:34.000Z","size":8349,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T04:34:55.836Z","etag":null,"topics":["ai","android","ios","kivy-framework","kivymd","linux","macos","python3","windows"],"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/amwebexpert.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}},"created_at":"2023-06-04T20:44:19.000Z","updated_at":"2024-11-21T18:57:13.000Z","dependencies_parsed_at":"2024-01-19T14:45:29.659Z","dependency_job_id":null,"html_url":"https://github.com/amwebexpert/poc-mobile-python","commit_stats":null,"previous_names":["amwebexpert/poc-mobile-python"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amwebexpert%2Fpoc-mobile-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amwebexpert%2Fpoc-mobile-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amwebexpert%2Fpoc-mobile-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amwebexpert%2Fpoc-mobile-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amwebexpert","download_url":"https://codeload.github.com/amwebexpert/poc-mobile-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248548989,"owners_count":21122808,"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":["ai","android","ios","kivy-framework","kivymd","linux","macos","python3","windows"],"created_at":"2024-09-24T19:47:35.151Z","updated_at":"2025-04-12T09:40:31.733Z","avatar_url":"https://github.com/amwebexpert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Mindset app\n\nA 💯% `Python` application using the `KivyMD` framework, integrating Artificial Intelligence features. The goal is to have a single `Python` codebase that can be built and deployed on all major native platforms: `Android`, `iOS`, `macOS`, `Linux` and `Windows`.\n\n- Deployed on Apple Store [here](https://apps.apple.com/ca/app/open-mindset/id6467103164)!\n\nSome of the goals:\n\n- `KivyMD` app skeleton pattern including classique UI elements (navbar menu, top navbar, responsive, material design...)\n- learn and demonstrate best programming practices in a 💯% `Python` development environment\n- experiment with a lot of AI-related stuff\n  - `OpenAI` `ChatGPT` API\n  - `Stability AI` `text to image` API\n  - plus more AI useful examples in a mobile/native app context\n- document recipes for building artifacts of specific native OS\n- have concrete examples of broadcasting events and react to these events through an MVC pattern\n- and much more as we experiment with nice AI and existing technologies and other open-source libraries...\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/amwebexpert/poc-mobile-python) ![GitHub Release Date](https://img.shields.io/github/release-date/amwebexpert/poc-mobile-python) ![GitHub last commit](https://img.shields.io/github/last-commit/amwebexpert/poc-mobile-python) ![GitHub](https://img.shields.io/github/license/amwebexpert/poc-mobile-python)\n\n* Some screen captures of the implemented features\n\nPlatform     | About screen | Chat session | Settings\n------------ | ------------ | ------------ | -------------- |\nAndroid      | \u003cimg src=\"stores_presence/android-about.jpg\" /\u003e | \u003cimg src=\"stores_presence/android-chatgpt-session.jpg\" /\u003e | \u003cimg src=\"stores_presence/android-settings.jpg\" /\u003e\niOS          | \u003cimg src=\"stores_presence/ios-about.png\" /\u003e | \u003cimg src=\"stores_presence/ios-chatgpt-session.png\" /\u003e | \u003cimg src=\"stores_presence/ios-settings.png\" /\u003e\nLinux        | \u003cimg src=\"stores_presence/ubuntu-about.png\" /\u003e | \u003cimg src=\"stores_presence/ubuntu-chatgpt-session.png\" /\u003e | \u003cimg src=\"stores_presence/ubuntu-settings.png\" /\u003e\nWindows      | \u003cimg src=\"stores_presence/windows-about.png\" /\u003e | \u003cimg src=\"stores_presence/windows-chatgpt-session.png\" /\u003e | \u003cimg src=\"stores_presence/windows-settings.png\" /\u003e\nmacOS        | \u003cimg src=\"stores_presence/macos-about.png\" /\u003e | \u003cimg src=\"stores_presence/macos-chatgpt-session.png\" /\u003e | \u003cimg src=\"stores_presence/macos-settings.png\" /\u003e\n\n\n## Table of content\n\n- [Open Mindset app](#open-mindset-app)\n  - [Table of content](#table-of-content)\n  - [Getting Started](#getting-started)\n    - [Startup \\\u0026 hot reload](#startup--hot-reload)\n    - [Simulating a mobile device on desktop](#simulating-a-mobile-device-on-desktop)\n  - [Utilities](#utilities)\n    - [Preview list of Material Design implemented icons](#preview-list-of-material-design-implemented-icons)\n    - [DB Browser for SQLite](#db-browser-for-sqlite)\n    - [Snippet to see the layout border of any widget](#snippet-to-see-the-layout-border-of-any-widget)\n  - [Managing development environment](#managing-development-environment)\n    - [Python on MacOS with brew](#python-on-macos-with-brew)\n    - [Certify installation](#certify-installation)\n    - [Virtual environment](#virtual-environment)\n    - [Dependency libraries (update, freeze them or install from)](#dependency-libraries-update-freeze-them-or-install-from)\n      - [References](#references)\n  - [Build for Android](#build-for-android)\n    - [Building for Android on Linux Ubuntu](#building-for-android-on-linux-ubuntu)\n      - [References](#references-1)\n    - [Building for Android on macOS](#building-for-android-on-macos)\n      - [Reference](#reference)\n  - [Building for iOS](docs/build_ios.md) (seperate file in docs)\n  - [About Kivy framework](#about-kivy-framework)\n  - [About the app name](#about-the-app-name)\n\n\n## Getting Started\n\n\nYou may have some OS core dependencies to install (`dll` on Windows, system lib on Ubuntu, etc.) so follow the official Kivy install instructions depending on your operating system(s):\n\n- [Kivy Framework](https://kivy.org)\n- [KivyMD](https://kivymd.readthedocs.io)\n\nExample: for Ubuntu you have to set the following environnement variable\n   ```shell\n    export USE_X11=1\n   ```\nand install the listed [OS libraries](https://kivy.org/doc/stable/installation/installation-linux.html#id1)\n\n\n### Other users can start here :point_down:\u003ca id=\"create-venv\"\u003e\u003c/a\u003e\n\nThen you can install the Open Mindset app dependencies as follow. First create and activate your virtual environment:\n\n   ```shell\n    python -m venv venv\n    . venv/bin/activate\n   ```\n\nUse `pip-tools` to generate `requirements.txt` file from `requirements.in`:\n\n   ```shell\n    python -m pip install pip-tools\n    pip-compile requirements.in\n   ```\n\nUpdate the virtual environment dependencies:\n\n   ```shell\n   pip-sync\n   ```\n\n### :point_right: Missing packages for Mac OS install :point_left:\n```\npip install pygame\npip install kivy==2.2.1\n```\n\n### Startup \u0026 Hot Reload\n\nNormal startup\n\n    python main.py\n\nWith hot-reload enabled\n\n    DEBUG=1 python main.py\n\nKnow issue in `DEBUG` mode:\n\n- Pressing the *space bar* from the query textinput field of the chat session triggers an unexpected hot reload event.\n\n### Simulating a mobile device on desktop\n\nNormal startup\n\n    MOBILE_SIMULATION=1 python main.py\n\nCombined with hot-reload\n\n    DEBUG=1 MOBILE_SIMULATION=1 python main.py\n\n## Utilities\n\n### Preview list of Material Design implemented icons\n\n    python scripts/icons/main.py\n\n### DB Browser for SQLite\n\nThis native Python app makes usage of SQLite3 as it's persistence mechanism (preferences, chat session...). Although you can visualize raw data using command lines like `sqlite3 chat_sessions.db` we recommand using the [DB Browser for SQLite](https://sqlitebrowser.org/) which is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite.\n\n### Snippet to see the layout border of any widget\n\nInside the `.kivy` file just add this:\n\n```\n    canvas.before:\n        Color:\n            rgba: 0, 1, 0, 1\n        Line:\n            width: 1\n            rectangle: self.x, self.y, self.width, self.height\n```\n\n## Managing development environment\n\n### Python on MacOS with brew\n\nSome usefull brew commands\n\n    brew update\n    brew config\n    brew leaves | xargs brew desc --eval-all\n    brew cleanup\n\n    brew install cython\n    echo 'export PATH=\"/opt/homebrew/opt/cython/bin:$PATH\"' \u003e\u003e ~/.zshrc\n\nThen change your `.zshrc` aliases as [explained here](https://apple.stackexchange.com/a/461063/364767)\n\n### Certify installation\n\n    python ./scripts/certificates/install_certifi.py\n\n## Build for Android\n\n### Building for Android on Linux Ubuntu\n\nFirst install the following dependencies:\n\n* https://kivy.org/doc/stable/installation/installation-linux.html#id1\n\nThen install these python dependencies:\n\n    pip-compile\n    pip-sync\n\nIf `pip-sync` fails you may have to use the classic way once `requirements.txt` is generated by `pip-compile`:\n\n    pip install -r requirements.txt\n\nEnsure both `kivy` and `kivymd` are up to date (see below reference for more detail)\n\n    pip install https://github.com/kivy/kivy/archive/master.zip\n    pip install https://github.com/kivymd/KivyMD/archive/master.zip\n\n    buildozer android clean\n    buildozer android debug deploy run\n\n#### References\n\n* https://stackoverflow.com/a/76644946/704681\n\n### Building for Android on macOS\n\n    python ~/Library/Python/3.8/lib/python/site-packages/buildozer init\n    python ~/Library/Python/3.8/lib/python/site-packages/buildozer android debug deploy run\n\n    python ~/Library/Python/3.11/lib/python/site-packages/buildozer init\n    python ~/Library/Python/3.11/lib/python/site-packages/buildozer android debug deploy run\n\n- Ugly workaround for [ssl issue](https://github.com/kivy/kivy/issues/5784):\n  code /Library/Frameworks/Python.framework/Versions/Current/lib/python3.10/ssl.py\n\n- sdkmanager path does not exist, [sdkmanager is not installed](https://github.com/kivy/buildozer/issues/927#issuecomment-533020886)\n\n#### Reference\n\n* https://kivy.org/doc/stable/guide/packaging-android.html\n\n\n## Building for iOS\n\nSee seperate iOS build instructions [here](docs/build_ios.md).\n\n\n## About Kivy framework\n\nWhy is Kivy not popular?\n\nBasically runs on donation from people like you and me and some organisations and this is unlike other frameworks that are (or were) backed by giants like Google (Flutter) or Facebook (React Native). So, Kivy might lack marketing funds, making it less popular among other frameworks but it's still a preferred choice in Python ecosystem.\n\n## About the app name\n\nBy definition:\n\u003e An open mindset is a tendency to be receptive to new ideas and information. Having an open mindset means being objective when approaching new things, listening to other points of view, and being willing to admit what you don't know.\n\nI decided to give it that name since this is my life philosophy and I was looking for a real project to learn `Python` language.\n\n## Official related websites\n\n- [Kivy Framework](https://kivy.org)\n- [KivyMD](https://kivymd.readthedocs.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famwebexpert%2Fpoc-mobile-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famwebexpert%2Fpoc-mobile-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famwebexpert%2Fpoc-mobile-python/lists"}