rediscache 1.0.0__py3-none-any.whl → 1.0.2__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.
rediscache/__init__.py CHANGED
@@ -35,7 +35,6 @@ TODO:
35
35
  """
36
36
 
37
37
  from functools import wraps
38
- from json import dumps, loads
39
38
  import logging
40
39
  import os
41
40
  import threading
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: rediscache
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Redis caching of functions evolving over time
5
- Home-page: https://github.com/AmadeusITGroup/RedisCache
6
5
  License: MIT
7
6
  Keywords: redis,performance,cache
8
7
  Author: Pierre Cart-Grandjean
@@ -20,9 +19,10 @@ Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
- Requires-Dist: executiontime (>=0.3.6,<0.4.0)
25
- Requires-Dist: redis (>=5.0.1,<6.0.0)
24
+ Requires-Dist: executiontime (>=0.4.3,<0.5.0)
25
+ Requires-Dist: redis (>=5.2.1,<6.0.0)
26
26
  Project-URL: Repository, https://github.com/AmadeusITGroup/RedisCache
27
27
  Description-Content-Type: text/markdown
28
28
 
@@ -46,7 +46,7 @@ This is a great caching mechanism for functions that will give a consistent outp
46
46
 
47
47
  ## Installation
48
48
 
49
- Simply install the PyPi package:
49
+ Simply install the PyPi package [rediscache](https://pypi.org/project/rediscache/):
50
50
 
51
51
  ```bash
52
52
  pip install rediscache
@@ -188,10 +188,10 @@ My development environment is handled by Poetry. I use `Python 3.11.7`.
188
188
 
189
189
  To make sure we use Redis properly, we do not mock it in the unit tess. So you will need a localhost default instance of Redis server without a password. This means that the unit tests are more like integration tests.
190
190
 
191
- The execution of the tests including coverage result can be done with `test.sh`. You can also run just `pytest`:
191
+ The execution of the tests including coverage result is done with `pytest`:
192
192
 
193
193
  ```bash
194
- ./test.sh
194
+ poetry run pytest --cov=rediscache
195
195
  ```
196
196
 
197
197
  ## CI/CD
@@ -210,3 +210,21 @@ We get help from re-usable actions. Here is the [Marketplace](https://github.com
210
210
 
211
211
  For the moment the publish to PyPI is done manually with the `publish.sh` script. You will need a PyPI API token in `PYPI_API_TOKEN`, stored in a `secrets.sh`.
212
212
 
213
+ ## Demo application
214
+
215
+ In the `demo` directory you will find a web application to test `RedisCache`.
216
+
217
+ ```bash
218
+ poetry run webapp
219
+ ```
220
+
221
+ Entry points:
222
+
223
+ - Call to long function with parameter value `20` and using the cache but waiting for a result: [link](http://localhost:9090/cached/20)
224
+ - Call to long function with parameter value `20` without using the cache: [link](http://localhost:9090/direct/20)
225
+ - Get the stats stored in Redis database: [link](http://localhost:9090/stats)
226
+
227
+ There is also a `Nginx` configuration file to further test if with a load balancing of workers. It is useful to demonstrate that many workers can share efficiently the same instance of `Redis`.
228
+
229
+ Finally a `Gatling` configuration file can be used to test the performance.
230
+
@@ -0,0 +1,7 @@
1
+ rediscache/__init__.py,sha256=op0l1FnimOxC3wCl3QffhiD-vL0BQ9vN9KE4hu4fPJ4,11717
2
+ rediscache/tools.py,sha256=0I4l2f-SKZR6ec5y-GJOMhLdWimPjs6gGzHtPdPdYpg,995
3
+ rediscache-1.0.2.dist-info/LICENSE,sha256=glwtaJmUmkPhzLEfrVcc2JmLoCyTnHst84tadlSIK_8,1123
4
+ rediscache-1.0.2.dist-info/METADATA,sha256=gPMd1cU2ORRixK7nSRZSIpLRwJTbmuQWfRDdbQ4mBBg,10340
5
+ rediscache-1.0.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
6
+ rediscache-1.0.2.dist-info/entry_points.txt,sha256=Xu1U6rXzuYGpBdz5etdzcWVfLt6ZvQfo8YZ2u9m2qyA,43
7
+ rediscache-1.0.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.8.1
2
+ Generator: poetry-core 2.1.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ webapp=demo.webapp:main
3
+
@@ -1,6 +0,0 @@
1
- rediscache/__init__.py,sha256=MAmNU52cyqKmAJBEO4SN7spLcbvMTaYWUiw_Kx7ZvLI,11747
2
- rediscache/tools.py,sha256=0I4l2f-SKZR6ec5y-GJOMhLdWimPjs6gGzHtPdPdYpg,995
3
- rediscache-1.0.0.dist-info/LICENSE,sha256=glwtaJmUmkPhzLEfrVcc2JmLoCyTnHst84tadlSIK_8,1123
4
- rediscache-1.0.0.dist-info/METADATA,sha256=aMYLH8XmO9l-ZTdnp7NU8dJG30vLWerpODwkyMb0PAg,9558
5
- rediscache-1.0.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
6
- rediscache-1.0.0.dist-info/RECORD,,