Skip to main content

A lightning-fast, modern Python web framework

Project description

⚡ Killx Framework 🔥

A lightning-fast, modern, and zero-dependency Python web framework that's easier than Flask and built for speed & fun 🏎️💨


✨ Features

✅ URL parameters support (/user/<id>)
✅ JSON response helper
✅ Form data parsing (POST + JSON + Query)
✅ CORS enabled by default 🛡️
✅ Built-in minimalist template engine 🧠
✅ Static file serving (/static)
✅ Auto-reload (Realtime™) 🔁
✅ Debug mode logging 🐞
No dependencies! (Pure Python Standard Library) 🐍 ✅ You can support me on Github (github.com/Pavitroo)


🚀 What's New in v0.1.3?

🐛 Bug Fixes

  • 🧹 Fixed issue where pressing Ctrl+C wouldn’t gracefully kill the server.

🆕 New Features

  • 🐞 Debug Mode: See what Killx is doing step-by-step with .log().
  • 🔁 RealTime™ Reloading: Automatically restart the server when files change!
from killx import Killx

# Enable debug logging + auto-reload
app = Killx(Debug=True, RealTime=True) # Depend on You if you want it enable so do True and if not Do False. Done Simple.

# Root route using template
@app.route("/", methods=["GET"])
def homepage(request):
    app.log("Rendering homepage with template")
    return app.render_template("index.html", message="Welcome to Killx! 🚀")

# JSON API route with path and query params
@app.route("/api/user/<id>", methods=["GET"])
def get_user(request):
    user_id = request["url_params"]["id"]
    name = request["query_params"].get("name", ["Unknown"])[0]
    app.log(f"Fetching user: {user_id} with name: {name}")
    return app.json({"id": user_id, "name": name})

# POST route to receive form data
@app.route("/submit", methods=["POST"])
def submit(request):
    form = request["form_data"]
    app.log(f"Received form: {form}")
    return app.json({
        "status": "received",
        "form": form
    })

# Static file test (optional)
@app.route("/static-test", methods=["GET"])
def static_test(request):
    return """
    <html>
      <head><link rel="stylesheet" href="/static/style.css"></head>
      <body><h1>Static File Test</h1><script src="/static/script.js"></script></body>
    </html>
    """

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

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

killx-0.1.3.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

killx-0.1.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file killx-0.1.3.tar.gz.

File metadata

  • Download URL: killx-0.1.3.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for killx-0.1.3.tar.gz
Algorithm Hash digest
SHA256 336d3cc3768ca85b30cabbea3ff66e826dcd95df188e7d6f1e58cef1e64516e7
MD5 5f94fb699f132aee347efafa5ec507e3
BLAKE2b-256 29be0c4f8c716fa44aac254d935d3d41f6b48327216769f778107d35ae27919b

See more details on using hashes here.

File details

Details for the file killx-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: killx-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for killx-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b97d78909d0bae305ee435c54968ed42ab7c5ca69ad366d4b6c07f953fabbf0b
MD5 da975e5c113d666422e88948c62e3725
BLAKE2b-256 05e35480fa0d019f4aea69573be5e3e6f67fa4dfdd9e35e43595ecd7b06a8bf7

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