An open API service indexing awesome lists of open source software.

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

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 run main.py.

Visit localhost: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.py

from 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}

```