Metadata-Version: 2.4
Name: tgzr.shell
Version: 0.1.1
Summary: tgzr command line interface
Project-URL: Documentation, https://github.com/open-tgzr/tgzr.shell#readme
Project-URL: Issues, https://github.com/open-tgzr/tgzr.shell/issues
Project-URL: Source, https://github.com/open-tgzr/tgzr.shell
Author-email: Dee <dee.sometech@gmail.com>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.8
Requires-Dist: pydantic-settings>=2.8.1
Requires-Dist: tgzr-cli
Description-Content-Type: text/markdown

# tgzr.shell
tgzr workstation runtime

# Create a Shell Application plugin:

You need to:
- create an instance of a `tgzr.shell.app_sdk.ShellApp`
- add an entry point in the group "tgzr.shell.app_plugin" pointing to that app


**Here is a minimalist workging example:**
> 
> **your_package/app.py**:
> ```python
> from . import run_native, run_dev, pages
> from tgzr.shell.app_skd import ShellApp
> 
> app = ShellApp(
>     "app_name",
>     run_native_module=run_native,
>     run_dev_module=run_dev,
>     static_file_path=Path(pages.__file__).parent / "static_files",
> )
> ``` 
>
> **your_package/pages.py**:
> ```python
> from nicegui import ui
> 
> 
> @ui.page("/", title="My App")
> async def main():
>     ui.label("Hello world! 😛")
> ```
> 
> **your_package/run_native.py**:
> ```python
> if __name__ == "__main__":
>    from .app import app
>
>    app.run_app(native=True, reload=False)
> ``` 
>
> **your_package/run_dev.py**:
> ```python
> if __name__ in {"__main__", "__mp_main__"}:
>     from .app import app
>    app.run_app(native=False, reload=True)
> ``` 
>
> **pyproject.toml**:
> ```
> [project.entry-points."tgzr.shell.app_plugin"]
> my_shell_app = "your_package:app"
> ```


