Skip to main content

A lightweight, customizable WSGI framework designed to handle web requests with ease and flexibility.

Project description

🌪️ VortexKit

VortexKit is a lightweight, customizable WSGI framework designed to handle web requests with ease and flexibility. It's perfect for building web applications quickly and efficiently. 🚀

🌟 Features

  • Lightweight: Minimal overhead, lightning-fast performance.
  • 🛠️ Customizable: Easily extend and modify to fit your needs.
  • 📦 Built-in Tools: Includes request parsing, routing, and more.
  • 🧪 Test-Friendly: Designed with testing in mind.

🚀 Getting Started

📦 Installation

Install VortexKit via pip:

pip install vortexkit

🔧 Usage

Create a simple application with VortexKit:

from vortexkit import App, PlainTextResponse, Request

app = App()

@app.route("/")
def home(req: Request):
    return PlainTextResponse(f"Hello, World! Your requesting from {req.path}!")

if __name__ == "__main__":
    app.run("localhost", 8080)

Run your application:

python app.py

🛠️ Advanced Usage

Handling Different Content Types

VortexKit can handle various content types including JSON, XML, and multipart form data. View more examples in the Examples Folder

from vortexkit import App, JSONResponse, Request

app = App()

@app.route('/upload')
def upload(req: Request):
    if req.method.upper() is not 'POST':
        return JSONResponse({"error": "Unsupported method"}, status="400 Bad Request")
    if req.content_type.startswith('multipart/form-data'):
        file_data = req.body.get('file')
        return JSONResponse({"filename": file_data.filename, "content": file_data.file.read().decode()})
    return JSONResponse({"error": "Unsupported Content Type"}, status_code="400 Bad Request")

if __name__ == "__main__":
    app.run("localhost", 8080)

Manually registering routes

VortexKit allows dynamic route definitions tailored to your application's specific needs, empowering precise control and flexibility.

from vortexkit import App, PlainTextResponse, Request

app = App()

def homeRoute(request: Request):
    return PlainTextResponse("Hello world!")

app.add_route("/", homeRoute)

if __name__ == "__main__":
    app.run("localhost", 8080)

📖 Documentation

For detailed documentation, visit the VortexKit Docs.

💻 Contributing

We welcome contributions! Please see our CONTRIBUTING.md for details.

📝 License

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

🎉 Acknowledgements

Thanks to all contributors and supporters of VortexKit. Your efforts make this project better every day. 🌟

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

vortexkit-0.1.6.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

vortexkit-0.1.6-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file vortexkit-0.1.6.tar.gz.

File metadata

  • Download URL: vortexkit-0.1.6.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for vortexkit-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a874a35d5d12c80cc529efa4396effc1800b1d12a2d67aa35fb3dc96de93b656
MD5 01922c64db4a4975e5df5c07ee7d50d9
BLAKE2b-256 61209059c1d5168c782722f700e93ecee9f2a1a4d215cd3453b3a31d0fe22669

See more details on using hashes here.

File details

Details for the file vortexkit-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: vortexkit-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for vortexkit-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 89f927c9e1ad4771378f9d3c909bd8e20f12a16cda3ebb38d3f6c4f55bfc559d
MD5 684ca8406a526b7ca1dff0088f06936a
BLAKE2b-256 9ccfdd69decf9c3af077144196b0b39dbde9225ec2a678303d2495c988d9ec16

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