databutton 0.38.3__tar.gz → 0.38.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {databutton-0.38.3 → databutton-0.38.10}/PKG-INFO +2 -4
- {databutton-0.38.3 → databutton-0.38.10}/README.md +0 -2
- {databutton-0.38.3 → databutton-0.38.10}/databutton/__init__.py +1 -2
- {databutton-0.38.3 → databutton-0.38.10}/databutton/experimental/folder/folder.py +1 -1
- {databutton-0.38.3 → databutton-0.38.10}/databutton/version.py +1 -1
- {databutton-0.38.3 → databutton-0.38.10}/pyproject.toml +3 -3
- databutton-0.38.3/databutton/rag/__init__.py +0 -5
- databutton-0.38.3/databutton/rag/chroma.py +0 -35
- {databutton-0.38.3 → databutton-0.38.10}/LICENSE +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/cachetools.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/experimental/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/experimental/auth/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/experimental/auth/get_user.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/experimental/folder/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/internal/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/internal/auth.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/internal/byteutils.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/internal/dbapiclient.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/internal/httpxclient.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/internal/performedby.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/internal/retries.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/jobs/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/jobs/run.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/notify/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/notify/email.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/notify/send.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/pydantic_v1/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/secrets/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/secrets/secrets.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/storage/__init__.py +0 -0
- {databutton-0.38.3 → databutton-0.38.10}/databutton/storage/storage.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: databutton
|
3
|
-
Version: 0.38.
|
3
|
+
Version: 0.38.10
|
4
4
|
Summary: The CLI for databutton.com
|
5
5
|
License: Databutton
|
6
6
|
Author: Databutton
|
@@ -13,8 +13,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Requires-Dist: PyJWT (>=2.2.0,<3.0.0)
|
14
14
|
Requires-Dist: PyYAML (>=6.0,<7.0)
|
15
15
|
Requires-Dist: certifi (>=2022.12.7,<2023.0.0)
|
16
|
-
Requires-Dist: chromadb (>=0.4.22,<0.5.0)
|
17
16
|
Requires-Dist: cryptography (>=40.0.1,<41.0.0)
|
17
|
+
Requires-Dist: fastapi
|
18
18
|
Requires-Dist: httpx (>=0.20.0,<1)
|
19
19
|
Requires-Dist: pandas[feather] (>=0.25,<3)
|
20
20
|
Requires-Dist: pydantic (>=1,<3)
|
@@ -89,5 +89,3 @@ To test in another package, you can simply
|
|
89
89
|
|
90
90
|
All rights reserved.
|
91
91
|
|
92
|
-
|
93
|
-
|
@@ -5,7 +5,7 @@ Create data apps
|
|
5
5
|
.. moduleauthor:: Databutton <support@databutton.com>
|
6
6
|
"""
|
7
7
|
|
8
|
-
from . import experimental, notify, pydantic_v1,
|
8
|
+
from . import experimental, notify, pydantic_v1, secrets, storage
|
9
9
|
from .cachetools import cache, clear_cache
|
10
10
|
from .version import __version__
|
11
11
|
|
@@ -16,7 +16,6 @@ __all__ = [
|
|
16
16
|
"storage",
|
17
17
|
"cache",
|
18
18
|
"clear_cache",
|
19
|
-
"rag",
|
20
19
|
"__version__",
|
21
20
|
"experimental",
|
22
21
|
]
|
@@ -42,6 +42,6 @@ def upload(key: str, folder_path: str):
|
|
42
42
|
def download(key: str, folder_path: str):
|
43
43
|
"""Download and unzip a folder from blob storage."""
|
44
44
|
normalized_folder_path = normalize_path(folder_path)
|
45
|
-
zipped_bytes = db.storage.binary.get(key, default=
|
45
|
+
zipped_bytes = db.storage.binary.get(key, default=None)
|
46
46
|
if zipped_bytes is not None:
|
47
47
|
unzip_bytes_to_folder(zipped_bytes, normalized_folder_path.as_posix())
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "databutton"
|
3
|
-
version = "0.38.
|
3
|
+
version = "0.38.10"
|
4
4
|
description = "The CLI for databutton.com"
|
5
5
|
authors = ["Databutton <hi@databutton.io>"]
|
6
6
|
license = "Databutton"
|
@@ -17,7 +17,7 @@ PyYAML = "^6.0"
|
|
17
17
|
tenacity = "^8.0.0"
|
18
18
|
cryptography = "^40.0.1"
|
19
19
|
certifi = "^2022.12.7"
|
20
|
-
|
20
|
+
fastapi = "*"
|
21
21
|
|
22
22
|
[tool.poetry.group.dev.dependencies]
|
23
23
|
mypy = "^1.2.0"
|
@@ -30,7 +30,7 @@ isort = "^5.12.0"
|
|
30
30
|
python-semantic-release = "7.28.1"
|
31
31
|
pytest-mock = "^3.7.0"
|
32
32
|
pandas-stubs = "^1.5.2.221124"
|
33
|
-
ruff = "^0.
|
33
|
+
ruff = "^0.4.0"
|
34
34
|
types-pyjwt = "^1.7.1"
|
35
35
|
|
36
36
|
[build-system]
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import shutil
|
3
|
-
|
4
|
-
import chromadb
|
5
|
-
|
6
|
-
import databutton as db
|
7
|
-
|
8
|
-
|
9
|
-
class Chroma:
|
10
|
-
path = ".tmp/chroma/"
|
11
|
-
file_path = "path/chroma.sqlite3"
|
12
|
-
|
13
|
-
def __init__(self):
|
14
|
-
pass
|
15
|
-
|
16
|
-
def persist(self):
|
17
|
-
shutil.make_archive("chroma", "zip", self.path)
|
18
|
-
with open("chroma.zip", "rb") as file:
|
19
|
-
db.storage.binary.put("chromadb", file.read())
|
20
|
-
|
21
|
-
def client(self):
|
22
|
-
# if local file doesn't exists, try to fetch it
|
23
|
-
if not os.path.exists(self.file_path):
|
24
|
-
try:
|
25
|
-
stream = db.storage.binary.get("chromadb")
|
26
|
-
with open(".tmp/chroma/chroma.zip", "wb") as file:
|
27
|
-
file.write(stream)
|
28
|
-
shutil.unpack_archive("chroma.zip", self.path)
|
29
|
-
except FileNotFoundError:
|
30
|
-
pass
|
31
|
-
# Instigate the client
|
32
|
-
the_client = chromadb.PersistentClient(self.path)
|
33
|
-
the_client.persist = self.persist
|
34
|
-
|
35
|
-
return the_client
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|