Skip to main content

Brython Framework

Project description

Radiant Framework

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 web framework that is built on top of Brython, which is an implementation of Python in the browser. This means that you can write your web applications using Python syntax, rather than having to deal with HTML, CSS, or JavaScript.

Radiant allows you to write your application code once, and have it run both in the browser and on the server. When running on the server, Radiant uses the Tornado web server to serve up your application. It also sets up the local path for serving static files, which means that you can include images, stylesheets, and other assets in your application.

When your application is run in the browser, Radiant uses Brython to execute your Python code. This allows you to write your code once, and have it run seamlessly in both environments. Radiant also provides a custom HTML template that is configured at runtime to import the same script that you wrote for the server-side code.

Overall, Radiant is a powerful tool for developers who want to build web applications using Python. It allows you to write your code once, and have it run both on the server and in the browser. This can help streamline your development process, and allow you to focus on writing high-quality code, rather than worrying about the details of web development.

Installation

To install Radiant, you can use pip, the Python package manager:

pip install radiant

Bare minimum

To help you get started with Radiant, let's walk through a bare minimum example. This example will show you how to create a simple web page that displays some text. We'll use the Radiant framework to create the page and run it on a local server. This is a great way to get a feel for how Radiant works, and to start exploring its features.

To follow along with this example, you'll need to have Radiant installed on your system. If you haven't done this yet, please see the Installation section for instructions on how to install Radiant. Once you have Radiant installed, you're ready to go!

from radiant.framework.server import RadiantAPI
from browser import document, html


class BareMinimum(RadiantAPI):

    def __init__(self, *args, **kwargs):
        """"""
        super().__init__(*args, **kwargs)
        document.select_one('body') <= html.H1('Radiant-Framework')


if __name__ == '__main__':
    BareMinimum()

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.

radiant_framework-0.1a3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file radiant_framework-0.1a3-py3-none-any.whl.

File metadata

File hashes

Hashes for radiant_framework-0.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 06e7fc2177c295c063ebac93158efdf14ee38e0f952d502f3a0287ea06dd1d49
MD5 c0b35097a1544981b8d3f63d3f3136e4
BLAKE2b-256 a37278a7648df6e9bac0ee7dfae8d650e403f838bd8a14f4fef4bbb8fc0e820c

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