commit 1504820466cd4b1a9d7c065b950d1ddd132451e6
parent 39a46ca95d2b6c69ae5aecf8cd02906ca108238d
Author: lash <dev@holbrook.no>
Date: Sat, 14 Feb 2026 22:10:33 +0000
Add meta files
Diffstat:
10 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,3 +1,4 @@
build/
*.egg-info
__pycache__
+dist/
diff --git a/LICENSE b/LICENSE
@@ -0,0 +1,14 @@
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
diff --git a/README.md b/README.md
diff --git a/readme.txt b/readme.txt
@@ -1,4 +0,0 @@
-No setup yet, extensions tested with following module versions:
-
-CouchDB==1.2
-valkey==6.1.1
diff --git a/requirements_ext.txt b/requirements_ext.txt
@@ -0,0 +1,2 @@
+CouchDB==1.2
+valkey==6.1.1
diff --git a/setup.cfg b/setup.cfg
@@ -0,0 +1,9 @@
+[metadata]
+classifiers =
+ Programming Language :: Python :: 3
+ Operating System :: OS Independent
+ Development Status :: 3 - Alpha
+ Intended Audience :: Developers
+ Topic :: Software Development :: Libraries
+license_files =
+ LICENSE
diff --git a/setup.py b/setup.py
@@ -0,0 +1,26 @@
+from setuptools import setup
+
+f = open('./README.md', 'r')
+long_description = f.read()
+f.close()
+
+setup(
+ name='wheepy',
+ version='0.0.3',
+ description='Unified interface to key value with locking and transactions.',
+ author='Louis Holbrook',
+ author_email='dev@holbrook.no',
+ license='WTFPL',
+ long_description=long_description,
+ long_description_content_type='text/markdown',
+ extras_require={
+ 'couchdb': ['couchdb~=1.2'],
+ 'valkey': ['valkey~=6.1.1'],
+ },
+ packages=[
+ 'whee',
+ 'whee.couchdb',
+ 'whee.valkey',
+ ],
+ url='https://holbrook.no/src/whee/',
+ )
diff --git a/whee/base.py b/whee/base.py
@@ -15,7 +15,7 @@ class Interface:
def put(self, k, v, exist_ok=False):
- """Retrieve value for key.
+ """Set value for key.
:raises: ValueError if value is in a format that cannot be stored.
:raises: ConnectionRefusedError if store is locked.
diff --git a/whee/mem.py b/whee/mem.py
@@ -23,7 +23,7 @@ class MemStore(Interface):
k = self.__to_store_key(k)
r = self.v.get(k)
if r == None:
- raise FileNotFoundError()
+ raise FileNotFoundError(k)
logg.debug('memstore get {} -> {}'.format(k, r))
return r
diff --git a/whee/valkey/__init__.py b/whee/valkey/__init__.py
@@ -40,7 +40,7 @@ class ValkeyStore(Interface):
k = ensure_bytes_key(k)
if self.have(k):
if not exist_ok:
- raise FileExistsError()
+ raise FileExistsError(k.hex())
logg.debug('valkeystore put (replace) {} <- {}'.format(k, v))
else:
logg.debug('valkeystore put {} <- {}'.format(k, v))