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 cob
app = cob.App('Test App')
def test_page(server_request: cob.Request) -> cob.Page:
name = server_request.get_query_parameter('name')
page = cob.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 = cob.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.1.0.tar.gz
(23.0 kB
view hashes)
Built Distribution
pycob-0.1.0-py3-none-any.whl
(25.1 kB
view hashes)