spiderweb-framework 2.0.0__py2.py3-none-any.whl

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.
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: spiderweb-framework
3
+ Version: 2.0.0
4
+ Summary: A small web framework, just big enough for a spider.
5
+ Project-URL: Homepage, https://github.com/itsthejoker/spiderweb
6
+ Project-URL: Documentation, https://github.com/itsthejoker/spiderweb
7
+ Project-URL: Repository, https://git.joekaufeld.com/jkaufeld/spiderweb
8
+ Project-URL: Bug Tracker, https://github.com/itsthejoker/spiderweb/issues
9
+ Author-email: Joe Kaufeld <opensource@joekaufeld.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE.txt
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Web Environment
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
20
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
21
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
22
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
23
+ Requires-Dist: advanced-alchemy<2.0.0,>=1.6.3
24
+ Provides-Extra: pydantic
25
+ Requires-Dist: pydantic<3,>=2.8.2; extra == 'pydantic'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # spiderweb
29
+
30
+ <p align="center">
31
+ <img
32
+ src="https://img.shields.io/pypi/v/spiderweb-framework.svg?style=for-the-badge"
33
+ alt="PyPI release version for Spiderweb"
34
+ />
35
+ <img
36
+ src="https://img.shields.io/badge/gitmoji-%20๐Ÿ˜œ%20๐Ÿ˜-FFDD67.svg?style=for-the-badge"
37
+ alt="Gitmoji"
38
+ />
39
+ <img
40
+ src="https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge"
41
+ alt="Code style: Black"
42
+ />
43
+ </p>
44
+
45
+ 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_.
46
+
47
+ So I built one.
48
+
49
+ `spiderweb` is a small web framework, just big enough to hold a spider. Getting started is easy:
50
+
51
+ ```shell
52
+ poetry add spiderweb-framework
53
+ ```
54
+
55
+ Create a new file and drop this in it:
56
+
57
+ ```python
58
+ from spiderweb import SpiderwebRouter
59
+ from spiderweb.response import HttpResponse
60
+
61
+ app = SpiderwebRouter()
62
+
63
+ @app.route("/")
64
+ def index(request):
65
+ return HttpResponse("HELLO, WORLD!")
66
+
67
+ if __name__ == "__main__":
68
+ app.start()
69
+ ```
70
+
71
+ ## [View the docs here!](https://itsthejoker.github.io/spiderweb/#/)
72
+
73
+ My goal with this framework was to do three things:
74
+
75
+ 1. Learn a lot
76
+ 2. Create an unholy blend of Django and Flask
77
+ 3. Not look at any existing code. Go off of vibes alone and try to solve all the problems I could think of in my own way
78
+
79
+ And, honestly, I think I got there. Here's a non-exhaustive list of things this can do:
80
+
81
+ - Function-based views
82
+ - Optional Flask-style URL routing
83
+ - Optional Django-style URL routing
84
+ - URLs with variables in them a lรก Django
85
+ - Full middleware implementation
86
+ - Limit routes by HTTP verbs
87
+ - Custom error routes
88
+ - Built-in dev server
89
+ - Gunicorn support
90
+ - HTML templates with Jinja2
91
+ - Static files support
92
+ - Cookies (reading and setting)
93
+ - Optional append_slash (with automatic redirects!)
94
+ - CSRF middleware
95
+ - CORS middleware
96
+ - Optional POST data validation middleware with Pydantic
97
+ - Session middleware with built-in session store
98
+ - Database support (using Peewee, but you can use whatever you want as long as there's a Peewee driver for it)
99
+ - Tests (currently roughly 89% coverage)
@@ -0,0 +1,4 @@
1
+ spiderweb_framework-2.0.0.dist-info/METADATA,sha256=-8iyP7WWstuc647V1Hbzko0rI0TMBNBm6FwQCO76CTI,3447
2
+ spiderweb_framework-2.0.0.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
3
+ spiderweb_framework-2.0.0.dist-info/licenses/LICENSE.txt,sha256=fLMiHRHdcwzPCMYQ1W8L24YY-oRZfnFuTJmocS-bxoo,2386
4
+ spiderweb_framework-2.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py2-none-any
5
+ Tag: py3-none-any
@@ -0,0 +1,48 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Joe Kaufeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ Substantial portions of spiderweb/middleware/cors.py and docs/middleware/cors.md
26
+ are from django-cors-headers and are subject to the following license:
27
+
28
+ MIT License
29
+
30
+ Copyright (c) 2017 Otto Yiu (https://ottoyiu.com) and other contributors.
31
+
32
+ Permission is hereby granted, free of charge, to any person obtaining a copy
33
+ of this software and associated documentation files (the "Software"), to deal
34
+ in the Software without restriction, including without limitation the rights
35
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
+ copies of the Software, and to permit persons to whom the Software is
37
+ furnished to do so, subject to the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be included in all
40
+ copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
+ SOFTWARE.