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
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.8.tar.gz
(18.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pycob-0.0.8-py3-none-any.whl
(20.7 kB
view details)
File details
Details for the file pycob-0.0.8.tar.gz.
File metadata
- Download URL: pycob-0.0.8.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6513bbe154b0e521166418fd4b3c4e3b9f40c0840ae88939cb10512c96d8cdb6
|
|
| MD5 |
5114baf77821395735e74268663153d4
|
|
| BLAKE2b-256 |
c92022c6d46993880f9a6952dcd2a8d4f982b1de312c4376c604569481f7816a
|
File details
Details for the file pycob-0.0.8-py3-none-any.whl.
File metadata
- Download URL: pycob-0.0.8-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48821c2ad0d206f4085c726d7432fcc646ef6fa050749b7d68fe3b005b0b7e29
|
|
| MD5 |
f741e355e5b760b5a4c5d02ab1fd5cae
|
|
| BLAKE2b-256 |
336d40acbc60439d05bef42116d47b8d587ac48a668316f403dc5785210101ce
|