https://github.com/kevinhellos/pyx
Python web development framework
https://github.com/kevinhellos/pyx
python-web-development webdev
Last synced: about 1 month ago
JSON representation
Python web development framework
- Host: GitHub
- URL: https://github.com/kevinhellos/pyx
- Owner: kevinhellos
- License: mit
- Created: 2023-11-17T17:25:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-18T14:27:40.000Z (over 1 year ago)
- Last Synced: 2025-01-21T21:08:57.235Z (3 months ago)
- Topics: python-web-development, webdev
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview of pyx
pyx (Python eXtra) is a Python web framework that aims to make web development much simpler.# Running locally
Clone this repo and runmain.py
.
Visitlocalhost:3000
# pyx project structure
pyx_project
├──pyx # library for pyx
│ ├──core.py # core functions for pyx
└──views # folder for all your HTML pages
│ ├──index.html # default page
│ ├──error.html # error 404 page
└──main.py # app controller/ logic# Simple pyx app
```py
# main.pyfrom pyx.core import start_server
port = 3000
# Specify the data as dictionary
data = {
# Custom defined data
"page_title": "Welcome to pyx",
"fruit": "apple",
"car": "toyota",# Error pages
"not_found_error_message": "The page you have requested cannot be found",
"forbidden_error_message": "You do not have permission to access this page"
}# Start the server with the specified port and pass in the data dictionary
start_server(port, data)
``````html
Error
Error 404
{error_message}
```