Name | tetra JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Full stack component framework for Django using Alpine.js |
upload_time | 2024-04-10 10:22:42 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2022 Sam Willis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
python
django
framework
components
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Tetra
Full stack component framework for [Django](http://djangoproject.com) using [Alpine.js](https://alpinejs.dev)
Tetra is a new full stack component framework for Django, bridging the gap between your server logic and front end presentation. It uses a public shared state and a resumable server state to enable inplace updates. It also encapsulates your Python, HTML, JavaScript and CSS into one file for close proximity of related concerns.
See examples at [tetraframework.com](https://www.tetraframework.com)
Read the [Documentation](https://tetra.readthedocs.org)
```
pip install tetra
```
## What does Tetra do?
- Django on the backend, Alpine.js in the browser
Tetra combines the power of Django with Alpine.js to make development easier and quicker.
- Component encapsulation
Each component combines its Python, HTML, CSS and JavaScript in one place for close proximity of related code.
- Resumable server state
The components' full server state is saved between public method calls. This state is encrypted for security.
- Public server methods
Methods can be made public, allowing you to easily call them from JS on the front end, resuming the component's state.
- Shared public state
Attributes can be decorated to indicate they should be available in the browser as Alpine.js data objects.
- Server "watcher" methods
Public methods can be instructed to watch a public attribute, enabling reactive re-rendering on the server.
- Inplace updating from the server
Server methods can update the rendered component in place. Powered by the Alpine.js morph plugin.
- Component library packaging
Every component belongs to a "library"; their JS & CSS is packed together for quicker browser downloads.
- Components with overridable blocks
Component can have multiple {% block(s) %} which can be overridden when used.
- JS/CSS builds using [esbuild](https://esbuild.github.io)
Both for development (built into runserver) and production your JS & CSS is built with esbuild.
- Source Maps
Source maps are generated during development so that you can track down errors to the original Python files.
- Syntax highlighting with type annotations
Tetra uses type annotations to syntax highlight your JS, CSS & HTML in your Python files with a [VS Code plugin](https://github.com/samwillis/python-inline-source/tree/main/vscode-python-inline-source)
Raw data
{
"_id": null,
"home_page": null,
"name": "tetra",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "python, django, framework, components",
"author": null,
"author_email": "Sam Willis <samw@hey.com>, Christian Gonz\u00e1lez <christian.gonzalez@nerdocs.at>",
"download_url": "https://files.pythonhosted.org/packages/23/da/ba6cbf09d47f71bc434aaea4efc01e1985a336a1d67b4e80035381417b6a/tetra-0.1.1.tar.gz",
"platform": null,
"description": "# Tetra\n\nFull stack component framework for [Django](http://djangoproject.com) using [Alpine.js](https://alpinejs.dev)\n\nTetra is a new full stack component framework for Django, bridging the gap between your server logic and front end presentation. It uses a public shared state and a resumable server state to enable inplace updates. It also encapsulates your Python, HTML, JavaScript and CSS into one file for close proximity of related concerns.\n\nSee examples at [tetraframework.com](https://www.tetraframework.com)\n\nRead the [Documentation](https://tetra.readthedocs.org)\n\n```\npip install tetra\n```\n\n## What does Tetra do?\n\n - Django on the backend, Alpine.js in the browser\n\n Tetra combines the power of Django with Alpine.js to make development easier and quicker.\n\n - Component encapsulation\n\n Each component combines its Python, HTML, CSS and JavaScript in one place for close proximity of related code.\n\n - Resumable server state\n\n The components' full server state is saved between public method calls. This state is encrypted for security.\n\n - Public server methods\n\n Methods can be made public, allowing you to easily call them from JS on the front end, resuming the component's state.\n\n - Shared public state\n\n Attributes can be decorated to indicate they should be available in the browser as Alpine.js data objects.\n\n - Server \"watcher\" methods\n\n Public methods can be instructed to watch a public attribute, enabling reactive re-rendering on the server.\n\n - Inplace updating from the server\n\n Server methods can update the rendered component in place. Powered by the Alpine.js morph plugin.\n\n - Component library packaging\n\n Every component belongs to a \"library\"; their JS & CSS is packed together for quicker browser downloads.\n\n - Components with overridable blocks\n\n Component can have multiple {% block(s) %} which can be overridden when used.\n\n - JS/CSS builds using [esbuild](https://esbuild.github.io)\n\n Both for development (built into runserver) and production your JS & CSS is built with esbuild.\n\n - Source Maps\n\n Source maps are generated during development so that you can track down errors to the original Python files.\n\n - Syntax highlighting with type annotations\n\n Tetra uses type annotations to syntax highlight your JS, CSS & HTML in your Python files with a [VS Code plugin](https://github.com/samwillis/python-inline-source/tree/main/vscode-python-inline-source)\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2022 Sam Willis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Full stack component framework for Django using Alpine.js",
"version": "0.1.1",
"project_urls": {
"Documentation": "https://tetra.readthedocs.io",
"Homepage": "https://tetraframework.com",
"Repository": "https://github.com/tetra-framework/tetra"
},
"split_keywords": [
"python",
" django",
" framework",
" components"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dcb163f1c1b91a63ccb5b829a22592fa65816fac0669a2f760bb8795f2b89bcb",
"md5": "c2aa773c5045f4f2a183bf258c778e9d",
"sha256": "9ac34c1542c15fadb3e0a6c2672caa0b4517fa109b8033568375d1b39404ff8c"
},
"downloads": -1,
"filename": "tetra-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c2aa773c5045f4f2a183bf258c778e9d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 85518,
"upload_time": "2024-04-10T10:22:39",
"upload_time_iso_8601": "2024-04-10T10:22:39.891353Z",
"url": "https://files.pythonhosted.org/packages/dc/b1/63f1c1b91a63ccb5b829a22592fa65816fac0669a2f760bb8795f2b89bcb/tetra-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "23daba6cbf09d47f71bc434aaea4efc01e1985a336a1d67b4e80035381417b6a",
"md5": "846181c13d60d18164dbc55fd464b641",
"sha256": "6c71f07bd2480e20d1ded92ce4bf56ac8e75a684d86b04edd648bcd0fe4c51c3"
},
"downloads": -1,
"filename": "tetra-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "846181c13d60d18164dbc55fd464b641",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 101427,
"upload_time": "2024-04-10T10:22:42",
"upload_time_iso_8601": "2024-04-10T10:22:42.033887Z",
"url": "https://files.pythonhosted.org/packages/23/da/ba6cbf09d47f71bc434aaea4efc01e1985a336a1d67b4e80035381417b6a/tetra-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-10 10:22:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tetra-framework",
"github_project": "tetra",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tetra"
}