Skip to main content

pyWSGIapp

pywsgiapp is a lightweight WSGI application framework aimed at simplifying the development of WSGI-based web applications. It offers an intuitive interface for managing HTTP requests and responses, enabling easy creation and deployment of web applications.


Features

  • Lightweight and easy-to-use WSGI framework.
  • Customizable request handler for processing HTTP requests.
  • Compatible with WSGI servers like gunicorn.

Installation

To install the package, use the following command:

pip install pywsgiapp

Usage

Example: Basic WSGI Application

Here’s an example of how to use pywsgiapp to create a simple WSGI application:

from pywsgiapp.WSGIApp import createWSGIApp

# Define a request handler function
def requestHandler(url: str, requestHeaders: dict, postData: dict) -> dict:
    response_body = f"Received URL: {url}, Headers: {requestHeaders}, Post Data: {postData}"
    return {
        "responseCode": 200,
        "responseHeaders": {"Content-Type": "text/plain"},
        "responseBody": response_body
    }

# Create the WSGI application
app = createWSGIApp(requestHandler)

Save this code in a file (e.g., basic.py) and run it with a WSGI server like gunicorn:

gunicorn basic:app

For more examples, see the Examples Documentation.


  • pywsgiapp/: The main package containing the framework code.
  • examples/: Example scripts demonstrating how to use the framework.
  • setup.py: Metadata and installation configuration.
  • requirements.txt: List of dependencies for development and deployment.

Development

If you want to contribute or modify the framework, follow these steps:

  1. Clone the repository:

    git clone https://github.com/jaythorat/pywsgiapp.git
    cd pywsgiapp
    
  2. Install the package in editable mode:

    pip install -e .
    

Dependencies

The framework requires the following dependencies:

  • gunicorn>=20.1.0

Install them using:

pip install -r requirements.txt

License

This project is licensed under the MIT License. See the LICENSE file for details.


Contributing

Contributions are welcome! If you’d like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes and push the branch.
  4. Open a pull request.

Contact

For any questions or issues, feel free to contact the author:

Metadata

Release files for pywsgiapp 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywsgiapp 0.0.7
File Size Uploaded
pywsgiapp-0.0.7.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pywsgiapp 0.0.7
File Interpreter ABI Platform
pywsgiapp-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 18.5 kB

Release files / pywsgiapp-0.0.7.tar.gz

Download URL pywsgiapp-0.0.7.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a0f61435184d5f0b821f68d2a12963fb54038a8192db009f428b8bff5e2ee5e4
BLAKE2b-256 checksum
How to use checksums
5de298627022bffefd5136b9d7124f2b3868017d0e98c2073e531cd3a86958d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / pywsgiapp-0.0.7-py3-none-any.whl

Download URL pywsgiapp-0.0.7-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5a13e9a50e2a0f659045a8a58f54f493a4f7d19d3e43f9843a6a094bc8efb92
BLAKE2b-256 checksum
How to use checksums
18661bb51a1c37b2c494f399efb39c1f0c3cdcd4e45f7d9f1ad13f0e6bd1b5e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page