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.2-py3-none-any.whl (132.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pantra-1.5.2-py3-none-any.whl
  • Upload date:
  • Size: 132.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 feb1af7dd1591a6264cfaeff1818bffd99eb444874db2fa4a7b632ff088a8a14
MD5 246fc1fb5953027fe351b924edbddadf
BLAKE2b-256 20ec6393b570d8550fefccd88d35d59e81ef4b3f97f170dc39fa11048efde5b2

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