Radiant Framework
Project description
Radiant Framework
A Brython Framework for Web Apps development.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for radiant_framework-0.1a8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59dcdb935c754092a119965ebfad7f10159c032485051b1b2fc2d198a404243f |
|
MD5 | 009bc2a19c9a88689167a2c5c0980620 |
|
BLAKE2b-256 | e889c57c3901c7f800275cb7edc385146971eb0a4dfcbcc74fa2058d7dddbed3 |