Session (flup-compatible), caching, memoizing, and HTTP cache control middleware for WSGI. Supports memory, filesystem, database, and memcached based backends.
Simple memoization example:
from wsgistate.memory import memoize
@memoize()
def app(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
return ['Hello World!']
if __name__ == '__main__':
from wsgiref.simple_server import make_server
http = make_server('', 8080, app)
http.serve_forever()
Simple session example:
from wsgistate.memory import session
@session()
def app(environ, start_response):
session = environ['com.saddi.service.session'].session
count = session.get('count', 0) + 1
session['count'] = count
start_response('200 OK', [('Content-Type', 'text/plain')])
return ['You have been here %d times!' % count]
if __name__ == '__main__':
from wsgiref.simple_server import make_server
http = make_server('', 8080, app)
http.serve_forever()
Metadata
Release files for wsgistate 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | |
|---|---|---|---|
| wsgistate-0.4.2.zip | 29.6 kB | Details | |
| wsgistate-0.4.2.tar.gz | 15.8 kB | Details | |
| wsgistate-0.4.2.tar.bz2 | 14.4 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wsgistate-0.4.2.win32.exe | Details | |||
| wsgistate-0.4.2-py2.5.egg | Legacy Egg format | - | - | Details |
| wsgistate-0.4.2-py2.4.egg | Legacy Egg format | - | - | Details |
Total release size: 255.0 kB
Release files / wsgistate-0.4.2.zip
| Download URL | wsgistate-0.4.2.zip |
|---|---|
| Size | 29.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04f4e2c08d7bd5a20100b94d84a4dbe989190da787caf487e46f296bec0771c5
|
|
BLAKE2b-256 checksum How to use checksums |
97cc67867aeda868449b7176252006b0ffa3db409a3333a663027e0c1213715c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wsgistate-0.4.2.tar.gz
| Download URL | wsgistate-0.4.2.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d27f829d9fa66b3309aee801248022cf964380e2f84b25be1f6df73203c9b95d
|
|
BLAKE2b-256 checksum How to use checksums |
4c2b048466c7ee8f0acc904348d9f289253b9a09f4d7d5d27185e4a0d131ebb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wsgistate-0.4.2.tar.bz2
| Download URL | wsgistate-0.4.2.tar.bz2 |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1ac7af6be68c561398c7ed7adb05ce6a0a8fa9f4976bc3badbe051dd0b80342
|
|
BLAKE2b-256 checksum How to use checksums |
9684ebe68bdc797db9ea60ab13d48510c171517812b201b282afa4961cea996d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wsgistate-0.4.2.win32.exe
| Download URL | wsgistate-0.4.2.win32.exe |
|---|---|
| Size | 88.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de01404dfb92790dfebcd361551dfac7e349f719c25edfbfa3dc53d905968734
|
|
BLAKE2b-256 checksum How to use checksums |
44cef2e41b3634f4712ce980a564a37d4b6a97b4a6db76d32744d3b1016edf0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wsgistate-0.4.2-py2.5.egg
| Download URL | wsgistate-0.4.2-py2.5.egg |
|---|---|
| Size | 52.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
d0f96787f80bcb51e5e685583f7aa33d1eb3aaf9ad49794899d1f26a59d5d7e9
|
|
BLAKE2b-256 checksum How to use checksums |
06b2128bd3ae76f5d8bfacc492098f0429f586f4e71a93e2b63f0f9a4a2f972a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wsgistate-0.4.2-py2.4.egg
| Download URL | wsgistate-0.4.2-py2.4.egg |
|---|---|
| Size | 53.8 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
23be88efd0f36e19ff569070930da9fb484304233487f1a9d750aa044a46e1cb
|
|
BLAKE2b-256 checksum How to use checksums |
19b6ac8c1c9efd99f5c0205ea42db36908cb72522ca5008f481ee5993e444c47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |