aboutsummaryrefslogtreecommitdiff
path: root/gn3/chancy.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/chancy.py')
-rw-r--r--gn3/chancy.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/gn3/chancy.py b/gn3/chancy.py
new file mode 100644
index 0000000..f0ba574
--- /dev/null
+++ b/gn3/chancy.py
@@ -0,0 +1,11 @@
+"""
+Functions to generate complex random data.
+"""
+import random
+import string
+
+def random_string(length):
+ """Generate a random string of length `length`."""
+ return "".join(
+ random.choices(
+ string.ascii_letters + string.digits, k=length))