Skip to main content

Build web apps using just Python

Project description

PyCob

PyCob Logo on Hexagon

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

Quickstart Template Repo

Learn More

PyCob

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

pycob-0.0.5.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

pycob-0.0.5-py3-none-any.whl (9.8 kB 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