Build web apps using just Python
Project description
PyCob
Create web apps using just Python
Install PyCob
pip install pycob
Use PyCob
import pycob as pc
app = pc.App('Test App')
def test_page(server_request: pc.Request) -> pc.Page:
name = server_request.get_query_parameter('name')
page = pc.Page('Test Page')
page.add_header('Test Header', "2")
page.add_text('Test Text')
page.add_alert('Test Alert')
page.add_hero('Hello ' + name, 'Test Subtitle', 'https://source.unsplash.com/random/800x600')
form = pc.FormComponent(action="/")
form.add_formtext('Name', 'name', 'Enter your name')
form.add_formsubmit('Submit')
page.add_component(form)
return page
app.add_page('/', test_page)
app.run()
Quickstart
Learn More
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
pycob-0.0.7.tar.gz
(13.1 kB
view hashes)
Built Distribution
pycob-0.0.7-py3-none-any.whl
(18.5 kB
view hashes)