Skip to main content

Brython Framework

Project description

Brython-Radiant

A Brython Framework for Web Apps development.

GitHub top language PyPI - License PyPI PyPI - Status PyPI - Python Version GitHub last commit CodeFactor Grade Documentation Status

Radiant is a Brython framework for the quick development of web apps from pure Python syntax which means that there is no need to care about (if you don't want) HTML, CSS, or Javascript. It's based on Tornado servers and includes support to Websockets, Python Scripts and MDC.

Instalation

pip install radiant

Usage

# Brython modules
from browser import document, html

# Radiant modules
from radiant.server import RadiantAPI, RadiantServer

# Main class inheriting RadiantAPI
class BareMinimum(RadiantAPI):

    # Constructor 
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)

        #-----------------------------------------------------------
        # Brython code (finally)
        document.select_one('body') <= html.H1('Hello World')
        #
        # ...all your brython code
        #-----------------------------------------------------------

# Execute server
if __name__ == '__main__':
    RadiantServer('BareMinimum')

How to works

This is basically a set of scripts that allows the same file run from Python and Brython, when is running under Python a Tornado server is created and configure the local path for serving static files, a custom HTML template is configured in runtime to import the same script, this time under Brython, is very simple.

Download files

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

Files for radiant, version 3.2.2
Filename, size File type Python version Upload date Hashes
Filename, size radiant-3.2.2-py3-none-any.whl (7.1 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size radiant-3.2.2.tar.gz (7.1 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page