Skip to main content

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

radiant-framework-0.1a11.tar.gz (29.8 MB view hashes)

Uploaded Source

Built Distribution

radiant_framework-0.1a11-py3-none-any.whl (31.5 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page