Skip to main content

Full stack component framework for Django using Alpine.js

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Tetra

Full stack component framework for Django using Alpine.js

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

Read the Documentation

pip install tetraframework

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

    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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tetraframework-0.0.1.tar.gz (51.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tetraframework-0.0.1-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

File details

Details for the file tetraframework-0.0.1.tar.gz.

File metadata

  • Download URL: tetraframework-0.0.1.tar.gz
  • Upload date:
  • Size: 51.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for tetraframework-0.0.1.tar.gz
Algorithm Hash digest
SHA256 304efd56270c8c755e9d9e4e25e05761b12b72e963786692678edecda4819f65
MD5 33b4c9ac46ad2d90defea89cb6e435d5
BLAKE2b-256 493bb77784aa005502fbdc8849c80e38bd786084b915f04571bad61bbab6cd3e

See more details on using hashes here.

File details

Details for the file tetraframework-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tetraframework-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 62.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.2

File hashes

Hashes for tetraframework-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70cbee89e12e137357fcb8813abd457a9e7d59f2f91ebc80fbd666e700a1efff
MD5 648fdf73f845dcd57221658ae63a7963
BLAKE2b-256 d8ebb24ec16ac82023ae6765f75ed2903fd48666c0ac6689985723ecac5901d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page