Skip to main content

This is simple python web framework which written for learning purposes

Project description

Purpose Status

PyFrame can be downloaded and installed from PyPI.

PyFrame

PyFrame 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

You can install PyFrame locally by cloning this repository and installing it in editable mode:

PyFrame supports both function-based and class-based handlers for defining routes.

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.route decorator for function-based handlers or app.add_route for class-based handlers.
  • Return a Response object 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.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyframex7-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pyframex7-0.1.0.tar.gz.

File metadata

  • Download URL: pyframex7-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for pyframex7-0.1.0.tar.gz
Algorithm Hash digest
SHA256 38ea09e2aa775ef75ec94d18fa151fc2d6873aac8155f72b6e6f92cb750cbe8e
MD5 b55195b78fee3748fbfc5e749942bc76
BLAKE2b-256 ced554197d46eb014d2fd8eaeaae167dacf3e21f50bd99caa7000ad1a804d050

See more details on using hashes here.

File details

Details for the file pyframex7-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyframex7-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for pyframex7-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd91685a4053278d08f27d65285a83e54a7901887048d4c64ac5ad787de3fcd
MD5 2afaa64431b3a0a59970d96ad4259f44
BLAKE2b-256 8b24cca3e820e0b24d4ef983b0fe85217bcd74300398d92640153ff11897b6d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page