Metadata-Version: 2.4
Name: pantra
Version: 1.4.10
Summary: Python Full-stack Web Framework
Author-email: Andrey Aseev <andrey@aseev.biz>
Maintainer-email: Andrey Aseev <andrey@aseev.biz>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/zergos/pantra
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: uvicorn==0.40.0
Requires-Dist: starlette==0.51.0
Requires-Dist: websockets==16.0
Requires-Dist: antlr4-python3-runtime==4.10
Requires-Dist: cssutils>=2.3.0
Requires-Dist: requests>=2.31.0
Requires-Dist: libsass>=0.22.0
Requires-Dist: Babel>=2.9.1
Requires-Dist: watchdog>=2.1.6
Requires-Dist: hsluv>=5.0.2
Provides-Extra: quazy
Requires-Dist: quazydb; extra == "quazy"
Dynamic: license-file

pantra
======

Python Full-stack Framework

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

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

..  code-block:: html

    <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 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>
