aboutsummaryrefslogtreecommitdiff
path: root/alphanum
diff options
context:
space:
mode:
authorCody Logan <clpo13@gmail.com>2020-01-07 16:28:01 -0800
committerCody Logan <clpo13@gmail.com>2020-01-07 16:28:01 -0800
commitc77d4fc27a7235f206e2ae771c47a57d6cc18df4 (patch)
treea113121533acd7cd0697760f1282a3df4f232be6 /alphanum
downloadalphanum-0.1.0.tar.gz
alphanum-0.1.0.zip
Initial commitv0.1.0
Diffstat (limited to 'alphanum')
-rw-r--r--alphanum/__init__.py3
-rw-r--r--alphanum/alphanum.py5
2 files changed, 8 insertions, 0 deletions
diff --git a/alphanum/__init__.py b/alphanum/__init__.py
new file mode 100644
index 0000000..7817cb2
--- /dev/null
+++ b/alphanum/__init__.py
@@ -0,0 +1,3 @@
+from .alphanum import generate # noqa: F401
+
+__version__ = '0.1.0'
diff --git a/alphanum/alphanum.py b/alphanum/alphanum.py
new file mode 100644
index 0000000..6fc2f03
--- /dev/null
+++ b/alphanum/alphanum.py
@@ -0,0 +1,5 @@
+from random import choices
+
+
+def generate(length=1) -> str:
+ return ''.join(choices('abcdefghijklmnopqrstuvwxyz0123456789', k=length))