Skip to content

CarlosMatheus/Python-Web-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Web-Framework

An HTTP Python web framework implementation that supports routering and templates like flask.

Project in early development stage, not stable for production 🚧

Usage

Create a server.py file as on the example of this repository.

On the file import the WebFramework class.

Define the routes and pages.

The framework also supports templates files similarly to flask, put them on templates folder.

Call the start_server() method at the end and run the server.py file.

Example

from web_framework import WebFramework

server = WebFramework()


@server.route("/")
def home(request):
    return "Hello from the HOME page"


@server.route("/about")
def about(request):
    return server.open_template('index')


server.start_server()

About

A HTTP Python web framework implementation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published