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 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
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.0.5.tar.gz
(8.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.5-py3-none-any.whl
(9.8 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52acf79666c634fd47700338eac7806416b9ffea06f56efdc4cc1803eb626268
|
|
| MD5 |
d0f807326ee9f6802d518b40f57e431f
|
|
| BLAKE2b-256 |
4434b0c8a6e8d065c2a63099d994a2578a2f64bef20701830973402aeeef1726
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e1548ae814eddf6d841e29b530f15abe140930ef9d8a7bfcc05619cdfbc6887
|
|
| MD5 |
9c49d0f5430c131c6371d8cfc275a90e
|
|
| BLAKE2b-256 |
e0d239c41f7678959e4e8e24173f05d769ee11a4f74183e2793ee25065f90a24
|