Skip to main content

PyCob

PyCob Logo on Hexagon

Create web apps using just Python

Install PyCob

pip install pycob

Use PyCob

import pycob as cob
import pandas as pd

# Create a PyCob app
app = cob.App('Sample App')

# Define the page
def test_page(server_request: cob.Request) -> cob.Page:
    name = server_request.get_query_parameter('name')
    
    page = cob.Page('Sample Page')

    if name != "":
        page.add_header("Hello, " + name)
    else:
        page.add_header('Sample Header')

    page.add_text('Sample Text')
    page.add_alert('Sample Alert', "Sample Badge")
    
    card = page.add_card()
    card.add_header("Sample Card", size=3)

    form = card.add_form(action="/")
    form.add_formtext('Name', 'name', 'Enter your name')
    form.add_formsubmit('Submit')

    data = {
        "data_int": [420, 380, 390],
        "data_float": [50.2, 39.6, 100.3],
        "large_numbers": [123123.123, 12312512.123, 113453252334.123],
    }

    df = pd.DataFrame(data)

    page.add_pandastable(df)

    return page

# Give the page a route
app.add_page('/', "Home", test_page)

# Run the server
app.run()

Quickstart

Quickstart Template Repo

Learn More

PyCob

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.2.tar.gz (24.8 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.1.2-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pycob-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2f23aaa9afb82b380bb060820bb353dbc61972c4d47bbdb7447692320876cdf5
MD5 bb496df23878646b2b410a8f9153beff
BLAKE2b-256 e3874a78fdc7569d841482ec5e1890d671507a8f1ece8cf41539ad0bb13baebe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycob-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 27.0 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 949d1dc8bb1c3f0b9af5e53645037b444b1c20c00f86a7c2ded60ab170269144
MD5 6284df2827f7f478f7a954bc542b2a0b
BLAKE2b-256 fd96bc36ccc2b4fb5db8d475e716479b26c52cef8242a9227560170b3d424e6d

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 Sentry Error logging StatusPage Status page