Skip to main content

spiderweb

Build status Coverage Version Downloads Stars Repo Size Forks Gitmoji Code style: Black

As a professional web developer focusing on arcane uses of Django for arcane purposes, it occurred to me a little while ago that I didn't actually know how a web framework worked.

So I built one.

spiderweb is a small web framework, just big enough to hold a spider. Getting started is easy:

uv add spiderweb-framework
# or
pip install spiderweb-framework

Create a new file and drop this in it:

from spiderweb import SpiderwebRouter
from spiderweb.response import HttpResponse

app = SpiderwebRouter()

@app.route("/")
def index(request):
    return HttpResponse("HELLO, WORLD!")

if __name__ == "__main__":
    app.start()

View the docs here!

Development (using uv)

This repository uses uv for local development and testing.

  • Create a virtual environment: uv venv
  • Activate it (Windows): .venv\Scripts\activate
  • Activate it (POSIX): source .venv/bin/activate
  • Install deps (editable + dev): uv pip install -e .[dev]
  • Run tests: uv run python -m pytest
  • Lint/format: uv run ruff check . and uv run black .

My goal with this framework was to do three things:

  1. Learn a lot
  2. Create an unholy blend of Django and Flask
  3. Not look at any existing code. Go off of vibes alone and try to solve all the problems I could think of in my own way

And, honestly, I think I got there. Here's a non-exhaustive list of things this can do:

  • Function-based views
  • Optional Flask-style URL routing
  • Optional Django-style URL routing
  • URLs with variables in them a lá Django
  • Full middleware implementation
  • Limit routes by HTTP verbs
  • Custom error routes
  • Built-in dev server
  • Gunicorn support
  • HTML templates with Jinja2
  • Static files support
  • Cookies (reading and setting)
  • Optional append_slash (with automatic redirects!)
  • CSRF middleware
  • CORS middleware
  • Optional POST data validation middleware with Pydantic
  • Session middleware with built-in session store
  • Database support (using SQLAlchemy, but you can use whatever you want as long as there's a SQLAlchemy driver for it)
  • Tests (currently roughly 89% coverage)

Metadata

Release files for spiderweb-framework 2.8.0

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

Source distribution (sdist)

Source distribution for spiderweb-framework 2.8.0
File Size Uploaded Provenance Actions
spiderweb_framework-2.8.0.tar.gz 687.4 kB Without provenance Details for spiderweb_framework-2.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spiderweb-framework 2.8.0
File Interpreter ABI Platform Actions
spiderweb_framework-2.8.0-py3-none-any.whl Python 3 none any Details for spiderweb_framework-2.8.0-py3-none-any.whl

Total release size: 790.5 kB

Release files / spiderweb_framework-2.8.0.tar.gz

Download URL spiderweb_framework-2.8.0.tar.gz
Size 687.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4c7a6b4d9e68067254628b4c541d02c9e67c6340b6e0d6ae551e634efbd1c75b
BLAKE2b-256 checksum
How to use checksums
c591bcc68b3d77efce16a62d71fca2f6d44361a6ad2c48dd70225d3ca7641e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / spiderweb_framework-2.8.0-py3-none-any.whl

Download URL spiderweb_framework-2.8.0-py3-none-any.whl
Size 103.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4cafebfdcff06698dd240b9d57d3565ee442642a30bc6f4ce0c5cabdf945be75
BLAKE2b-256 checksum
How to use checksums
1793eb77e1f3e18caf10581df2db943cac2eb59e95f56138abe636bfa192c5ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for spiderweb-framework 2.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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