Name | toga-positron JSON |
Version |
0.5.2
JSON |
| download |
home_page | None |
Summary | A Briefcase plugin for generating Positron apps. |
upload_time | 2025-07-10 07:27:30 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# toga-positron
A [Briefcase](https://github.com/beeware/briefcase) bootstrap for setting up
[Toga](https://github.com/beeware/toga) apps whose GUI generated by displaying web
content. (i.e., Electron-like apps... but more positive, because they're using Python!)
## Usage
Create a fresh virtual environment, then install `toga-positron`. This will install
Briefcase, plus the Positron bootstrap. You can then use the Briefcase wizard to create
a new Toga app:
$ python -m venv venv
$ source venv/bin/activate
(venv) $ pip install toga-positron
(venv) $ briefcase new
This will ask you a number of questions about the app you want to generate, such as the
app's name, the authors name, and the project license. You'll then be asked which GUI
framework you want to use:
-- GUI framework -------------------------------------------------------------
What GUI toolkit do you want to use for this project?
Additional GUI bootstraps are available from the community.
Check them out at https://beeware.org/bee/briefcase-bootstraps
1) Toga
2) PySide6 (does not support iOS/Android/Web deployment)
3) Pygame (does not support iOS/Android/Web deployment)
4) Console (does not support iOS/Android/Web deployment)
5) Toga Positron (Django server) (does not support Web deployment)
6) Toga Positron (Site-specific browser) (does not support Web deployment)
7) Toga Positron (Static server) (does not support Web deployment)
8) None
GUI framework [1]:
This provides 3 options for a Toga Positron-based app:
### Django server
An app that runs a Django web server in a background thread, and points the app's web
browser at the URL for that server. Some additional files (such as `urls.py` and
`settings.py`) will be generated by the app template.
The Django site that is generated is essentially identical to the default Django project
created by `startproject`, with some minor modifications to set app-specific paths and
ensure that static files will be served.
If you select this option, you will be asked for the initial path that you want to
display in the app window. The default value is `/admin/`, which will cause the Django
Admin login page (i.e., `http://127.0.0.1/admin/`) to be the initial URL loaded by the
app, but you can choose any other URL you want (including `/` to serve the root URL
of the Django site).
To run Django management commands, use::
(venv) PYTHONPATH=src python src/manage.py <command> <args...>
The Django app will run on a SQLite3 database, stored in the user's data directory (the
location of this directory is platform specific). This database file will be created if
it doesn't exist, and migrations will be run on every app start.
If you need to start the database with some initial content (e.g., an initial user
login) you can use `manage.py` to create an initial database file. If there is a
`db.sqlite3` in the `src/<app name>/resources` folder when the app starts, and the
user doesn't already have a `db.sqlite3` file in their app data folder, the initial
database file will be copied into the user's data folder as a starting point.
To create an initial database, use `manage.py` - e.g.,:
(venv) PYTHONPATH=src python src/manage.py migrate
(venv) PYTHONPATH=src python src/manage.py createsuperuser
This will create an initial `db.sqlite3` file with a superuser account. All users
of the app will have this superuser account in their database.
### Site-specific browser
An app that behaves as a web browser that displays a single, externally served URL.
If you select this option, you will be asked for the URL that you want to display in the
app window. For example, if you nominate `https://github.com` as the site URL, you will
generate an app that, when started, loads the GitHub homepage.
### Static server
An app that runs a simple HTTP server on a background thread, and points the app's web
browser at the URL for that server. This is suitable for serving simple static HTML and
CSS content. The app will serve the contents of the app's `resources` folder (i.e.,
`src/<app name>/resources`) as the root URL. A placeholder `index.html` file is generated
in the resources folder as part of the template.
## Community
Toga Positron is part of the [BeeWare suite](https://beeware.org). You can talk to the
community through:
* [@beeware@fosstodon.org on Mastodon](https://fosstodon.org/@beeware)
* [Discord](https://beeware.org/bee/chat/)
* [The Toga GitHub Discussions forum](https://github.com/beeware/toga/discussions)
We foster a welcoming and respectful community as described in our
[BeeWare Community Code of Conduct](https://beeware.org/community/behavior/)
## Contributing
If you experience problems with Toga, [log them on
GitHub](https://github.com/beeware/toga/issues).
If you'd like to contribute to Toga development, our [contribution
guide](https://toga.readthedocs.io/en/latest/how-to/contribute/index.html) details how
to set up a development environment, and other requirements we have as part of our
contribution process.
Raw data
{
"_id": null,
"home_page": null,
"name": "toga-positron",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e7/22/4d9b305f4d6662f3c0c073b44c0536fc1028b560d7279f6b456b3f981132/toga_positron-0.5.2.tar.gz",
"platform": null,
"description": "# toga-positron\n\nA [Briefcase](https://github.com/beeware/briefcase) bootstrap for setting up\n[Toga](https://github.com/beeware/toga) apps whose GUI generated by displaying web\ncontent. (i.e., Electron-like apps... but more positive, because they're using Python!)\n\n## Usage\n\nCreate a fresh virtual environment, then install `toga-positron`. This will install\nBriefcase, plus the Positron bootstrap. You can then use the Briefcase wizard to create\na new Toga app:\n\n $ python -m venv venv\n $ source venv/bin/activate\n (venv) $ pip install toga-positron\n (venv) $ briefcase new\n\nThis will ask you a number of questions about the app you want to generate, such as the\napp's name, the authors name, and the project license. You'll then be asked which GUI\nframework you want to use:\n\n -- GUI framework -------------------------------------------------------------\n\n What GUI toolkit do you want to use for this project?\n\n Additional GUI bootstraps are available from the community.\n\n Check them out at https://beeware.org/bee/briefcase-bootstraps\n\n 1) Toga\n 2) PySide6 (does not support iOS/Android/Web deployment)\n 3) Pygame (does not support iOS/Android/Web deployment)\n 4) Console (does not support iOS/Android/Web deployment)\n 5) Toga Positron (Django server) (does not support Web deployment)\n 6) Toga Positron (Site-specific browser) (does not support Web deployment)\n 7) Toga Positron (Static server) (does not support Web deployment)\n 8) None\n\n GUI framework [1]:\n\nThis provides 3 options for a Toga Positron-based app:\n\n### Django server\n\nAn app that runs a Django web server in a background thread, and points the app's web\nbrowser at the URL for that server. Some additional files (such as `urls.py` and\n`settings.py`) will be generated by the app template.\n\nThe Django site that is generated is essentially identical to the default Django project\ncreated by `startproject`, with some minor modifications to set app-specific paths and\nensure that static files will be served.\n\nIf you select this option, you will be asked for the initial path that you want to\ndisplay in the app window. The default value is `/admin/`, which will cause the Django\nAdmin login page (i.e., `http://127.0.0.1/admin/`) to be the initial URL loaded by the\napp, but you can choose any other URL you want (including `/` to serve the root URL\nof the Django site).\n\nTo run Django management commands, use::\n\n (venv) PYTHONPATH=src python src/manage.py <command> <args...>\n\nThe Django app will run on a SQLite3 database, stored in the user's data directory (the\nlocation of this directory is platform specific). This database file will be created if\nit doesn't exist, and migrations will be run on every app start.\n\nIf you need to start the database with some initial content (e.g., an initial user\nlogin) you can use `manage.py` to create an initial database file. If there is a\n`db.sqlite3` in the `src/<app name>/resources` folder when the app starts, and the\nuser doesn't already have a `db.sqlite3` file in their app data folder, the initial\ndatabase file will be copied into the user's data folder as a starting point.\n\nTo create an initial database, use `manage.py` - e.g.,:\n\n (venv) PYTHONPATH=src python src/manage.py migrate\n (venv) PYTHONPATH=src python src/manage.py createsuperuser\n\nThis will create an initial `db.sqlite3` file with a superuser account. All users\nof the app will have this superuser account in their database.\n\n### Site-specific browser\n\nAn app that behaves as a web browser that displays a single, externally served URL.\n\nIf you select this option, you will be asked for the URL that you want to display in the\napp window. For example, if you nominate `https://github.com` as the site URL, you will\ngenerate an app that, when started, loads the GitHub homepage.\n\n### Static server\n\nAn app that runs a simple HTTP server on a background thread, and points the app's web\nbrowser at the URL for that server. This is suitable for serving simple static HTML and\nCSS content. The app will serve the contents of the app's `resources` folder (i.e.,\n`src/<app name>/resources`) as the root URL. A placeholder `index.html` file is generated\nin the resources folder as part of the template.\n\n## Community\n\nToga Positron is part of the [BeeWare suite](https://beeware.org). You can talk to the\ncommunity through:\n\n* [@beeware@fosstodon.org on Mastodon](https://fosstodon.org/@beeware)\n* [Discord](https://beeware.org/bee/chat/)\n* [The Toga GitHub Discussions forum](https://github.com/beeware/toga/discussions)\n\nWe foster a welcoming and respectful community as described in our\n[BeeWare Community Code of Conduct](https://beeware.org/community/behavior/)\n\n## Contributing\n\nIf you experience problems with Toga, [log them on\nGitHub](https://github.com/beeware/toga/issues).\n\nIf you'd like to contribute to Toga development, our [contribution\nguide](https://toga.readthedocs.io/en/latest/how-to/contribute/index.html) details how\nto set up a development environment, and other requirements we have as part of our\ncontribution process.\n",
"bugtrack_url": null,
"license": null,
"summary": "A Briefcase plugin for generating Positron apps.",
"version": "0.5.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "993de1aa882de5bd169e6123f27a4957fb18fbd9088030b69912a0bbfd2f2b00",
"md5": "16846fc14078e82609a0b5bef83cacde",
"sha256": "eb98c26ed14064f4c6252a9a6a2ffe242571b5d88f47b2355ab31ebb6b4918ad"
},
"downloads": -1,
"filename": "toga_positron-0.5.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "16846fc14078e82609a0b5bef83cacde",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11297,
"upload_time": "2025-07-10T07:27:29",
"upload_time_iso_8601": "2025-07-10T07:27:29.296212Z",
"url": "https://files.pythonhosted.org/packages/99/3d/e1aa882de5bd169e6123f27a4957fb18fbd9088030b69912a0bbfd2f2b00/toga_positron-0.5.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e7224d9b305f4d6662f3c0c073b44c0536fc1028b560d7279f6b456b3f981132",
"md5": "8984cbc8e817d1b1492bc721b652d51c",
"sha256": "e7a96128adbb444fa11458f13e7cf6393e815e89fac70543cc144f7db814998c"
},
"downloads": -1,
"filename": "toga_positron-0.5.2.tar.gz",
"has_sig": false,
"md5_digest": "8984cbc8e817d1b1492bc721b652d51c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10158,
"upload_time": "2025-07-10T07:27:30",
"upload_time_iso_8601": "2025-07-10T07:27:30.891900Z",
"url": "https://files.pythonhosted.org/packages/e7/22/4d9b305f4d6662f3c0c073b44c0536fc1028b560d7279f6b456b3f981132/toga_positron-0.5.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 07:27:30",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "toga-positron"
}