This is simple python web framework which written for learning purposes
Project description
pyframex7
pyframex7 is a custom Python web framework created for learning purposes.
Features
- Minimal and easy to understand
- Custom middleware support
- Simple request/response handling
- Supports both class-based and function-based handlers
- Designed for educational use
Installation
pyframex7 is available on PyPI and can be installed with:
pip install pyframex7
Function-Based Handler Example
from app import App
from response import Response
app = App()
@app.route("/")
def home(request):
return Response("Hello, World!")
Class-Based Handler Example
from app import App, Handler
from response import Response
app = App()
class HelloHandler(Handler):
def get(self, request):
return Response("Hello from class-based handler!")
app.add_route("/hello", HelloHandler)
- Define your routes using the
@app.routedecorator for function-based handlers orapp.add_routefor class-based handlers. - Return a
Responseobject from your route handlers. - Run your application with
app.run(). app.run()
- Define your routes using the `@app.route` decorator.
- Return a `Response` object from your route handlers.
- Run your application with `app.run()`.
## Use Cases
- Learning how web frameworks work
- Experimenting with middleware and routing
- Building simple web applications for educational purposes
## License
This project is for learning and educational purposes only.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyframex7-0.1.1.tar.gz
(5.7 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
File details
Details for the file pyframex7-0.1.1.tar.gz.
File metadata
- Download URL: pyframex7-0.1.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81ac7e76c325923b906b5d27780bb486f8baa9635bc3a7dc3a70a4c7a8a75b5
|
|
| MD5 |
755db3c282f14dadd889f8e974b44040
|
|
| BLAKE2b-256 |
83bad2e1ecff4cf996e9a5e90b5d7a525d81e9a46609af61f0d58571de1980f4
|
File details
Details for the file pyframex7-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyframex7-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a05f1b2a1b82d985caaee6b3a5ed6ad95e810d55197f7051b4bc8b7df6bbbefe
|
|
| MD5 |
3e46411e3a9fc023f04ac273c1335a6e
|
|
| BLAKE2b-256 |
6ac150cc6dd67db69f26421e9bd1021ce05eaf24974f1c445f9b6052f788bb75
|