Dont require to be in the same folder as the repo to run, v0.0.5

This commit is contained in:
Anton Osika
2023-06-22 10:42:35 +02:00
parent 22c2e76026
commit ed1a7da296
13 changed files with 24 additions and 16 deletions

View File

@@ -11,6 +11,9 @@ class DB:
self.path.mkdir(parents=True, exist_ok=True)
def __contains__(self, key):
return (self.path / key).is_file()
def __getitem__(self, key):
full_path = self.path / key
@@ -35,6 +38,6 @@ class DB:
class DBs:
memory: DB
logs: DB
identity: DB
preprompts: DB
input: DB
workspace: DB