Drop the AGPL license in favor of a source-available license. See the blog post [1] for details. [1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
19 lines
449 B
Python
19 lines
449 B
Python
#
|
|
# Copyright (C) 2019 pengjian.uestc @ gmail.com
|
|
#
|
|
#
|
|
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
#
|
|
|
|
import string
|
|
import random
|
|
import redis
|
|
|
|
def connect(host='localhost', port=6379):
|
|
return redis.Redis(host, port, decode_responses=True)
|
|
|
|
def random_string(size=10):
|
|
"""Generate a random string of fixed length """
|
|
letters = string.ascii_lowercase
|
|
return ''.join(random.choice(letters) for i in range(size))
|