spiderweb-framework 2.6.0__tar.gz → 2.7.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.
Files changed (139) hide show
  1. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.github/workflows/retype.yml +4 -1
  2. spiderweb_framework-2.7.0/.github/workflows/update_badges.yml +160 -0
  3. spiderweb_framework-2.7.0/Makefile +24 -0
  4. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/PKG-INFO +27 -10
  5. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/README.md +26 -9
  6. spiderweb_framework-2.7.0/badges/build.svg +1 -0
  7. spiderweb_framework-2.7.0/badges/coverage.svg +1 -0
  8. spiderweb_framework-2.7.0/badges/forks.svg +1 -0
  9. spiderweb_framework-2.7.0/badges/pypi-downloads-monthly.svg +1 -0
  10. spiderweb_framework-2.7.0/badges/pypi-version.svg +1 -0
  11. spiderweb_framework-2.7.0/badges/repo-size.svg +1 -0
  12. spiderweb_framework-2.7.0/badges/stars.svg +1 -0
  13. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/README.md +5 -0
  14. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/asgi.md +7 -0
  15. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/db.md +8 -33
  16. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/file_uploads.md +12 -7
  17. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/management.md +26 -3
  18. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/middleware/cors.md +4 -0
  19. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/middleware/csrf.md +4 -0
  20. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/middleware/custom_middleware.md +4 -0
  21. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/middleware/gzip.md +4 -0
  22. spiderweb_framework-2.7.0/docs/middleware/index.yml +1 -0
  23. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/middleware/pydantic.md +4 -0
  24. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/middleware/sessions.md +4 -0
  25. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/quickstart.md +9 -11
  26. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/responses.md +5 -0
  27. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/routes.md +15 -0
  28. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/static_files.md +4 -0
  29. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/example_class_based_view.py +1 -1
  30. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/pyproject.toml +1 -1
  31. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/retype.yml +8 -0
  32. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/cli.py +70 -4
  33. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/jinja_extensions.py +13 -0
  34. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/main.py +1 -0
  35. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_cli.py +66 -0
  36. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_jinja_extras.py +24 -0
  37. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/tools/update_version.py +3 -0
  38. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/uv.lock +1 -1
  39. spiderweb_framework-2.6.0/Makefile +0 -31
  40. spiderweb_framework-2.6.0/docs/example.md +0 -19
  41. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.github/workflows/publish.yml +0 -0
  42. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.github/workflows/tests.yml +0 -0
  43. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.gitignore +0 -0
  44. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.idea/.gitignore +0 -0
  45. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.idea/inspectionProfiles/Project_Default.xml +0 -0
  46. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  47. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.idea/misc.xml +0 -0
  48. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.idea/modules.xml +0 -0
  49. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.idea/spiderweb.iml +0 -0
  50. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.idea/vcs.xml +0 -0
  51. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/.junie/guidelines.md +0 -0
  52. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/LICENSE.txt +0 -0
  53. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/conftest.py +0 -0
  54. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/.nojekyll +0 -0
  55. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_coverpage.md +0 -0
  56. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_media/DMSans-Bold.ttf +0 -0
  57. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_media/DMSans-Medium.ttf +0 -0
  58. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_media/Favicon-32x32.png +0 -0
  59. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_media/favicon.png +0 -0
  60. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_media/spiderweb_logo.png +0 -0
  61. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_media/spiderweb_logo_cleaned.png +0 -0
  62. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_media/spiderweb_logo_cropped.png +0 -0
  63. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/_sidebar.md +0 -0
  64. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/docs/index.html +0 -0
  65. /spiderweb_framework-2.6.0/docs/middleware/overview.md → /spiderweb_framework-2.7.0/docs/middleware/index.md +0 -0
  66. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/example.py +0 -0
  67. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/example2.py +0 -0
  68. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/example_async.py +0 -0
  69. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/example_async_middleware.py +0 -0
  70. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/example_auth.py +0 -0
  71. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/example_middleware.py +0 -0
  72. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/example_profile.py +0 -0
  73. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/__init__.py +0 -0
  74. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/asgi.py +0 -0
  75. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/authentication.py +0 -0
  76. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/constants.py +0 -0
  77. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/converters.py +0 -0
  78. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/db.py +0 -0
  79. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/decorators.py +0 -0
  80. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/default_views.py +0 -0
  81. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/example_validator.py +0 -0
  82. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/exceptions.py +0 -0
  83. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/files.py +0 -0
  84. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/jinja_core.py +0 -0
  85. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/local_server.py +0 -0
  86. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/middleware/__init__.py +0 -0
  87. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/middleware/base.py +0 -0
  88. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/middleware/cors.py +0 -0
  89. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/middleware/csrf.py +0 -0
  90. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/middleware/gzip.py +0 -0
  91. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/middleware/pydantic.py +0 -0
  92. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/middleware/sessions.py +0 -0
  93. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/models/__init__.py +0 -0
  94. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/models/permission.py +0 -0
  95. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/models/user.py +0 -0
  96. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/request.py +0 -0
  97. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/response.py +0 -0
  98. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/routegroup.py +0 -0
  99. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/routes.py +0 -0
  100. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/secrets.py +0 -0
  101. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/server_checks.py +0 -0
  102. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/__init__.py +0 -0
  103. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/helpers.py +0 -0
  104. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/middleware.py +0 -0
  105. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/staticfiles/.gitkeep +0 -0
  106. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/staticfiles/file_for_testing_fileresponse.txt +0 -0
  107. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/staticfiles/style.css +0 -0
  108. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test.html +0 -0
  109. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_asgi.py +0 -0
  110. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_asgi_extra.py +0 -0
  111. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_authentication.py +0 -0
  112. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_cookies.py +0 -0
  113. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_coverage_extras.py +0 -0
  114. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_db.py +0 -0
  115. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_exceptions.py +0 -0
  116. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_files.py +0 -0
  117. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_local_server.py +0 -0
  118. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_local_server_extra.py +0 -0
  119. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_main_extra.py +0 -0
  120. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_middleware.py +0 -0
  121. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_middleware_init.py +0 -0
  122. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_pydantic_middleware.py +0 -0
  123. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_responses.py +0 -0
  124. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_routegroups.py +0 -0
  125. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_routes.py +0 -0
  126. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_secrets.py +0 -0
  127. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_server.py +0 -0
  128. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_server_checks.py +0 -0
  129. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_session_persistence.py +0 -0
  130. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_user.py +0 -0
  131. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_utils.py +0 -0
  132. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/test_variable_urls.py +0 -0
  133. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/tests/views_for_tests.py +0 -0
  134. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/spiderweb/utils.py +0 -0
  135. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/static_files/aaaaaa.gif +0 -0
  136. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/templates/base.html +0 -0
  137. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/templates/file_upload.html +0 -0
  138. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/templates/form.html +0 -0
  139. {spiderweb_framework-2.6.0 → spiderweb_framework-2.7.0}/templates/test.html +0 -0
@@ -17,10 +17,13 @@ jobs:
17
17
  steps:
18
18
  - uses: actions/checkout@v6
19
19
 
20
+ - name: Generate llms.txt
21
+ uses: zakaria-chahboun/retype_llms@v3.0.1
22
+
20
23
  - uses: retypeapp/action-build@latest
21
24
  with:
22
25
  key: ${{ secrets.RETYPE_PASSWORD }}
23
26
 
24
27
  - uses: retypeapp/action-github-pages@latest
25
28
  with:
26
- update-branch: true
29
+ update-branch: true
@@ -0,0 +1,160 @@
1
+ # Ripped wholesale from the nanocoder folks.
2
+
3
+ name: Update Status Badges
4
+ on:
5
+ workflow_dispatch:
6
+ schedule:
7
+ - cron: '0 0 * * *' # Once a day at midnight UTC
8
+ release:
9
+ types: [published]
10
+
11
+ permissions:
12
+ contents: write
13
+
14
+ jobs:
15
+ generate-badges:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v6
20
+
21
+ - name: Setup uv
22
+ uses: astral-sh/setup-uv@v8.0.0
23
+ with:
24
+ version: "latest"
25
+ enable-cache: true
26
+
27
+ - name: Setup Python
28
+ uses: actions/setup-python@v6.2.0
29
+ with:
30
+ python-version-file: "pyproject.toml"
31
+
32
+ - name: Install dependencies
33
+ run: uv sync
34
+
35
+ - name: Run tests for latest coverage
36
+ run: uv run coverage run -m pytest && uv run coverage json || echo "Coverage test failed or not available"
37
+
38
+ - name: Extract coverage (if available)
39
+ id: coverage
40
+ run: |
41
+ if [ -f "coverage.json" ]; then
42
+ COVERAGE=$(cat coverage.json | jq -r '.totals.percent_covered_display // "N/A"')
43
+ echo "percentage=${COVERAGE}" >> $GITHUB_OUTPUT
44
+ else
45
+ echo "percentage=N/A" >> $GITHUB_OUTPUT
46
+ fi
47
+
48
+ - name: Run build to check status
49
+ id: build
50
+ run: |
51
+ if uv build; then
52
+ echo "status=passing" >> $GITHUB_OUTPUT
53
+ echo "color=brightgreen" >> $GITHUB_OUTPUT
54
+ else
55
+ echo "status=failing" >> $GITHUB_OUTPUT
56
+ echo "color=red" >> $GITHUB_OUTPUT
57
+ fi
58
+
59
+ - name: Generate badges
60
+ run: |
61
+ # Create badges directory if it doesn't exist
62
+ mkdir -p badges
63
+
64
+ # Coverage badge (with fallback if coverage not available) - with for-the-badge style
65
+ if [ "${{ steps.coverage.outputs.percentage }}" != "N/A" ]; then
66
+ COVERAGE_PERCENTAGE="${{ steps.coverage.outputs.percentage }}"
67
+ COVERAGE_COLOR=$(echo "${COVERAGE_PERCENTAGE}" | awk '{print ($1 >= 80) ? "brightgreen" : ($1 >= 50) ? "yellow" : "red"}')
68
+ curl -s "https://img.shields.io/badge/coverage-${COVERAGE_PERCENTAGE}%25-${COVERAGE_COLOR}?style=for-the-badge" > badges/coverage.svg
69
+ else
70
+ curl -s "https://img.shields.io/badge/coverage-N%2FA-lightgrey?style=for-the-badge" > badges/coverage.svg
71
+ fi
72
+
73
+ # Build status badge - with for-the-badge style and githubactions logo
74
+ curl -s "https://img.shields.io/badge/build-${{ steps.build.outputs.status }}-${{ steps.build.outputs.color }}?style=for-the-badge&logo=githubactions" > badges/build.svg
75
+
76
+ # PyPI Downloads (monthly) - with for-the-badge style and pypi logo
77
+ curl -s "https://img.shields.io/pypi/dm/spiderweb-framework?style=for-the-badge&logo=pypi" > badges/pypi-downloads-monthly.svg
78
+
79
+ # GitHub Repo Size - with for-the-badge style and github logo
80
+ curl -s "https://img.shields.io/github/repo-size/itsthejoker/spiderweb?style=for-the-badge&logo=github" > badges/repo-size.svg
81
+
82
+ # GitHub Repo Stars - with for-the-badge style and github logo
83
+ curl -s "https://img.shields.io/github/stars/itsthejoker/spiderweb?style=for-the-badge&logo=github" > badges/stars.svg
84
+
85
+ # GitHub Forks - with for-the-badge style and github logo
86
+ curl -s "https://img.shields.io/github/forks/itsthejoker/spiderweb?style=for-the-badge&logo=github" > badges/forks.svg
87
+
88
+ # PyPI version - with for-the-badge style and pypi logo
89
+ curl -s "https://img.shields.io/pypi/v/spiderweb-framework?style=for-the-badge&logo=pypi" > badges/pypi-version.svg
90
+
91
+ # - name: Update README with badges
92
+ # run: |
93
+ # # Update badges in README.md
94
+ # if [ -f "README.md" ]; then
95
+ # # Create a temporary file to avoid direct modification issues
96
+ # cp README.md README.md.tmp
97
+ #
98
+ # # If badges section doesn't exist, add it after the first heading
99
+ # if ! grep -q 'alt="Build status"\|alt="Coverage"' README.md.tmp; then
100
+ # # Add HTML badges after the first heading
101
+ # sed -i '2i \
102
+ # \
103
+ # <p align="center">\
104
+ # <img\
105
+ # src="https://github.com/itsthejoker/spiderweb/raw/main/badges/build.svg"\
106
+ # alt="Build status"\
107
+ # />\
108
+ # <img\
109
+ # src="https://github.com/itsthejoker/spiderweb/raw/main/badges/coverage.svg"\
110
+ # alt="Coverage"\
111
+ # />\
112
+ # <img\
113
+ # src="https://github.com/itsthejoker/spiderweb/raw/main/badges/pypi-version.svg"\
114
+ # alt="Version"\
115
+ # />\
116
+ # <img\
117
+ # src="https://github.com/itsthejoker/spiderweb/raw/main/badges/pypi-downloads-monthly.svg"\
118
+ # alt="Downloads"\
119
+ # />\
120
+ # <img\
121
+ # src="https://github.com/itsthejoker/spiderweb/raw/main/badges/stars.svg"\
122
+ # alt="Stars"\
123
+ # />\
124
+ # <img\
125
+ # src="https://github.com/itsthejoker/spiderweb/raw/main/badges/repo-size.svg"\
126
+ # alt="Repo Size"\
127
+ # />\
128
+ # <img\
129
+ # src="https://github.com/itsthejoker/spiderweb/raw/main/badges/forks.svg"\
130
+ # alt="Forks"\
131
+ # />\
132
+ # <img\
133
+ # src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=for-the-badge"\
134
+ # alt="Gitmoji"\
135
+ # />\
136
+ # <img\
137
+ # src="https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge"\
138
+ # alt="Code style: Black"\
139
+ # />\
140
+ # </p>\
141
+ # \
142
+ # ' README.md.tmp
143
+ # fi
144
+ #
145
+ # # Replace the original file
146
+ # mv README.md.tmp README.md
147
+ # fi
148
+
149
+ - name: Commit and push badges
150
+ run: |
151
+ git config --local user.email "action@github.com"
152
+ git config --local user.name "GitHub Action"
153
+ git add badges/ README.md
154
+ # Only commit if there are staged changes
155
+ if ! git diff --cached --quiet; then
156
+ git commit -m "📈 update status badges" || echo "No changes to commit"
157
+ git push
158
+ else
159
+ echo "No changes to commit"
160
+ fi
@@ -0,0 +1,24 @@
1
+ .PHONY: test pretty bump-patch bump-minor bump-major docs
2
+
3
+ # Run the test suite
4
+ test:
5
+ uv run python -m pytest
6
+
7
+ # Lint and format the codebase
8
+ pretty:
9
+ uv run ruff check --fix .
10
+ uv run black .
11
+
12
+ # Bump versions and keep spiderweb/constants.py in sync with pyproject.toml
13
+ bump-patch:
14
+ uv version --bump patch
15
+
16
+ bump-minor:
17
+ uv version --bump minor
18
+
19
+ bump-major:
20
+ uv version --bump major
21
+
22
+ docs:
23
+ @retype --version >/dev/null 2>&1 || npm i retype-cli -g
24
+ @retype start
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spiderweb-framework
3
- Version: 2.6.0
3
+ Version: 2.7.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
@@ -39,8 +39,32 @@ Description-Content-Type: text/markdown
39
39
 
40
40
  <p align="center">
41
41
  <img
42
- src="https://img.shields.io/pypi/v/spiderweb-framework.svg?style=for-the-badge"
43
- alt="PyPI release version for Spiderweb"
42
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/build.svg"
43
+ alt="Build status"
44
+ />
45
+ <img
46
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/coverage.svg"
47
+ alt="Coverage"
48
+ />
49
+ <img
50
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/pypi-version.svg"
51
+ alt="Version"
52
+ />
53
+ <img
54
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/pypi-downloads-monthly.svg"
55
+ alt="Downloads"
56
+ />
57
+ <img
58
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/stars.svg"
59
+ alt="Stars"
60
+ />
61
+ <img
62
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/repo-size.svg"
63
+ alt="Repo Size"
64
+ />
65
+ <img
66
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/forks.svg"
67
+ alt="Forks"
44
68
  />
45
69
  <img
46
70
  src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=for-the-badge"
@@ -52,13 +76,6 @@ Description-Content-Type: text/markdown
52
76
  />
53
77
  </p>
54
78
 
55
- <p align="center">
56
- <img
57
- src="https://github.com/itsthejoker/spiderweb/actions/workflows/tests.yml/badge.svg?branch=main"
58
- alt="Code style: Black"
59
- />
60
- </p>
61
-
62
79
  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_.
63
80
 
64
81
  So I built one.
@@ -2,8 +2,32 @@
2
2
 
3
3
  <p align="center">
4
4
  <img
5
- src="https://img.shields.io/pypi/v/spiderweb-framework.svg?style=for-the-badge"
6
- alt="PyPI release version for Spiderweb"
5
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/build.svg"
6
+ alt="Build status"
7
+ />
8
+ <img
9
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/coverage.svg"
10
+ alt="Coverage"
11
+ />
12
+ <img
13
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/pypi-version.svg"
14
+ alt="Version"
15
+ />
16
+ <img
17
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/pypi-downloads-monthly.svg"
18
+ alt="Downloads"
19
+ />
20
+ <img
21
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/stars.svg"
22
+ alt="Stars"
23
+ />
24
+ <img
25
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/repo-size.svg"
26
+ alt="Repo Size"
27
+ />
28
+ <img
29
+ src="https://github.com/itsthejoker/spiderweb/raw/main/badges/forks.svg"
30
+ alt="Forks"
7
31
  />
8
32
  <img
9
33
  src="https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=for-the-badge"
@@ -15,13 +39,6 @@
15
39
  />
16
40
  </p>
17
41
 
18
- <p align="center">
19
- <img
20
- src="https://github.com/itsthejoker/spiderweb/actions/workflows/tests.yml/badge.svg?branch=main"
21
- alt="Code style: Black"
22
- />
23
- </p>
24
-
25
42
  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_.
26
43
 
27
44
  So I built one.
@@ -0,0 +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="#4c1"/></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,PHN2ZyBmaWxsPSIjMjA4OEZGIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+R2l0SHViIEFjdGlvbnM8L3RpdGxlPjxwYXRoIGQ9Ik0xMC45ODQgMTMuODM2YS41LjUgMCAwIDEtLjM1My0uMTQ2bC0uNzQ1LS43ND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ale(.1)" x="476.25" y="175" textLength="372.5" fill="#fff">BUILD</text><text transform="scale(.1)" x="1201.25" y="175" textLength="597.5" fill="#fff" font-weight="bold">PASSING</text></g></svg>
@@ -0,0 +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="#4c1"/></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" fill="#fff">COVERAGE</text><text transform="scale(.1)" x="1158.75" y="175" textLength="297.5" fill="#fff" font-weight="bold">94%</text></g></svg>
@@ -0,0 +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,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" fill="#fff">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" fill="#fff" font-weight="bold">2</text></a></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="223.5" height="28" role="img" aria-label="DOWNLOADS: 536/MONTH"><title>DOWNLOADS: 536/MONTH</title><g shape-rendering="crispEdges"><rect width="119.25" height="28" fill="#555"/><rect x="119.25" width="104.25" height="28" fill="#97ca00"/></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+PHBhdGggZD0iTTIzLjkyMiAxMy41OHYzLjkxMkwyMC41NSAxOC43MmwtLjA3OC4wNTUuMDUyLjAzNyAzLjQ1LTEuMjU2LjAyNi0uMDM2di0zLjk5N2wtLjA1My0uMDM2LS4wMjUuMDkyeiBNMjMuNjIxIDUuNjE4bC0zLjA0IDEuMTA3djMuOTEybDMuMzM5LTEuMjE1VjUuNTA5ek0yMy45MiAxMy40NTdWOS41NDRsLTMuMzM2IDEuMjE1djMuOTEzek0yMC40NyAxNC43MVYxMC44TDE3LjE3IDEydjMuOTEzek0xNy4wMzQgMTkuOTk2di0zLjkxMmwtMy4zMTMgMS4yMDZ2My45MTJ6TTE3LjE3IDE2LjA1N3YzLjg2OGwzLjMxNC0xLjIwNlYxNC44NWwtMy4zMTQgMS4yMDZ6bTIuMDkzIDEuODgyYy0uMzY3LjEzNC0uNjYzLS4wNzQtLjY2My0uNDYzcy4yOTYtLjgxNC42NjMtLjk0N2MuMzY1LS4xMzMuNjYyLjA3NS42NjIuNDY0cy0uMjk3LjgxNC0uNjYyLjk0NnogTTEzLjIyNSA5LjMxNWwuMzY1LS4xMzItMy4yODUtMS4xOTctMy4zMjMgMS4yMS4xMDIuMDM3IDMuMTg0IDEuMTZ6TTIwLjUwNyAxMC42NjRWNi43NTFMMTcuMTcgNy45NjV2My45MTN6TTE3LjA1OCAxMS45MThWOC4wMDVsLTMuMzAyIDEuMjAydjMuOTEyek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uMDgzTDYuODU0IDYuNjc3di4wMThsLS4wMjUuMDE4djEuNTIzTDMuNDQgOS40N3YuMDJsLS4wMjUuMDE3djQuMDA3bC0zLjM5IDEuMjMzdi4wMTlMMCAxNC43ODR2My45OTVsLjAyNS4wMzcgMy40IDEuMjM3LjAwOC0uMDA2LjAwNy4wMSAzLjQgMS4yMzguMDA4LS4wMDYuMDA2LjAxIDMuNCAxLjIzNy4wMTQtLjAwOS4wMTIuMDEgMy40NS0xLjI1Ni4wMjYtLjAzNy0uMDc4LS4wMjd6TTMuNDkzIDkuNTYzbDMuMjU3IDEuMTg1LTMuMjU3IDEuMTg3VjkuNTYyek0zLjQgMTkuOTZMLjA3OCAxOC43NTJ2LTMuOTEzbDIuMzYxLjg2Ljk2LjM0OXYzLjkxM3ptLjAxNS0zLjk5TC4zMzUgMTQuODVsLS4xODItLjA2NiAzLjI2Mi0xLjE4N3YyLjM3NHptMy4zOTkgNS4yMzFsLTMuMzIxLTEuMjA5di0zLjkxMmwzLjMyMSAxLjIwOXYzLjkxMnpNMjMuNzkxIDUuNDM0bC0zLjIxLTEuMTd2Mi4zMzh6TTIwLjM4NyAyLjY0M2wtMy4yNC0xLjE4LTMuMjcgMS4xOSAzLjI0NyAxLjE4MnoiLz48L3N2Zz4="/><text transform="scale(.1)" x="681.25" y="175" textLength="782.5" fill="#fff">DOWNLOADS</text><text transform="scale(.1)" x="1713.75" y="175" textLength="802.5" fill="#fff" font-weight="bold">536/MONTH</text></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="135.5" height="28" role="img" aria-label="PYPI: V2.6.1"><title>PYPI: V2.6.1</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,PHN2ZyBma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4wMSAzLjQgMS4yMzguMDA4LS4wMDYuMDA2LjAxIDMuNCAxLjIzNy4wMTQtLjAwOS4wMTIuMDEgMy40NS0xLjI1Ni4wMjYtLjAzNy0uMDc4LS4wMjd6TTMuNDkzIDkuNTYzbDMuMjU3IDEuMTg1LTMuMjU3IDEuMTg3VjkuNTYyek0zLjQgMTkuOTZMLjA3OCAxOC43NTJ2LTMuOTEzbDIuMzYxLjg2Ljk2LjM0OXYzLjkxM3ptLjAxNS0zLjk5TC4zMzUgMTQuODVsLS4xODItLjA2NiAzLjI2Mi0xLjE4N3YyLjM3NHptMy4zOTkgNS4yMzFsLTMuMzIxLTEuMjA5di0zLjkxMmwzLjMyMSAxLjIwOXYzLjkxMnpNMjMuNzkxIDUuNDM0bC0zLjIxLTEuMTd2Mi4zMzh6TTIwLjM4NyAyLjY0M2wtMy4yNC0xLjE4LTMuMjcgMS4xOSAzLjI0NyAxLjE4MnoiLz48L3N2Zz4="/><text transform="scale(.1)" x="425" y="175" textLength="270" fill="#fff">PYPI</text><text transform="scale(.1)" x="1017.5" y="175" textLength="435" fill="#fff" font-weight="bold">V2.6.1</text></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="182" height="28" role="img" aria-label="REPO SIZE: 1.7 MIB"><title>REPO SIZE: 1.7 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" fill="#fff">REPO SIZE</text><text transform="scale(.1)" x="1441.25" y="175" textLength="517.5" fill="#fff" font-weight="bold">1.7 MIB</text></g></svg>
@@ -0,0 +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,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" fill="#fff">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" fill="#fff" font-weight="bold">56</text></a></g></svg>
@@ -1,3 +1,8 @@
1
+ ---
2
+ icon: home
3
+ order: 999
4
+ ---
5
+
1
6
  # spiderweb
2
7
 
3
8
  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_.
@@ -1,3 +1,10 @@
1
+ ---
2
+ icon: arrow-switch
3
+ nav:
4
+ badge: NEW|info
5
+ order: 0
6
+ ---
7
+
1
8
  # asgi
2
9
 
3
10
  [!badge New in 2.3.0!]
@@ -1,3 +1,8 @@
1
+ ---
2
+ icon: database
3
+ order: 800
4
+ ---
5
+
1
6
  # databases
2
7
 
3
8
  Spiderweb is intentionally ORM-agnostic. Internally, it now uses Advanced Alchemy (built on SQLAlchemy) to persist first‑party data like sessions. You can choose one of the following approaches for your application data:
@@ -59,40 +64,10 @@ If your application requires a database not supported by SQLAlchemy or you prefe
59
64
 
60
65
  ## Migrations
61
66
 
62
- Advanced Alchemy works seamlessly with Alembic (SQLAlchemy's migration tool). To manage schema changes:
63
-
64
- 1. Install Alembic:
65
-
66
- ```bash
67
- pip install alembic
68
- ```
69
-
70
- 2. Initialize a migration repository:
71
-
72
- ```bash
73
- alembic init migrations
74
- ```
75
-
76
- 3. Configure Alembic to use Spiderweb's metadata. In `migrations/env.py`, set:
77
-
78
- ```python
79
- from spiderweb.db import Base
80
- target_metadata = Base.metadata
81
- ```
82
-
83
- Also set the database URL either in `alembic.ini` (`sqlalchemy.url = ...`) or dynamically in `env.py` (read from environment variables or config).
84
-
85
- 4. Generate migrations from model changes:
86
-
87
- ```bash
88
- alembic revision --autogenerate -m "add my table"
89
- ```
90
-
91
- 5. Apply migrations:
67
+ Migrations are handled using `alembic`, which is already installed for you. Use the management `web` commands to create and apply migrations. See the below commands for more information.
92
68
 
93
- ```bash
94
- alembic upgrade head
95
- ```
69
+ [!ref `makemigrations` management command](/management.md#makemigrations)
70
+ [!ref `migrate` management command](/management.md#migrate)
96
71
 
97
72
  Notes:
98
73
  - If you define your own SQLAlchemy models, make sure they inherit from `spiderweb.db.Base` (or include their metadata in `target_metadata`) so Alembic can discover them.
@@ -1,3 +1,8 @@
1
+ ---
2
+ icon: upload
3
+ order: 300
4
+ ---
5
+
1
6
  # handling file uploads
2
7
 
3
8
  [!badge New in 2.2.0!]
@@ -5,7 +10,7 @@
5
10
  Spiderweb supports handling file uploads via standard HTML forms that use multipart/form-data. Uploaded files are parsed into Request.FILES as a MultiDict of MediaFile objects, which provide convenient helpers like filename, content_type, size, read(), seek(), and save().
6
11
 
7
12
  > [!TIP]
8
- > If you're just getting started, try the working example in example.py together with templates/file_upload.html in this repository.
13
+ > If you're just getting started, try the working example in `example.py` together with `templates/file_upload.html` in this repository.
9
14
 
10
15
  ## Configuration: where to store uploads
11
16
 
@@ -22,7 +27,7 @@ app = SpiderwebRouter(
22
27
  ```
23
28
 
24
29
  - If media_dir does not exist, it is created on startup.
25
- - In debug=True, requests to /{media_url}/<path:filename> are served from the media_dir folder.
30
+ - In debug=True, requests to `/{media_url}/<path:filename>` are served from the media_dir folder.
26
31
 
27
32
  > [!DANGER]
28
33
  > Serving uploaded files directly from your app is for local development only. In production, serve uploads via a reverse proxy (nginx/Apache) or an object store (S3, GCS) and protect access appropriately.
@@ -33,7 +38,7 @@ To send a file from the browser, your form must:
33
38
 
34
39
  - use method="post"
35
40
  - include enctype="multipart/form-data"
36
- - include one or more <input type="file" name="..."> controls
41
+ - include one or more `<input type="file" name="...">` controls
37
42
 
38
43
  ```html
39
44
  <form action="" method="post" enctype="multipart/form-data">
@@ -44,7 +49,7 @@ To send a file from the browser, your form must:
44
49
  ```
45
50
 
46
51
  > [!NOTE]
47
- > The {{ csrf_token }} comes from the CSRF middleware and should be included in POST forms. See Middleware → CSRF for details.
52
+ > The `{{ csrf_token }}` comes from the CSRF middleware and should be included in POST forms. See Middleware → CSRF for details.
48
53
 
49
54
  ## Accessing uploaded files in a view
50
55
 
@@ -104,9 +109,9 @@ And the corresponding HTML:
104
109
 
105
110
  With debug=True and media_dir set, Spiderweb automatically registers a development route so you can access uploaded files at:
106
111
 
107
- - /{media_url}/<filename>
112
+ - `/{media_url}/<filename>`
108
113
 
109
- Example: with media_dir="media" and media_url="media", a saved file named avatar.png will be accessible at /media/avatar.png while debug is true.
114
+ Example: with `media_dir="media"` and `media_url="media"`, a saved file named `avatar.png` will be accessible at `/media/avatar.png` while debug is true.
110
115
 
111
116
  > [!DANGER]
112
117
  > Do not rely on the development file server in production. Put your web server or CDN in front of your app to serve media safely and efficiently.
@@ -116,7 +121,7 @@ Example: with media_dir="media" and media_url="media", a saved file named avatar
116
121
  Uploads are POST requests and are protected by the CSRF middleware. To accept submissions:
117
122
 
118
123
  - Add SessionMiddleware before CSRFMiddleware in your app config.
119
- - Include {{ csrf_token }} in your form markup.
124
+ - Include `{{ csrf_token }}` in your form markup.
120
125
 
121
126
  See [CSRF middleware](middleware/csrf.md) for a complete example.
122
127
 
@@ -1,3 +1,10 @@
1
+ ---
2
+ icon: command-palette
3
+ nav:
4
+ badge: NEW|info
5
+ order: 850
6
+ ---
7
+
1
8
  # management
2
9
 
3
10
  [!badge New in 2.4.0!]
@@ -53,13 +60,29 @@ web serve
53
60
 
54
61
  ### version
55
62
 
56
- Prints the installed version of `spiderweb`. This is the one command that doesn't need an app.
63
+ Prints the installed version of `spiderweb`.
57
64
 
58
65
  ```shell
59
66
  $ web version
60
67
  spiderweb-framework 2.4.0
61
68
  ```
62
69
 
70
+ ### new
71
+
72
+ Scaffolds a new Spiderweb project. It creates a new directory containing a minimal `app.py` and a `pyproject.toml` configured for your app. Like `version`, this command doesn't need an app to run.
73
+
74
+ ```shell
75
+ $ web new my_project
76
+ ```
77
+
78
+ You can also scaffold into the current directory by passing `.`:
79
+
80
+ ```shell
81
+ $ web new .
82
+ ```
83
+
84
+ If the target directory already has a `pyproject.toml`, it will append the `[tool.spiderweb]` section without overwriting your existing config.
85
+
63
86
  ### serve
64
87
 
65
88
  Starts the development server. By default it runs in WSGI mode on whatever address and port your app was configured with (`localhost:8000` unless you changed them).
@@ -98,7 +121,7 @@ You can still override it on the command line in either direction — `--asgi` f
98
121
  Opens an interactive Python interpreter with your app already loaded as `app`. Great for poking around at runtime state, testing a database query, or trying out a piece of logic before committing it.
99
122
 
100
123
  ```shell
101
- $ spiderweb shell
124
+ $ web shell
102
125
  Spiderweb 2.4.0 shell
103
126
  Available names: app
104
127
  Type "exit()" or Ctrl-D to quit.
@@ -117,7 +140,7 @@ If [IPython](https://ipython.org/) is installed in your environment, the shell w
117
140
  Prints a table of every URL route your app has registered — path, allowed methods, optional name, and the view function.
118
141
 
119
142
  ```shell
120
- $ spiderweb routes
143
+ $ web routes
121
144
  path methods name view
122
145
  -----------------------------------------------------------------------
123
146
  / POST, GET, PUT, PATCH, DELETE index
@@ -1,3 +1,7 @@
1
+ ---
2
+ icon: blocked
3
+ ---
4
+
1
5
  # cors middleware
2
6
 
3
7
  ```python
@@ -1,3 +1,7 @@
1
+ ---
2
+ icon: key
3
+ ---
4
+
1
5
  # csrf middleware
2
6
 
3
7
  ```python
@@ -1,3 +1,7 @@
1
+ ---
2
+ icon: file-binary
3
+ ---
4
+
1
5
  # writing your own middleware
2
6
 
3
7
  Sometimes you want to run the same code on every request or every response (or both!). Lots of processing happens in the middleware layer, and if you want to write your own, all you have to do is write a quick class and put it in a place that Spiderweb can find it. A piece of middleware only needs two things to be successful:
@@ -1,3 +1,7 @@
1
+ ---
2
+ icon: file-zip
3
+ ---
4
+
1
5
  # gzip compression middleware
2
6
 
3
7
  [!badge New in 1.4.0!]
@@ -0,0 +1 @@
1
+ order: 100
@@ -1,3 +1,7 @@
1
+ ---
2
+ icon: check
3
+ ---
4
+
1
5
  # pydantic form validation
2
6
 
3
7
  ```python
@@ -1,3 +1,7 @@
1
+ ---
2
+ icon: archive
3
+ ---
4
+
1
5
  # sessions middleware
2
6
 
3
7
  ```python