fastapi-cachex 0.2.1__py3-none-any.whl → 0.2.3__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.
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-cachex
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: A caching library for FastAPI with support for Cache-Control, ETag, and multiple backends.
5
5
  Keywords: fastapi,cache,etag,cache-control,redis,memcached,in-memory
6
- Author: Allen
7
- Author-email: Allen <s96016641@gmail.com>
6
+ Author: allen0099
7
+ Author-email: allen0099 <s96016641@gmail.com>
8
8
  License-Expression: Apache-2.0
9
9
  Classifier: Development Status :: 3 - Alpha
10
10
  Classifier: Intended Audience :: Developers
@@ -20,6 +20,7 @@ Classifier: Framework :: FastAPI
20
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
21
  Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
22
22
  Requires-Dist: fastapi
23
+ Requires-Dist: pydantic
23
24
  Requires-Dist: pymemcache ; extra == 'memcache'
24
25
  Requires-Dist: redis[hiredis] ; extra == 'redis'
25
26
  Requires-Dist: orjson ; extra == 'redis'
@@ -47,10 +48,11 @@ Description-Content-Type: text/markdown
47
48
 
48
49
  [English](README.md) | [繁體中文](docs/README.zh-TW.md)
49
50
 
50
- A high-performance caching extension for FastAPI, providing comprehensive HTTP caching support.
51
+ A high-performance caching extension for FastAPI, providing comprehensive HTTP caching support and optional session management.
51
52
 
52
53
  ## Features
53
54
 
55
+ ### HTTP Caching
54
56
  - Support for HTTP caching headers
55
57
  - `Cache-Control`
56
58
  - `ETag`
@@ -62,6 +64,15 @@ A high-performance caching extension for FastAPI, providing comprehensive HTTP c
62
64
  - Complete Cache-Control directive implementation
63
65
  - Easy-to-use `@cache` decorator
64
66
 
67
+ ### Session Management (Optional Extension)
68
+ - Secure session management with HMAC-SHA256 token signing
69
+ - IP address and User-Agent binding (optional security features)
70
+ - Header and bearer token support (API-first architecture)
71
+ - Automatic session renewal (sliding expiration)
72
+ - Flash messages for cross-request communication
73
+ - Multiple backend support (Redis, Memcached, In-Memory)
74
+ - Complete session lifecycle management (create, validate, refresh, invalidate)
75
+
65
76
  ### Cache-Control Directives
66
77
 
67
78
  | Directive | Supported | Description |
@@ -86,6 +97,12 @@ A high-performance caching extension for FastAPI, providing comprehensive HTTP c
86
97
  uv add fastapi-cachex
87
98
  ```
88
99
 
100
+ ### Development Installation
101
+
102
+ ```bash
103
+ uv add git+https://github.com/allen0099/FastAPI-CacheX.git
104
+ ```
105
+
89
106
  ## Quick Start
90
107
 
91
108
  ```python
@@ -129,7 +146,7 @@ FastAPI-CacheX supports multiple caching backends. You can easily switch between
129
146
  Cache keys are generated in the following format to avoid collisions:
130
147
 
131
148
  ```
132
- {method}:{host}:{path}:{query_params}
149
+ {method}|||{host}|||{path}|||{query_params}
133
150
  ```
134
151
 
135
152
  This ensures that:
@@ -236,6 +253,7 @@ async def expensive_operation():
236
253
  - [Cache Flow Explanation](docs/CACHE_FLOW.md)
237
254
  - [Development Guide](docs/DEVELOPMENT.md)
238
255
  - [Contributing Guidelines](docs/CONTRIBUTING.md)
256
+ - [Session Management Guide](docs/SESSION.md) - Complete guide for session features
239
257
 
240
258
  ## License
241
259
 
@@ -0,0 +1,29 @@
1
+ fastapi_cachex/__init__.py,sha256=HwhPCvIaaQ3X8sMxD7skEcN2JeirMkG1gKaRj1FXKA4,852
2
+ fastapi_cachex/backends/__init__.py,sha256=Gzji5R6B0KIVTlYzWfgpu992yXJjkxI8hLFqtohNuWg,322
3
+ fastapi_cachex/backends/base.py,sha256=7nQ15GQ_c8r7OnKYAeK8DqCEnrT30Qt1OaCfXl28vZw,2083
4
+ fastapi_cachex/backends/memcached.py,sha256=d8NeV23uZZraovn5xmdsaLBBfJTK_5zpkSXVY_DMNXQ,8926
5
+ fastapi_cachex/backends/memory.py,sha256=XVbrYNgDzSYEShzGHal6WEab8AbBfj9y11XK-Dkci7k,8193
6
+ fastapi_cachex/backends/redis.py,sha256=bDgt6Zp-LUts1lV_U3vVJtfEkWRuTi19hkWcb0g_o6I,10865
7
+ fastapi_cachex/cache.py,sha256=G8Do_Nq62xrc59j5HolP_QZ9Q8h0W6_au0HtW-ObmXs,12734
8
+ fastapi_cachex/dependencies.py,sha256=swxSKxR16u3t_L0zlqd_DH_UrFkAE-Dxxrmqcm27sfg,422
9
+ fastapi_cachex/directives.py,sha256=0W9_rRbxF1YioII7DNCa498ets3sHpqny0JLm-EUw5s,585
10
+ fastapi_cachex/exceptions.py,sha256=64Ub9pOa4w_jCc4DEjIngYYLXPuzVYEkn5vh_CLS69I,432
11
+ fastapi_cachex/proxy.py,sha256=AV74yx1q6Gvp0EPhaK0D9gijqQ1WhNGGKT-5RdEXWWw,1213
12
+ fastapi_cachex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ fastapi_cachex/routes.py,sha256=XJ5VholFJSfy4BYckaTpoCFQK0CV8ghMtawvfZzEw_c,9382
14
+ fastapi_cachex/session/__init__.py,sha256=_kaol8hNQXQj1TNyvX_67jbCOCt_ZKTzyKtgHIzyQSQ,542
15
+ fastapi_cachex/session/config.py,sha256=inPclQ0aYXN4hD9b2xJ2S84_RX_YWxyM4jvLnYD0Kow,2075
16
+ fastapi_cachex/session/dependencies.py,sha256=a-zmtWoGTVDy9n7R9sX8NiSfq6GUgT7I0AmC_VDHnDI,1670
17
+ fastapi_cachex/session/exceptions.py,sha256=DIw9QBzOWOXFl306Dv8LDMjmn0gjxbUrZVngJ83nU7E,576
18
+ fastapi_cachex/session/manager.py,sha256=nn0AXGyEmNmWoW_KVvBGMzYlLDlaQXfWf-7E6-Miw4w,12607
19
+ fastapi_cachex/session/middleware.py,sha256=zeNNcZh94bgIMBex7b6WJYabHNv-KnDyIyGVAPJFVE0,4649
20
+ fastapi_cachex/session/models.py,sha256=KpiFxadWDLqSEQQ_oPGBLUBBwo7HeLci2PGtmuh9eBE,5822
21
+ fastapi_cachex/session/security.py,sha256=1ndZ7ktN6xrSAN94UALefPsTm_3BU-S2g1dSSgG27js,3143
22
+ fastapi_cachex/state/__init__.py,sha256=KH4fLTHvEgkr696pZdRmVXC-j5M6VRGhWDjijRS1GzI,379
23
+ fastapi_cachex/state/exceptions.py,sha256=qTRKqOylUVwGQCDooKoQ-QA-W-39ark0oyAKyKu0Gj8,463
24
+ fastapi_cachex/state/manager.py,sha256=aHMsJJoEc9ZVkF6zf3Dbqqx-s0zByuzmjLlGUZ5HsXQ,8674
25
+ fastapi_cachex/state/models.py,sha256=FXy9cOZndTnstSd6byhgbUHerGFoxax_fGiYauvrMwo,1002
26
+ fastapi_cachex/types.py,sha256=mXPMqJfupkZzpaKJ4isxH_NvjGwOgJifN-IrWuXIaTo,784
27
+ fastapi_cachex-0.2.3.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
28
+ fastapi_cachex-0.2.3.dist-info/METADATA,sha256=VXJZ39FlbW8psuFvCuW_j9QYqN1HGay34iQSzQ3pZso,11046
29
+ fastapi_cachex-0.2.3.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- fastapi_cachex/__init__.py,sha256=T8KTNtlTxqYUzUZTbDutL9QErRFc-Ev7yh406u578e4,325
2
- fastapi_cachex/backends/__init__.py,sha256=9dZr4l-Ozca9PC1Qsnbjnks8-r6A22fFWL8WP9DOR-I,414
3
- fastapi_cachex/backends/base.py,sha256=7nQ15GQ_c8r7OnKYAeK8DqCEnrT30Qt1OaCfXl28vZw,2083
4
- fastapi_cachex/backends/memcached.py,sha256=HHreoCLYtNYaz_wuK9h3St5AOS7LvItnNXjazwvKvy8,8103
5
- fastapi_cachex/backends/memory.py,sha256=djQbj-jeTd9MIu_G-HUcfDauoNhu9wxynfak-mR5nYY,6950
6
- fastapi_cachex/backends/redis.py,sha256=uFNrHjFoshGmFMmMBb6ooVLS34GHz_Xl7WA8POE3sJk,9977
7
- fastapi_cachex/cache.py,sha256=W1nr-sUjTsFluRfXpiZjOeKRz9sIT0J_fX5ZGB81bDU,11284
8
- fastapi_cachex/dependencies.py,sha256=RZfsO9U9BDdbhmZ7QEWd178vwQ_qb4vUvU6Z_fsmy4M,450
9
- fastapi_cachex/directives.py,sha256=0W9_rRbxF1YioII7DNCa498ets3sHpqny0JLm-EUw5s,585
10
- fastapi_cachex/exceptions.py,sha256=64Ub9pOa4w_jCc4DEjIngYYLXPuzVYEkn5vh_CLS69I,432
11
- fastapi_cachex/proxy.py,sha256=iEKuLX3Qc8z4NcokMANdigDuZmXrgYbcZPBH75BtRkk,1047
12
- fastapi_cachex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- fastapi_cachex/routes.py,sha256=A8KvOsFQniwoo2rS4sSnVzujTicHFbM38e2619nxDG0,9363
14
- fastapi_cachex/types.py,sha256=DkNyZYl4bIe3Vrlz_FZnxjHyMbmniwrAVwL0OVgccaM,498
15
- fastapi_cachex-0.2.1.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
16
- fastapi_cachex-0.2.1.dist-info/METADATA,sha256=fEaMiWm77W-Mih0mDhm-EyvcpcfMczx2uzVuzlgUb2U,10310
17
- fastapi_cachex-0.2.1.dist-info/RECORD,,