kkappkit


Namekkappkit JSON
Version 0.28.1 PyPI version JSON
download
home_pagehttps://github.com/kakyoism/kkappkit/
SummaryCode-generator for building small desktop applications with Python and Tkinter
upload_time2024-04-10 11:23:12
maintainerNone
docs_urlNone
authorBeinan Li
requires_python<4.0,>=3.11
licenseMIT
keywords frontend ui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # kkAppKit

Framework for building small desktop tools with Python and [Tkinter](https://wiki.python.org/moin/TkInter)

## Intentions
This project aims to simplify building:
- Small desktop tools
- Prototypes, demos, and tutorials

## Target Users
- Scientists and engineers
- Technical artists

## Benefits for End-Users 
- Easy to add GUI frontend to command-line programs, and release them as standalone apps 
- Simple and consistent layout: All tools made by this kit use single-page and endless-vertical-scroll paradigms
- Supports both CLI and GUI
- Supports important common app features out of the box, such as reset-to-default, presets and context help

## Benefits for Developers
- Almost no frontend code to write, thanks to its declarative JSON configuration that drives code generation
- Decouples frontend-backend developement using the Model-View-Controller architecture
- CI/CD friendly: ready-to-use build scripts for testing, building, and packaging in the generated app
- Lightweight: The GUI code only depends on small wrapper packages around Python 3 and Tkinter

## How to install kkappkit?
- Clone this repo
- POSIX: `cd kkappkit && sudo ln -s $(pwd)/kkappgen /usr/local/bin/`; ensure `/usr/local/bin` is under your system `$PATH`
- Windows: `cd kkappkit && mklink a\folder\under\your\system\%PATH%\kkappgen.bat .\kkappgen\kkappgen.bat`

## How to work with kkappkit?
- Initialize a new app project: `kkappgen -r /path/to/my_app_root -t <template_name>`
  - This generates a Poetry project with a template app
  - Look for template name under `res/template/*.app.json`; the firstname of the template file is the template name
- Edit `pyproject.toml` and install dependencies: `cd /path/to/my_app_root && poetry install`
- Design the app parameter interface by editing the initialized configuration file, e.g., `src/app.json`
- Generate the interface (CLI/GUI) code: `kkappgen -r /path/to/my_app_root`
- Implement the core and hooks as a CLI or GUI or both
- Run the CLI or GUI using: `run` or `gui`
- Optionally, dev builds a standalone app bundle for distribution based on the configuration
- See `demo` folder for examples 

## Why not use a full-fledged framework like PySide, PyGTK, or Electron?
- Most of them are too heavy for small tools, complicating CI and distribution; TkInter as the first-party GUI lib simplifies distribution
- Those frameworks aim at breadth and come with a steep learning curve (opinions); I want to bake in just enough policies for RAD without making the kit too opinionated

## How to run the demos?
The guides below assume:
- You are a POSIX developer; Windows developers should be able to adapt the steps accordingly
- You have cloned and installed `kkappkit`
- You have [`poetry`](https://python-poetry.org) on your system

The demos must be built before running:
- The demo assets are located under `demo` folder.
- `character` is a form-filling demo
- `oscillator` is a controller demo

Next, we'll introduce each demo.

### Charater
```sh
# create a new skeleton, use -f to force-overwrite existing files 
cd /path/to/kkappkit
kkappgen -r /path/to/character -t template

# navigate to the generated app  
cd /path/to/character
#
# edit pyproject.toml to add dependencies
# 
# then install dependencies
rm poetry.lock &> /dev/null
poetry install

# manually edit the configuration file (src/app.json) to fill in app metadata and input/output
# and generate the interface code
# overwrite the default assets with demo implementation
kkappgen -r `pwd` -i /path/to/kkappkit/demo/character

# run the app and play around with it
./ui

# quit the app after done
# build the standalone app for local testing 
ci/evaluate

# release as a platform-dependent installer
ci/release
```

### Oscillator
Similart to the above steps, but the demo assets are located under `demo/oscillator`.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kakyoism/kkappkit/",
    "name": "kkappkit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "frontend, ui",
    "author": "Beinan Li",
    "author_email": "li.beinan@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2d/73/370285a43e1b8700811f7e44120eda705b9055b7b86584b30c90ed54ecc3/kkappkit-0.28.1.tar.gz",
    "platform": null,
    "description": "# kkAppKit\n\nFramework for building small desktop tools with Python and [Tkinter](https://wiki.python.org/moin/TkInter)\n\n## Intentions\nThis project aims to simplify building:\n- Small desktop tools\n- Prototypes, demos, and tutorials\n\n## Target Users\n- Scientists and engineers\n- Technical artists\n\n## Benefits for End-Users \n- Easy to add GUI frontend to command-line programs, and release them as standalone apps \n- Simple and consistent layout: All tools made by this kit use single-page and endless-vertical-scroll paradigms\n- Supports both CLI and GUI\n- Supports important common app features out of the box, such as reset-to-default, presets and context help\n\n## Benefits for Developers\n- Almost no frontend code to write, thanks to its declarative JSON configuration that drives code generation\n- Decouples frontend-backend developement using the Model-View-Controller architecture\n- CI/CD friendly: ready-to-use build scripts for testing, building, and packaging in the generated app\n- Lightweight: The GUI code only depends on small wrapper packages around Python 3 and Tkinter\n\n## How to install kkappkit?\n- Clone this repo\n- POSIX: `cd kkappkit && sudo ln -s $(pwd)/kkappgen /usr/local/bin/`; ensure `/usr/local/bin` is under your system `$PATH`\n- Windows: `cd kkappkit && mklink a\\folder\\under\\your\\system\\%PATH%\\kkappgen.bat .\\kkappgen\\kkappgen.bat`\n\n## How to work with kkappkit?\n- Initialize a new app project: `kkappgen -r /path/to/my_app_root -t <template_name>`\n  - This generates a Poetry project with a template app\n  - Look for template name under `res/template/*.app.json`; the firstname of the template file is the template name\n- Edit `pyproject.toml` and install dependencies: `cd /path/to/my_app_root && poetry install`\n- Design the app parameter interface by editing the initialized configuration file, e.g., `src/app.json`\n- Generate the interface (CLI/GUI) code: `kkappgen -r /path/to/my_app_root`\n- Implement the core and hooks as a CLI or GUI or both\n- Run the CLI or GUI using: `run` or `gui`\n- Optionally, dev builds a standalone app bundle for distribution based on the configuration\n- See `demo` folder for examples \n\n## Why not use a full-fledged framework like PySide, PyGTK, or Electron?\n- Most of them are too heavy for small tools, complicating CI and distribution; TkInter as the first-party GUI lib simplifies distribution\n- Those frameworks aim at breadth and come with a steep learning curve (opinions); I want to bake in just enough policies for RAD without making the kit too opinionated\n\n## How to run the demos?\nThe guides below assume:\n- You are a POSIX developer; Windows developers should be able to adapt the steps accordingly\n- You have cloned and installed `kkappkit`\n- You have [`poetry`](https://python-poetry.org) on your system\n\nThe demos must be built before running:\n- The demo assets are located under `demo` folder.\n- `character` is a form-filling demo\n- `oscillator` is a controller demo\n\nNext, we'll introduce each demo.\n\n### Charater\n```sh\n# create a new skeleton, use -f to force-overwrite existing files \ncd /path/to/kkappkit\nkkappgen -r /path/to/character -t template\n\n# navigate to the generated app  \ncd /path/to/character\n#\n# edit pyproject.toml to add dependencies\n# \n# then install dependencies\nrm poetry.lock &> /dev/null\npoetry install\n\n# manually edit the configuration file (src/app.json) to fill in app metadata and input/output\n# and generate the interface code\n# overwrite the default assets with demo implementation\nkkappgen -r `pwd` -i /path/to/kkappkit/demo/character\n\n# run the app and play around with it\n./ui\n\n# quit the app after done\n# build the standalone app for local testing \nci/evaluate\n\n# release as a platform-dependent installer\nci/release\n```\n\n### Oscillator\nSimilart to the above steps, but the demo assets are located under `demo/oscillator`.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Code-generator for building small desktop applications with Python and Tkinter",
    "version": "0.28.1",
    "project_urls": {
        "Documentation": "https://github.com/kakyoism/kkappkit/README.md",
        "Homepage": "https://github.com/kakyoism/kkappkit/",
        "Repository": "https://github.com/kakyoism/kkappkit/",
        "issues": "https://github.com/kakyoism/kkappkit/issues"
    },
    "split_keywords": [
        "frontend",
        " ui"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bba758739d3f0c58e3d2656f7a104db045110161316306ee7538538db04bec1a",
                "md5": "0c85dbdc1c493223c4ae22857487afa1",
                "sha256": "25d77a94ccb20cc0b6a13993815ffe7477c39141bab62dd0302ff6dcc5127cda"
            },
            "downloads": -1,
            "filename": "kkappkit-0.28.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c85dbdc1c493223c4ae22857487afa1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 362653,
            "upload_time": "2024-04-10T11:23:09",
            "upload_time_iso_8601": "2024-04-10T11:23:09.078526Z",
            "url": "https://files.pythonhosted.org/packages/bb/a7/58739d3f0c58e3d2656f7a104db045110161316306ee7538538db04bec1a/kkappkit-0.28.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d73370285a43e1b8700811f7e44120eda705b9055b7b86584b30c90ed54ecc3",
                "md5": "39c6920674826d19a74685b1bb3e9752",
                "sha256": "d57f72547ee413c3cf27d945c7b3694e31ff8742a6880302dadcd66931b9c9fd"
            },
            "downloads": -1,
            "filename": "kkappkit-0.28.1.tar.gz",
            "has_sig": false,
            "md5_digest": "39c6920674826d19a74685b1bb3e9752",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 316627,
            "upload_time": "2024-04-10T11:23:12",
            "upload_time_iso_8601": "2024-04-10T11:23:12.153378Z",
            "url": "https://files.pythonhosted.org/packages/2d/73/370285a43e1b8700811f7e44120eda705b9055b7b86584b30c90ed54ecc3/kkappkit-0.28.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-10 11:23:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kakyoism",
    "github_project": "kkappkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "kkappkit"
}
        
Elapsed time: 0.22100s