spiderweb-framework 2.7.0__tar.gz → 2.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/PKG-INFO +2 -2
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/badges/build.svg +1 -1
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/badges/coverage.svg +1 -1
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/badges/forks.svg +1 -1
- spiderweb_framework-2.8.0/badges/pypi-downloads-monthly.svg +1 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/badges/pypi-version.svg +1 -1
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/badges/repo-size.svg +1 -1
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/badges/stars.svg +1 -1
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_sidebar.md +3 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/asgi.md +4 -6
- spiderweb_framework-2.8.0/docs/authentication.md +136 -0
- spiderweb_framework-2.8.0/docs/logging.md +56 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/management.md +11 -13
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/csrf.md +1 -1
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/custom_middleware.md +1 -1
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/pydantic.md +1 -1
- spiderweb_framework-2.8.0/docs/middleware/security_headers.md +76 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/quickstart.md +13 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/routes.md +8 -8
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/pyproject.toml +2 -1
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/asgi.py +30 -7
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/authentication.py +6 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/constants.py +1 -0
- spiderweb_framework-2.8.0/spiderweb/debug.py +36 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/exceptions.py +7 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/main.py +67 -9
- spiderweb_framework-2.8.0/spiderweb/middleware/security_headers.py +62 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/request.py +8 -9
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/routes.py +15 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_asgi.py +1 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_authentication.py +16 -0
- spiderweb_framework-2.8.0/spiderweb/tests/test_debug.py +165 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_main_extra.py +13 -0
- spiderweb_framework-2.8.0/spiderweb/tests/test_request.py +167 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_responses.py +9 -12
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_routes.py +30 -0
- spiderweb_framework-2.8.0/spiderweb/tests/test_security_headers.py +104 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_session_persistence.py +58 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/utils.py +16 -0
- spiderweb_framework-2.8.0/uv.lock +1333 -0
- spiderweb_framework-2.7.0/.junie/guidelines.md +0 -140
- spiderweb_framework-2.7.0/badges/pypi-downloads-monthly.svg +0 -1
- spiderweb_framework-2.7.0/uv.lock +0 -1115
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.github/workflows/publish.yml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.github/workflows/retype.yml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.github/workflows/tests.yml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.github/workflows/update_badges.yml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.gitignore +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.idea/.gitignore +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.idea/inspectionProfiles/Project_Default.xml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.idea/misc.xml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.idea/modules.xml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.idea/spiderweb.iml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/.idea/vcs.xml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/LICENSE.txt +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/Makefile +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/README.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/conftest.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/.nojekyll +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/README.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_coverpage.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_media/DMSans-Bold.ttf +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_media/DMSans-Medium.ttf +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_media/Favicon-32x32.png +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_media/favicon.png +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_media/spiderweb_logo.png +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_media/spiderweb_logo_cleaned.png +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/_media/spiderweb_logo_cropped.png +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/db.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/file_uploads.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/index.html +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/cors.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/gzip.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/index.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/index.yml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/sessions.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/responses.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/static_files.md +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/example.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/example2.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/example_async.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/example_async_middleware.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/example_auth.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/example_class_based_view.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/example_middleware.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/example_profile.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/retype.yml +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/__init__.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/cli.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/converters.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/db.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/decorators.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/default_views.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/example_validator.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/files.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/jinja_core.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/jinja_extensions.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/local_server.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/middleware/__init__.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/middleware/base.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/middleware/cors.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/middleware/csrf.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/middleware/gzip.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/middleware/pydantic.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/middleware/sessions.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/models/__init__.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/models/permission.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/models/user.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/response.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/routegroup.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/secrets.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/server_checks.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/__init__.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/helpers.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/middleware.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/staticfiles/.gitkeep +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/staticfiles/file_for_testing_fileresponse.txt +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/staticfiles/style.css +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test.html +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_asgi_extra.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_cli.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_cookies.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_coverage_extras.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_db.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_exceptions.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_files.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_jinja_extras.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_local_server.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_local_server_extra.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_middleware.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_middleware_init.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_pydantic_middleware.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_routegroups.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_secrets.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_server.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_server_checks.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_user.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_utils.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/test_variable_urls.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/spiderweb/tests/views_for_tests.py +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/static_files/aaaaaa.gif +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/templates/base.html +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/templates/file_upload.html +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/templates/form.html +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/templates/test.html +0 -0
- {spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/tools/update_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: spiderweb-framework
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.8.0
|
|
4
4
|
Summary: A small web framework, just big enough for a spider.
|
|
5
5
|
Project-URL: Homepage, https://github.com/itsthejoker/spiderweb
|
|
6
6
|
Project-URL: Documentation, https://github.com/itsthejoker/spiderweb
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="162" height="28" role="img" aria-label="BUILD: PASSING"><title>BUILD: PASSING</title><g shape-rendering="crispEdges"><rect width="78.25" height="28" fill="#555"/><rect x="78.25" width="83.75" height="28" fill="#
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="162" height="28" role="img" aria-label="BUILD: PASSING"><title>BUILD: PASSING</title><g shape-rendering="crispEdges"><rect width="78.25" height="28" fill="#555"/><rect x="78.25" width="83.75" height="28" fill="#4b0"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><image x="9" y="7" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMjA4OEZGIiByb2xlPSJpbWciIHZpZXdCb3g9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LjUgMTdjMS45MyAwIDMuNSAxLjU3IDMuNSAzLjV6bS0xIDBjMC0xLjM3OC0xLjEyMi0yLjUtMi41LTIuNVMxOCAxOS4xMjIgMTggMjAuNXMxLjEyMiAyLjUgMi41IDIuNSAyLjUtMS4xMjIgMi41LTIuNXoiLz48L3N2Zz4="/><text transform="scale(.1)" x="476.25" y="175" textLength="372.5">BUILD</text><text transform="scale(.1)" x="1201.25" y="175" textLength="597.5" font-weight="bold">PASSING</text></g></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="142.75" height="28" role="img" aria-label="COVERAGE: 94%"><title>COVERAGE: 94%</title><g shape-rendering="crispEdges"><rect width="89" height="28" fill="#555"/><rect x="89" width="53.75" height="28" fill="#
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="142.75" height="28" role="img" aria-label="COVERAGE: 94%"><title>COVERAGE: 94%</title><g shape-rendering="crispEdges"><rect width="89" height="28" fill="#555"/><rect x="89" width="53.75" height="28" fill="#4b0"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><text transform="scale(.1)" x="445" y="175" textLength="650">COVERAGE</text><text transform="scale(.1)" x="1158.75" y="175" textLength="297.5" font-weight="bold">94%</text></g></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="113.5" height="28"><g shape-rendering="crispEdges"><rect width="81.25" height="28" fill="#555"/><rect x="81.25" width="32.25" height="28" fill="#007ec6"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><image x="9" y="7" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZXNtb2tlIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnL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fill="rgba(0,0,0,0)"/><text transform="scale(.1)" x="491.25" y="175" textLength="402.5"
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="113.5" height="28"><g shape-rendering="crispEdges"><rect width="81.25" height="28" fill="#555"/><rect x="81.25" width="32.25" height="28" fill="#007ec6"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><image x="9" y="7" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZXNtb2tlIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+R2l0SHViPC90aXRsZT48cGF0aCBkPSJNMTIgLjI5N2MtNi42MyAwLTEyIDUuMzczLTEyIDEyIDAgNS4zMDMgMy40MzggOS44IDguMjA1IDExLjM4NS42LjExMy44Mi0uMjU4LjgyLS41NzcgMC0uMjg1LS4wMS0xLjA0LS4wMTUtMi4wNC0zLjMzOC43MjQtNC4wNDItMS42MS00LjA0Mi0xLjYxQzQuNDIyIDE4LjA3IDMuNjMzIDE3LjcgMy42MzMgMTcuN2MtMS4wODctLjc0NC4wODQtLjcyOS4wODQtLjcyOSAxLjIwNS4wODQgMS44MzggMS4yMzYgMS44MzggMS4yMzYgMS4wNyAxLjgzNSAyLjgwOSAxLjMwNSAzLjQ5NS45OTguMTA4LS43NzYuNDE3LTEuMzA1Ljc2LTEuNjA1LTIuNjY1LS4zLTUuNDY2LTEuMzMyLTUuNDY2LTUuOTMgMC0xLjMxLjQ2NS0yLjM4IDEuMjM1LTMuMjItLjEzNS0uMzAzLS41NC0xLjUyMy4xMDUtMy4xNzYgMCAwIDEuMDA1LS4zMjIgMy4zIDEuMjMuOTYtLjI2NyAxLjk4LS4zOTkgMy0uNDA1IDEuMDIuMDA2IDIuMDQuMTM4IDMgLjQwNSAyLjI4LTEuNTUyIDMuMjg1LTEuMjMgMy4yODUtMS4yMy42NDUgMS42NTMuMjQgMi44NzMuMTIgMy4xNzYuNzY1Ljg0IDEuMjMgMS45MSAxLjIzIDMuMjIgMCA0LjYxLTIuODA1IDUuNjI1LTUuNDc1IDUuOTIuNDIuMzYuODEgMS4wOTYuODEgMi4yMiAwIDEuNjA2LS4wMTUgMi44OTYtLjAxNSAzLjI4NiAwIC4zMTUuMjEuNjkuODI1LjU3QzIwLjU2NSAyMi4wOTIgMjQgMTcuNTkyIDI0IDEyLjI5N2MwLTYuNjI3LTUuMzczLTEyLTEyLTEyIi8+PC9zdmc+"/><a target="_blank" href="https://github.com/itsthejoker/spiderweb/fork"><rect width="81.25" height="28" fill="rgba(0,0,0,0)"/><text transform="scale(.1)" x="491.25" y="175" textLength="402.5">FORKS</text></a><a target="_blank" href="https://github.com/itsthejoker/spiderweb/network"><rect width="32.25" height="28" x="81.25" fill="rgba(0,0,0,0)"/><text transform="scale(.1)" x="973.75" y="175" textLength="82.5" font-weight="bold">2</text></a></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="215.25" height="28" role="img" aria-label="DOWNLOADS: 51/MONTH"><title>DOWNLOADS: 51/MONTH</title><g shape-rendering="crispEdges"><rect width="119.25" height="28" fill="#555"/><rect x="119.25" width="96" height="28" fill="#95991a"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><image x="9" y="7" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMzc3NUE5IiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+UHlQSTwvdGl0bGU+PHBhdGggZD0iTTIzLjkyMiAxMy41OHYzLjkxMkwyMC41NSAxOC43MmwtLjA3OC4wNTUuMDUyLjAzNyAzLjQ1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bDIuMzYxLjg2Ljk2LjM0OXYzLjkxM3ptLjAxNS0zLjk5TC4zMzUgMTQuODVsLS4xODItLjA2NiAzLjI2Mi0xLjE4N3YyLjM3NHptMy4zOTkgNS4yMzFsLTMuMzIxLTEuMjA5di0zLjkxMmwzLjMyMSAxLjIwOXYzLjkxMnpNMjMuNzkxIDUuNDM0bC0zLjIxLTEuMTd2Mi4zMzh6TTIwLjM4NyAyLjY0M2wtMy4yNC0xLjE4LTMuMjcgMS4xOSAzLjI0NyAxLjE4MnoiLz48L3N2Zz4="/><text transform="scale(.1)" x="681.25" y="175" textLength="782.5">DOWNLOADS</text><text transform="scale(.1)" x="1672.5" y="175" textLength="720" font-weight="bold">51/MONTH</text></g></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="135.5" height="28" role="img" aria-label="PYPI: V2.
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="135.5" height="28" role="img" aria-label="PYPI: V2.7.0"><title>PYPI: V2.7.0</title><g shape-rendering="crispEdges"><rect width="68" height="28" fill="#555"/><rect x="68" width="67.5" height="28" fill="#007ec6"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><image x="9" y="7" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMzc3NUE5IiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+UHlQSTwvdGl0bGU+PHBhdGggZD0iTTIzLjkyMiAxMy41OHYzLjkxMkwyMC41NSAxOC43MmwtLjA3OC4wNTUuMDUyLjAzNyAzLjQ1LTEuMjU2LjAyNi0uMDM2di0zLjk5N2wtLjA1My0uMDM2LS4wMjUuMDkyeiBNMjMuNjIxIDUuNjE4bC0zLjA0IDEuMTA3djMuOTEybDMuMzM5LTEuMj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MzFsLTMuMzIxLTEuMjA5di0zLjkxMmwzLjMyMSAxLjIwOXYzLjkxMnpNMjMuNzkxIDUuNDM0bC0zLjIxLTEuMTd2Mi4zMzh6TTIwLjM4NyAyLjY0M2wtMy4yNC0xLjE4LTMuMjcgMS4xOSAzLjI0NyAxLjE4MnoiLz48L3N2Zz4="/><text transform="scale(.1)" x="425" y="175" textLength="270">PYPI</text><text transform="scale(.1)" x="1017.5" y="175" textLength="435" font-weight="bold">V2.7.0</text></g></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="182" height="28" role="img" aria-label="REPO SIZE: 1.
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="182" height="28" role="img" aria-label="REPO SIZE: 1.4 MIB"><title>REPO SIZE: 1.4 MIB</title><g shape-rendering="crispEdges"><rect width="106.25" height="28" fill="#555"/><rect x="106.25" width="75.75" height="28" fill="#007ec6"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><image x="9" y="7" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZXNtb2tlIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+R2l0SHViPC90aXRsZT48cGF0aCBkPSJNMTIgLjI5N2MtNi42MyAwLTEyIDUuMzczLTEyIDEyIDAgNS4zMDMgMy40MzggOS44IDguMjA1IDExLjM4NS42LjExMy44Mi0uMjU4LjgyLS41NzcgMC0uMjg1LS4wMS0xLjA0LS4wMTUtMi4wNC0zLjMzOC43MjQtNC4wNDItMS42MS00LjA0Mi0xLjYxQzQuNDIyIDE4LjA3IDMuNjMzIDE3LjcgMy42MzMgMTcuN2MtMS4wODctLjc0NC4wODQtLjcyOS4wODQtLjcyOSAxLjIwNS4wODQgMS44MzggMS4yMzYgMS44MzggMS4yMzYgMS4wNyAxLjgzNSAyLjgwOSAxLjMwNSAzLjQ5NS45OTguMTA4LS43NzYuNDE3LTEuMzA1Ljc2LTEuNjA1LTIuNjY1LS4zLTUuNDY2LTEuMzMyLTUuNDY2LTUuOTMgMC0xLjMxLjQ2NS0yLjM4IDEuMjM1LTMuMjItLjEzNS0uMzAzLS41NC0xLjUyMy4xMDUtMy4xNzYgMCAwIDEuMDA1LS4zMjIgMy4zIDEuMjMuOTYtLjI2NyAxLjk4LS4zOTkgMy0uNDA1IDEuMDIuMDA2IDIuMDQuMTM4IDMgLjQwNSAyLjI4LTEuNTUyIDMuMjg1LTEuMjMgMy4yODUtMS4yMy42NDUgMS42NTMuMjQgMi44NzMuMTIgMy4xNzYuNzY1Ljg0IDEuMjMgMS45MSAxLjIzIDMuMjIgMCA0LjYxLTIuODA1IDUuNjI1LTUuNDc1IDUuOTIuNDIuMzYuODEgMS4wOTYuODEgMi4yMiAwIDEuNjA2LS4wMTUgMi44OTYtLjAxNSAzLjI4NiAwIC4zMTUuMjEuNjkuODI1LjU3QzIwLjU2NSAyMi4wOTIgMjQgMTcuNTkyIDI0IDEyLjI5N2MwLTYuNjI3LTUuMzczLTEyLTEyLTEyIi8+PC9zdmc+"/><text transform="scale(.1)" x="616.25" y="175" textLength="652.5">REPO SIZE</text><text transform="scale(.1)" x="1441.25" y="175" textLength="517.5" font-weight="bold">1.4 MIB</text></g></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="120.75" height="28"><g shape-rendering="crispEdges"><rect width="80.25" height="28" fill="#555"/><rect x="80.25" width="40.5" height="28" fill="#007ec6"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><image x="9" y="7" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZXNtb2tlIiByb2xlPSJpbWciIHZpZXdC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dmc+"/><a target="_blank" href="https://github.com/itsthejoker/spiderweb"><rect width="80.25" height="28" fill="rgba(0,0,0,0)"/><text transform="scale(.1)" x="486.25" y="175" textLength="392.5"
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="120.75" height="28"><g shape-rendering="crispEdges"><rect width="80.25" height="28" fill="#555"/><rect x="80.25" width="40.5" height="28" fill="#007ec6"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="100"><image x="9" y="7" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZXNtb2tlIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+R2l0SHViPC90aXRsZT48cGF0aCBkPSJNMTIgLjI5N2MtNi42MyAwLTEyIDUuMzczLTEyIDEyIDAgNS4zMDMgMy40MzggOS44IDguMjA1IDExLjM4NS42LjExMy44Mi0uMjU4LjgyLS41NzcgMC0uMjg1LS4wMS0xLjA0LS4wMTUtMi4wNC0zLjMzOC43MjQtNC4wNDItMS42MS00LjA0Mi0xLjYxQzQuNDIyIDE4LjA3IDMuNjMzIDE3LjcgMy42MzMgMTcuN2MtMS4wODctLjc0NC4wODQtLjcyOS4wODQtLjcyOSAxLjIwNS4wODQgMS44MzggMS4yMzYgMS44MzggMS4yMzYgMS4wNyAxLjgzNSAyLjgwOSAxLjMwNSAzLjQ5NS45OTguMTA4LS43NzYuNDE3LTEuMzA1Ljc2LTEuNjA1LTIuNjY1LS4zLTUuNDY2LTEuMzMyLTUuNDY2LTUuOTMgMC0xLjMxLjQ2NS0yLjM4IDEuMjM1LTMuMjItLjEzNS0uMzAzLS41NC0xLjUyMy4xMDUtMy4xNzYgMCAwIDEuMDA1LS4zMjIgMy4zIDEuMjMuOTYtLjI2NyAxLjk4LS4zOTkgMy0uNDA1IDEuMDIuMDA2IDIuMDQuMTM4IDMgLjQwNSAyLjI4LTEuNTUyIDMuMjg1LTEuMjMgMy4yODUtMS4yMy42NDUgMS42NTMuMjQgMi44NzMuMTIgMy4xNzYuNzY1Ljg0IDEuMjMgMS45MSAxLjIzIDMuMjIgMCA0LjYxLTIuODA1IDUuNjI1LTUuNDc1IDUuOTIuNDIuMzYuODEgMS4wOTYuODEgMi4yMiAwIDEuNjA2LS4wMTUgMi44OTYtLjAxNSAzLjI4NiAwIC4zMTUuMjEuNjkuODI1LjU3QzIwLjU2NSAyMi4wOTIgMjQgMTcuNTkyIDI0IDEyLjI5N2MwLTYuNjI3LTUuMzczLTEyLTEyLTEyIi8+PC9zdmc+"/><a target="_blank" href="https://github.com/itsthejoker/spiderweb"><rect width="80.25" height="28" fill="rgba(0,0,0,0)"/><text transform="scale(.1)" x="486.25" y="175" textLength="392.5">STARS</text></a><a target="_blank" href="https://github.com/itsthejoker/spiderweb/stargazers"><rect width="40.5" height="28" x="80.25" fill="rgba(0,0,0,0)"/><text transform="scale(.1)" x="1005" y="175" textLength="165" font-weight="bold">57</text></a></g></svg>
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
- [cors](middleware/cors.md)
|
|
12
12
|
- [pydantic](middleware/pydantic.md)
|
|
13
13
|
- [gzip](middleware/gzip.md)
|
|
14
|
+
- [security headers](middleware/security_headers.md)
|
|
14
15
|
- [writing your own](middleware/custom_middleware.md)
|
|
15
16
|
- [databases](db.md)
|
|
17
|
+
- [authentication](authentication.md)
|
|
16
18
|
- [asgi](asgi.md)
|
|
17
19
|
- [management](management.md)
|
|
20
|
+
- [logging](logging.md)
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
icon: arrow-switch
|
|
3
|
-
nav:
|
|
4
|
-
badge: NEW|info
|
|
5
3
|
order: 0
|
|
6
4
|
---
|
|
7
5
|
|
|
@@ -74,7 +72,7 @@ hypercorn myapp:app.asgi_app
|
|
|
74
72
|
|
|
75
73
|
## Async Views
|
|
76
74
|
|
|
77
|
-
Views can be defined as `async def` and they will be awaited natively in ASGI mode. Sync views continue to work too
|
|
75
|
+
Views can be defined as `async def` and they will be awaited natively in ASGI mode. Sync views continue to work too -- they're dispatched via `asyncio.to_thread` so they don't block the event loop.
|
|
78
76
|
|
|
79
77
|
```python
|
|
80
78
|
@app.route("/sync")
|
|
@@ -90,7 +88,7 @@ Both of the above work under both WSGI and ASGI. There's no need to pick one or
|
|
|
90
88
|
|
|
91
89
|
## Lifespan Callbacks
|
|
92
90
|
|
|
93
|
-
You can register startup and shutdown callbacks when creating the router. These are called by the ASGI server during the lifespan protocol
|
|
91
|
+
You can register startup and shutdown callbacks when creating the router. These are called by the ASGI server during the lifespan protocol -- startup before the first request, shutdown after the last.
|
|
94
92
|
|
|
95
93
|
```python
|
|
96
94
|
def on_start():
|
|
@@ -162,10 +160,10 @@ You can use both protocols at the same time from the same `SpiderwebRouter` inst
|
|
|
162
160
|
```python
|
|
163
161
|
app = SpiderwebRouter()
|
|
164
162
|
|
|
165
|
-
# WSGI
|
|
163
|
+
# WSGI -- pass to gunicorn, wsgiref, etc.
|
|
166
164
|
wsgi_app = app
|
|
167
165
|
|
|
168
|
-
# ASGI
|
|
166
|
+
# ASGI -- pass to uvicorn, hypercorn, etc.
|
|
169
167
|
asgi_app = app.asgi_app
|
|
170
168
|
```
|
|
171
169
|
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
icon: person
|
|
3
|
+
nav:
|
|
4
|
+
badge: NEW|info
|
|
5
|
+
order: 700
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# authentication
|
|
9
|
+
|
|
10
|
+
[!badge New in 2.8.0!]
|
|
11
|
+
|
|
12
|
+
Spiderweb ships with a small built-in authentication system: a `User` model, a `Permission` model, and three helper functions -- `authenticate()`, `login()`, and `logout()`. It's deliberately minimal, but it covers the common case of "let visitors log in and stay logged in."
|
|
13
|
+
|
|
14
|
+
Authentication relies on sessions, so make sure the sessions middleware is enabled:
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
from spiderweb import SpiderwebRouter
|
|
18
|
+
|
|
19
|
+
app = SpiderwebRouter(
|
|
20
|
+
middleware=["spiderweb.middleware.sessions.SessionMiddleware"],
|
|
21
|
+
)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
> Read more [about the sessions middleware here](middleware/sessions.md).
|
|
25
|
+
|
|
26
|
+
## The User model
|
|
27
|
+
|
|
28
|
+
The `User` model lives in `spiderweb.models` and is stored in your app's database (the same one configured via the `db` argument):
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from spiderweb.models import User
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
It has the fields you'd expect: `username` (unique), `email`, `first_name`, `last_name`, `password`, `is_active`, `is_staff`, `is_superuser`, `last_login`, and `date_joined`. Passwords are never stored in plain text -- `set_password()` hashes them with PBKDF2-SHA256, and `check_password()` verifies them:
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
db = app.get_db_session()
|
|
38
|
+
user = User(username="testuser", email="test@example.com")
|
|
39
|
+
user.set_password("password")
|
|
40
|
+
db.add(user)
|
|
41
|
+
db.commit()
|
|
42
|
+
db.close()
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
A few useful helpers on the model:
|
|
46
|
+
|
|
47
|
+
- `user.check_password("password")` -- returns `True`/`False`
|
|
48
|
+
- `user.has_usable_password()` -- `False` if the password was set to unusable
|
|
49
|
+
- `user.is_authenticated` / `user.is_anonymous` -- always `True`/`False` for a real user
|
|
50
|
+
- `user.get_full_name()` / `user.get_short_name()` / `user.get_username()`
|
|
51
|
+
|
|
52
|
+
## Logging users in and out
|
|
53
|
+
|
|
54
|
+
The `spiderweb.authentication` module gives you three functions:
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from spiderweb.authentication import authenticate, login, logout
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- `authenticate(request, username=..., password=...)` -- looks up the user and checks the password. Returns the `User` on success, `None` on failure.
|
|
61
|
+
- `login(request, user)` -- stores the user's id in the session, so they stay logged in on subsequent requests.
|
|
62
|
+
- `logout(request)` -- clears the session and resets `request.user` to an anonymous user.
|
|
63
|
+
|
|
64
|
+
Here's a typical login/logout pair of views:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
from spiderweb.authentication import authenticate, login, logout
|
|
68
|
+
from spiderweb.response import RedirectResponse
|
|
69
|
+
|
|
70
|
+
@app.route("/login", allowed_methods=["POST"])
|
|
71
|
+
def do_login(request):
|
|
72
|
+
user = authenticate(
|
|
73
|
+
request,
|
|
74
|
+
username=request.POST.get("username"),
|
|
75
|
+
password=request.POST.get("password"),
|
|
76
|
+
)
|
|
77
|
+
if user:
|
|
78
|
+
login(request, user)
|
|
79
|
+
return RedirectResponse("/")
|
|
80
|
+
|
|
81
|
+
@app.route("/logout", allowed_methods=["POST"])
|
|
82
|
+
def do_logout(request):
|
|
83
|
+
logout(request)
|
|
84
|
+
return RedirectResponse("/")
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
> If your login form posts with CSRF protection enabled, either include the CSRF token in the form or mark the view `csrf_exempt`. See [the CSRF middleware](middleware/csrf.md).
|
|
88
|
+
|
|
89
|
+
## request.user
|
|
90
|
+
|
|
91
|
+
Once the sessions middleware is active, every request gets a `user` attribute. If the visitor is logged in, it's their `User` object; otherwise it's an `AnonymousUser` with `is_authenticated == False`. Checking whether someone is logged in is therefore just:
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
@app.route("/")
|
|
95
|
+
def index(request):
|
|
96
|
+
if request.user.is_authenticated:
|
|
97
|
+
return HttpResponse(f"Hello, {request.user.username}!")
|
|
98
|
+
return HttpResponse("Hello, stranger!")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`AnonymousUser` mirrors the same interface (`username`, `is_staff`, `is_superuser`, etc.), so you usually don't need to branch on the type -- just check `is_authenticated`.
|
|
102
|
+
|
|
103
|
+
## Permissions
|
|
104
|
+
|
|
105
|
+
[!badge New in 2.6.0!]
|
|
106
|
+
|
|
107
|
+
Users have a many-to-many relationship with the `Permission` model, available as `user.permissions`:
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from spiderweb.models import Permission
|
|
111
|
+
|
|
112
|
+
db = app.get_db_session()
|
|
113
|
+
perm = Permission(name="Can publish posts", codename="publish_post")
|
|
114
|
+
db.add(perm)
|
|
115
|
+
db.commit()
|
|
116
|
+
|
|
117
|
+
user.permissions.append(perm)
|
|
118
|
+
db.commit()
|
|
119
|
+
db.close()
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Each `Permission` has a human-readable `name` and a unique `codename` you can check against in your views:
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
@app.route("/publish", allowed_methods=["POST"])
|
|
126
|
+
def publish(request):
|
|
127
|
+
if not request.user.is_authenticated:
|
|
128
|
+
return RedirectResponse("/login")
|
|
129
|
+
if not any(p.codename == "publish_post" for p in request.user.permissions):
|
|
130
|
+
return HttpResponse("Forbidden", status_code=403)
|
|
131
|
+
...
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Full example
|
|
135
|
+
|
|
136
|
+
There's a complete, runnable version of all of this in the repo at `example_auth.py` -- spin it up with `python example_auth.py` and log in with `testuser` / `password`.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
icon: terminal
|
|
3
|
+
order: 860
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# logging
|
|
7
|
+
|
|
8
|
+
Spiderweb uses the standard library's `logging` module. Every `SpiderwebRouter` has a `log` attribute you can use for your own messages, and the framework logs its own events (startup checks, server start/stop, unhandled exceptions) through it.
|
|
9
|
+
|
|
10
|
+
```python
|
|
11
|
+
from spiderweb import SpiderwebRouter
|
|
12
|
+
|
|
13
|
+
app = SpiderwebRouter()
|
|
14
|
+
app.log.info("custom message from my app")
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## frameworks, logging, and you
|
|
18
|
+
|
|
19
|
+
As a library, Spiderweb does **not** call `logging.basicConfig()` -- it never modifies the root logger or installs handlers on it. The framework logger (`spiderweb.main`) carries its own stream handler at `INFO` level, so you still see messages like `Run startup checks...` out of the box, but your application's logging configuration is entirely yours to own.
|
|
20
|
+
|
|
21
|
+
If you configure logging in your own app, Spiderweb's messages will also propagate to your root handlers as usual:
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import logging
|
|
25
|
+
|
|
26
|
+
logging.basicConfig(level=logging.DEBUG, format="%(levelname)s %(name)s: %(message)s")
|
|
27
|
+
|
|
28
|
+
from spiderweb import SpiderwebRouter
|
|
29
|
+
|
|
30
|
+
app = SpiderwebRouter()
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## using your own logger
|
|
34
|
+
|
|
35
|
+
Pass any `logging.Logger` to the router with the `log` parameter. This replaces the default framework logger for all of the app's messages:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
import logging
|
|
39
|
+
|
|
40
|
+
from spiderweb import SpiderwebRouter
|
|
41
|
+
|
|
42
|
+
my_logger = logging.getLogger("myapp")
|
|
43
|
+
my_logger.setLevel(logging.DEBUG)
|
|
44
|
+
handler = logging.FileHandler("myapp.log")
|
|
45
|
+
my_logger.addHandler(handler)
|
|
46
|
+
|
|
47
|
+
app = SpiderwebRouter(log=my_logger)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## what gets logged
|
|
51
|
+
|
|
52
|
+
| Level | Examples |
|
|
53
|
+
|-------|----------|
|
|
54
|
+
| `INFO` | startup checks, server start/stop on the dev server |
|
|
55
|
+
| `WARNING` | static/media dirs set while `debug=False` |
|
|
56
|
+
| `ERROR` | unhandled view exceptions (with traceback), aborted connections |
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
icon: command-palette
|
|
3
|
-
nav:
|
|
4
|
-
badge: NEW|info
|
|
5
3
|
order: 850
|
|
6
4
|
---
|
|
7
5
|
|
|
@@ -9,7 +7,7 @@ order: 850
|
|
|
9
7
|
|
|
10
8
|
[!badge New in 2.4.0!]
|
|
11
9
|
|
|
12
|
-
Spiderweb ships with a built-in management CLI
|
|
10
|
+
Spiderweb ships with a built-in management CLI -- a single command you can use to start the dev server, explore your routes, open an interactive shell, and run startup checks. If you've ever used Django's `manage.py`, this will feel familiar.
|
|
13
11
|
|
|
14
12
|
After installing the package, the `web` command is available in your environment:
|
|
15
13
|
|
|
@@ -111,7 +109,7 @@ app = "myapp:app"
|
|
|
111
109
|
asgi = true
|
|
112
110
|
```
|
|
113
111
|
|
|
114
|
-
You can still override it on the command line in either direction
|
|
112
|
+
You can still override it on the command line in either direction -- `--asgi` forces ASGI, `--wsgi` forces WSGI regardless of what `pyproject.toml` says.
|
|
115
113
|
|
|
116
114
|
> [!WARNING]
|
|
117
115
|
> The dev server is just that: for development. Do not use for production.
|
|
@@ -137,7 +135,7 @@ If [IPython](https://ipython.org/) is installed in your environment, the shell w
|
|
|
137
135
|
|
|
138
136
|
### routes
|
|
139
137
|
|
|
140
|
-
Prints a table of every URL route your app has registered
|
|
138
|
+
Prints a table of every URL route your app has registered -- path, allowed methods, optional name, and the view function.
|
|
141
139
|
|
|
142
140
|
```shell
|
|
143
141
|
$ web routes
|
|
@@ -159,7 +157,7 @@ $ web check
|
|
|
159
157
|
System check passed.
|
|
160
158
|
```
|
|
161
159
|
|
|
162
|
-
If any check fails, a `StartupErrors` exception group is raised
|
|
160
|
+
If any check fails, a `StartupErrors` exception group is raised -- you'll see a one-frame traceback listing every failing check. Useful in CI or as a quick sanity check after a config change.
|
|
163
161
|
|
|
164
162
|
### makemigrations
|
|
165
163
|
|
|
@@ -216,7 +214,7 @@ web migrate zero # roll back every migration (equivalent to `base`)
|
|
|
216
214
|
| Flag | Description |
|
|
217
215
|
|---|---|
|
|
218
216
|
| `REVISION` | Target revision (default: `head`). |
|
|
219
|
-
| `--fake` | Stamp the database at the target revision without executing any SQL
|
|
217
|
+
| `--fake` | Stamp the database at the target revision without executing any SQL -- useful for marking existing schemas as migrated. |
|
|
220
218
|
|
|
221
219
|
> [!TIP]
|
|
222
220
|
> You can configure where the migrations directory lives by setting `migrations_dir` in `[tool.spiderweb]`:
|
|
@@ -231,9 +229,9 @@ web migrate zero # roll back every migration (equivalent to `base`)
|
|
|
231
229
|
|
|
232
230
|
You can register your own management commands on the router using the `@app.command()` decorator. Every custom command receives three arguments:
|
|
233
231
|
|
|
234
|
-
- `app`
|
|
235
|
-
- `args`
|
|
236
|
-
- `extra`
|
|
232
|
+
- `app` -- the `SpiderwebRouter` instance, so you can access the database, routes, config, etc.
|
|
233
|
+
- `args` -- an `argparse.Namespace` containing only `.app` and `.command` (the values the CLI's own pre-parser resolved). It does **not** contain any flags you pass after the command name.
|
|
234
|
+
- `extra` -- a plain `list[str]` of every token that appeared after the command name on the command line. Parse this yourself if your command accepts flags.
|
|
237
235
|
|
|
238
236
|
A command with no extra flags:
|
|
239
237
|
|
|
@@ -259,7 +257,7 @@ if __name__ == "__main__":
|
|
|
259
257
|
app.start()
|
|
260
258
|
```
|
|
261
259
|
|
|
262
|
-
A command that accepts its own flags
|
|
260
|
+
A command that accepts its own flags -- parse `extra` with argparse:
|
|
263
261
|
|
|
264
262
|
```python
|
|
265
263
|
import argparse
|
|
@@ -271,7 +269,7 @@ def seed_database(app, args, extra):
|
|
|
271
269
|
opts = p.parse_args(extra)
|
|
272
270
|
|
|
273
271
|
if opts.dry_run:
|
|
274
|
-
print("Dry run
|
|
272
|
+
print("Dry run -- no changes written.")
|
|
275
273
|
return
|
|
276
274
|
|
|
277
275
|
with app.get_db_session() as session:
|
|
@@ -296,7 +294,7 @@ web seed
|
|
|
296
294
|
```
|
|
297
295
|
|
|
298
296
|
> [!NOTE]
|
|
299
|
-
> The decorated function is still a regular Python function. Applying `@app.command()` doesn't change it in any way
|
|
297
|
+
> The decorated function is still a regular Python function. Applying `@app.command()` doesn't change it in any way -- you can still call it directly in your own code.
|
|
300
298
|
|
|
301
299
|
You can register as many custom commands as you like. Pick meaningful names; they'll show up in the error message if someone types an unrecognised command, so short and descriptive is best.
|
|
302
300
|
|
|
@@ -85,7 +85,7 @@ def form(request):
|
|
|
85
85
|
</html>
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
With this complete app, it will serve and accept the form. Note towards the bottom of `form.html` the line `{{ csrf_token }}`
|
|
88
|
+
With this complete app, it will serve and accept the form. Note towards the bottom of `form.html` the line `{{ csrf_token }}` -- this is the inserted key. All you need to do is make sure that line is included inside your form and it will be accepted and parsed.
|
|
89
89
|
|
|
90
90
|
## Marking views as CSRF-Exempt
|
|
91
91
|
|
{spiderweb_framework-2.7.0 → spiderweb_framework-2.8.0}/docs/middleware/custom_middleware.md
RENAMED
|
@@ -57,7 +57,7 @@ Unlike `process_request`, returning a value here doesn't change anything. We're
|
|
|
57
57
|
|
|
58
58
|
## on_error(self, request: Request, triggered_exception: Exception) -> Optional[HttpResponse]:
|
|
59
59
|
|
|
60
|
-
This is a helper function that is available for you to override; it's not often used by middleware, but there are some ([like the pydantic middleware](
|
|
60
|
+
This is a helper function that is available for you to override; it's not often used by middleware, but there are some ([like the pydantic middleware](pydantic.md)) that call `on_error` when there is a validation failure.
|
|
61
61
|
|
|
62
62
|
## post_process(self, request: Request, response: HttpResponse, rendered_response: str) -> str | bytes:
|
|
63
63
|
|
|
@@ -61,4 +61,4 @@ The Pydantic middleware will automatically detect that the model that you want t
|
|
|
61
61
|
|
|
62
62
|
If the validation fails, the middleware will call `on_error`, which by default will return a 400 with a list of the broken fields. You may not want this behavior, so the easiest way to address it is to subclass PydanticMiddleware with your own version and override `on_error` to do whatever you'd like.
|
|
63
63
|
|
|
64
|
-
If validation succeeds, the data from the validator will appear on the request object under `request.validated_data`
|
|
64
|
+
If validation succeeds, the data from the validator will appear on the request object under `request.validated_data` -- to access it, just call `.dict()` on the validated data.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
icon: shield
|
|
3
|
+
nav:
|
|
4
|
+
badge: NEW|info
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# security headers middleware
|
|
8
|
+
|
|
9
|
+
[!badge New in 2.8.0!]
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from spiderweb import SpiderwebRouter
|
|
13
|
+
|
|
14
|
+
app = SpiderwebRouter(
|
|
15
|
+
middleware=["spiderweb.middleware.security_headers.SecurityHeadersMiddleware"],
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Most production apps should send a baseline set of security headers on every response. `SecurityHeadersMiddleware` does that for you: it sets each configured header on the response in `process_response`, without overriding any header your view already set. It has no ordering requirements and works the same in WSGI and ASGI mode.
|
|
20
|
+
|
|
21
|
+
The headers sent by default:
|
|
22
|
+
|
|
23
|
+
| Header | Default value |
|
|
24
|
+
|--------|---------------|
|
|
25
|
+
| `X-Content-Type-Options` | `nosniff` (always sent) |
|
|
26
|
+
| `X-Frame-Options` | `DENY` |
|
|
27
|
+
| `Referrer-Policy` | `strict-origin-when-cross-origin` |
|
|
28
|
+
|
|
29
|
+
`Content-Security-Policy` and `Strict-Transport-Security` are not sent unless you configure them, since there is no safe universal default for either.
|
|
30
|
+
|
|
31
|
+
## x_frame_options
|
|
32
|
+
|
|
33
|
+
Defaults to `"DENY"`. Valid values are `"DENY"` and `"SAMEORIGIN"`; pass `None` to disable the header. An invalid value raises a `ConfigError` at startup.
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
app = SpiderwebRouter(
|
|
37
|
+
middleware=["spiderweb.middleware.security_headers.SecurityHeadersMiddleware"],
|
|
38
|
+
x_frame_options="SAMEORIGIN",
|
|
39
|
+
)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## referrer_policy
|
|
43
|
+
|
|
44
|
+
Defaults to `"strict-origin-when-cross-origin"`. Valid values are `no-referrer`, `no-referrer-when-downgrade`, `origin`, `origin-when-cross-origin`, `same-origin`, `strict-origin`, `strict-origin-when-cross-origin`, and `unsafe-url`; pass `None` to disable the header. An invalid value raises a `ConfigError` at startup.
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
app = SpiderwebRouter(
|
|
48
|
+
middleware=["spiderweb.middleware.security_headers.SecurityHeadersMiddleware"],
|
|
49
|
+
referrer_policy="no-referrer",
|
|
50
|
+
)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## content_security_policy
|
|
54
|
+
|
|
55
|
+
Defaults to `None` (header not sent). Set it to your CSP string:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
app = SpiderwebRouter(
|
|
59
|
+
middleware=["spiderweb.middleware.security_headers.SecurityHeadersMiddleware"],
|
|
60
|
+
content_security_policy="default-src 'self'; img-src 'self' https:",
|
|
61
|
+
)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## strict_transport_security
|
|
65
|
+
|
|
66
|
+
Defaults to `None` (header not sent). Only enable this when serving over HTTPS -- the built-in dev server is plain HTTP, so sending HSTS there is not useful:
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
app = SpiderwebRouter(
|
|
70
|
+
middleware=["spiderweb.middleware.security_headers.SecurityHeadersMiddleware"],
|
|
71
|
+
strict_transport_security="max-age=31536000; includeSubDomains",
|
|
72
|
+
)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
> [!NOTE]
|
|
76
|
+
> Headers set directly by a view always win over the middleware defaults. For example, a view returning `HttpResponse(..., headers={"X-Frame-Options": "SAMEORIGIN"})` keeps its own value.
|
|
@@ -94,3 +94,16 @@ Once you finish setting up your app, it's time to start it! You can start the de
|
|
|
94
94
|
> The dev server is just that: for development. Do not use for production.
|
|
95
95
|
|
|
96
96
|
Now that your app is done, you can also run it with Gunicorn by running `gunicorn --workers=2 {yourfile}:app` in your terminal. This will start a Gunicorn server on `localhost:8000` that you can access in your browser and is a bit more robust than the dev server.
|
|
97
|
+
|
|
98
|
+
## debug mode
|
|
99
|
+
|
|
100
|
+
Pass `debug=True` when creating your app to get more information when something goes wrong:
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
app = SpiderwebRouter(debug=True)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
With debug mode on, any exception raised while handling a request returns a plain HTML page showing the exception type, message, and full traceback, instead of a bare error body. This includes Spiderweb's own HTTP exceptions (like `ServerError` or `NotFound` raised from a view) -- the page keeps the exception's status code (a raised `NotFound` shows as 404, not 500). Requests that match no route at all still use your error routes, so a plain 404 page is unaffected. This works in both WSGI and ASGI mode.
|
|
107
|
+
|
|
108
|
+
> [!WARNING]
|
|
109
|
+
> The traceback page exposes your code and local paths. Never enable `debug=True` in production; the default is `False`, and with it off, unhandled exceptions return the normal 500 error response with no details.
|
|
@@ -25,7 +25,7 @@ if __name__ == "__main__":
|
|
|
25
25
|
app.start()
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
The `@app.route()` decorator takes two arguments
|
|
28
|
+
The `@app.route()` decorator takes two arguments -- one required, one optional. The first is the path that your view will be found under; all paths start from the server root (`"/"`). The second is `allowed_methods`, which allows you to limit (or expand) the HTTP methods used for calling your view. For example, you may want to specify that a form view takes in `GET` and `POST` requests:
|
|
29
29
|
|
|
30
30
|
```python
|
|
31
31
|
@app.route("/myform", allowed_methods=["GET", "POST"])
|
|
@@ -217,7 +217,7 @@ This works exactly like `app.reverse()` and will insert the correct path for the
|
|
|
217
217
|
|
|
218
218
|
[!badge New in 2.4.0!]
|
|
219
219
|
|
|
220
|
-
As your application grows, keeping all of its routes in one file becomes unwieldy. Route groups let you define a set of related routes together
|
|
220
|
+
As your application grows, keeping all of its routes in one file becomes unwieldy. Route groups let you define a set of related routes together -- with a shared URL prefix -- and then mount them onto your app in one shot.
|
|
221
221
|
|
|
222
222
|
```python
|
|
223
223
|
from spiderweb import SpiderwebRouter, RouteGroup
|
|
@@ -240,7 +240,7 @@ if __name__ == "__main__":
|
|
|
240
240
|
app.start()
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
-
The two routes above are registered as `/api/users` and `/api/users/<int:id>`. Everything else works exactly as it would if you had written `@app.route("/api/users")` yourself
|
|
243
|
+
The two routes above are registered as `/api/users` and `/api/users/<int:id>`. Everything else works exactly as it would if you had written `@app.route("/api/users")` yourself -- URL parameter conversion, `allowed_methods`, all of it.
|
|
244
244
|
|
|
245
245
|
You can also use `add_route()` on a group directly, without the decorator:
|
|
246
246
|
|
|
@@ -282,12 +282,12 @@ Without a namespace, route names pass through unchanged, so existing apps that d
|
|
|
282
282
|
|
|
283
283
|
[!badge New in 2.4.0!]
|
|
284
284
|
|
|
285
|
-
The built-in converters (`str`, `int`, `float`, `path`) cover the common cases, but sometimes you need a custom pattern
|
|
285
|
+
The built-in converters (`str`, `int`, `float`, `path`) cover the common cases, but sometimes you need a custom pattern -- a UUID, a slug, a date string, and so on. You can teach Spiderweb new converters with `register_converter()`.
|
|
286
286
|
|
|
287
287
|
A converter is any class with two things:
|
|
288
288
|
|
|
289
|
-
- a `regex` class attribute
|
|
290
|
-
- a `to_python()` method
|
|
289
|
+
- a `regex` class attribute -- the pattern that must match the URL segment
|
|
290
|
+
- a `to_python()` method -- converts the matched string to whatever Python type you want
|
|
291
291
|
|
|
292
292
|
```python
|
|
293
293
|
from spiderweb import SpiderwebRouter
|
|
@@ -308,7 +308,7 @@ def get_post(request, post_slug):
|
|
|
308
308
|
return HttpResponse(f"post: {post_slug}")
|
|
309
309
|
```
|
|
310
310
|
|
|
311
|
-
The `name` attribute controls what you write in the route path
|
|
311
|
+
The `name` attribute controls what you write in the route path -- `<slug:...>` in this case. If you leave `name` off the class, Spiderweb derives it automatically by lower-casing the class name and stripping a trailing `"converter"` (so `SlugConverter` becomes `"slug"` either way).
|
|
312
312
|
|
|
313
313
|
### A more complete example
|
|
314
314
|
|
|
@@ -332,7 +332,7 @@ def get_record(request, record_id):
|
|
|
332
332
|
return HttpResponse(str(record_id))
|
|
333
333
|
```
|
|
334
334
|
|
|
335
|
-
Custom converters work inside route groups too
|
|
335
|
+
Custom converters work inside route groups too -- just register them on the app before calling `include_routegroup()`:
|
|
336
336
|
|
|
337
337
|
```python
|
|
338
338
|
app.register_converter(SlugConverter)
|