Skip to main content

Python Full-stack Web Framework

Project description

Python Full-stack Framework

Inspired by Svelte, React, Django, Web2Py and Zen of Python

https://raw.githubusercontent.com/zergos/pantra/master/docs/source/images/logo_cutted_mini.png

What is it?

Component based Web framework with specific features: 1. HTML-like definition with SCSS styling 2. Web Socket protocol for DOM processing 3. Python language for backend and frontend 4. Portable database schema compatible with ORM (Pony, Django, etc) 5. I18n in gettext-compatible style

<h1>Choose your destiny</h1>
<div class="list">
{{#for destiny in destiny_set}}
  <button type="button" on:click="choose" data:value="{destiny}">{{destiny}}</button>
{{/for}}
</div>
<h2 class="verdict">!{{chosen}}</h2>

<style type="text/scss">
.list {
    display: flex;
    flex-flow: row;

    > button {
        padding: 0.3rem 1rem;
    }
}
.verdict {
    font-weight: bold;
    font-style: italic;
}
</style>

<python>
from pantra.ctx import *

chosen: str = _('Make a choice...')
destiny_set = ('Good', 'Evil', 'Rich', 'Sexy')

def choose(node):
    ctx['chosen'] = node.data.value
</python>

Why another framework?

I need flexible, simple and rich tool to perform modern dynamic Web application.
  • I want power of NodeJS, but based on Python language.

  • I want to change the HTTP mass query conception to Web Socket’s constant connection.

  • I want to manipulate solid chunks of business logic as components (MVC joined in one file).

  • I want to deal with data most natural way, without SQL usage.

  • I want advantages of asynchronous programming, but get away coloring with async.

  • I want it made simple. Enough to teach newbies within the shortest learning curve.

  • I want ability to make it scalable and globally usable.

  • I need a perfect tool to build startups as fast as possible.

Installation

It still under active development and does not exist as special PYPI package. However, feel free to download and make your own Apps experience.

Execute:

pip install pantra

or use git:

pip install git+https://github.com/zergos/pantra.git

Install core components:

pantra get_boilerplate

Everything is ready to start now:

python pantra.py run

Now, you can open your browser and check demo app by local address <http://localhost:8005/demo>

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pantra-1.5.5-py3-none-any.whl (132.3 kB view details)

Uploaded Python 3

File details

Details for the file pantra-1.5.5-py3-none-any.whl.

File metadata

  • Download URL: pantra-1.5.5-py3-none-any.whl
  • Upload date:
  • Size: 132.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for pantra-1.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ea8926b980ef9f3e5d114109aa48f837024ebf9c7f44b580e108ad18391c1141
MD5 ae214b97f60747350b1d1a50d3668f8f
BLAKE2b-256 83b25eb66f5ecbf7e2004d35054b7010cac6da0e4dc9bbef74bdf55a82d6af8e

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