Skip to main content

Bring Your Code to the Web with Ease using a Lightweight WSGI Application.

Project description

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:

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

pywsgiapp-0.0.4.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

pywsgiapp-0.0.4-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file pywsgiapp-0.0.4.tar.gz.

File metadata

  • Download URL: pywsgiapp-0.0.4.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywsgiapp-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6e5fddd147437a87192325cac65473cbf10fdfbc9555516d6348de2147d4782e
MD5 13ff63f918c40f88b27d39d36ccdc07e
BLAKE2b-256 66f609680b67f9d88134e30224059a8c9175e0e83e4194f10b3baca0b35742af

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywsgiapp-0.0.4.tar.gz:

Publisher: python-publish.yml on jaythorat/pywsgiapp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pywsgiapp-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pywsgiapp-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywsgiapp-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 66840e9b973ee00bb979b3c4ab7c2789e14e82b1477afee3d60796ecf58808f6
MD5 172e23958d518f70d5e25d541e70af9c
BLAKE2b-256 f5d956ea5728b676bca5a77948ddff54bc7f4e08f74407d34e1dba3aedf78971

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywsgiapp-0.0.4-py3-none-any.whl:

Publisher: python-publish.yml on jaythorat/pywsgiapp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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