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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycob-0.0.5-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file pycob-0.0.5.tar.gz.

File metadata

  • Download URL: pycob-0.0.5.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pycob-0.0.5.tar.gz
Algorithm Hash digest
SHA256 52acf79666c634fd47700338eac7806416b9ffea06f56efdc4cc1803eb626268
MD5 d0f807326ee9f6802d518b40f57e431f
BLAKE2b-256 4434b0c8a6e8d065c2a63099d994a2578a2f64bef20701830973402aeeef1726

See more details on using hashes here.

File details

Details for the file pycob-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pycob-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pycob-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1e1548ae814eddf6d841e29b530f15abe140930ef9d8a7bfcc05619cdfbc6887
MD5 9c49d0f5430c131c6371d8cfc275a90e
BLAKE2b-256 e0d239c41f7678959e4e8e24173f05d769ee11a4f74183e2793ee25065f90a24

See more details on using hashes here.

Supported by

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