0 purchases
smartredisstorage 0.1.1
smart_redis_storage 0.1.1
Redis storage manager.
Author and developer: A.A. Suvorov
Help:
pip install smart-redis-storage
CRUD (Create, Read, Update, Delete) for Redis.
Used in a large corporate project in a multi-user CRM (Django) to store intermediate data.
I used user ids as uniq_key.
from smart_redis_storage.redis_storage import RedisStorageManager
user_id = 1
redis_storage_manager = RedisStorageManager()
redis_storage_manager.set_data(uniq_key=user_id, key='data', value={'id': 1, 'age': 33})
data = redis_storage_manager.get_data(uniq_key=user_id, key='data')
print(data) # {'id': 1, 'age': 33}
print(type(data)) # <class 'dict'>
Disclaimer of liability:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright:
--------------------------------------------------------
Licensed under the terms of the BSD 3-Clause License
(see LICENSE for details).
Copyright © 2018-2024, A.A. Suvorov
All rights reserved.
--------------------------------------------------------
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.