databutton 0.38.3__py3-none-any.whl → 0.38.10__py3-none-any.whl

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/__init__.py CHANGED
@@ -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, rag, secrets, storage
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=lambda: None)
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())
databutton/version.py CHANGED
@@ -5,4 +5,4 @@ This module contains project version information.
5
5
  .. moduleauthor:: Databutton <support@databutton.com>
6
6
  """
7
7
 
8
- __version__ = "0.38.3"
8
+ __version__ = "0.38.10"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: databutton
3
- Version: 0.38.3
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
-
@@ -1,10 +1,10 @@
1
- databutton/__init__.py,sha256=h5GdA1J_7UCaGxMFbobohHAiweUvqhOnm7TQ7cPaeGU,418
1
+ databutton/__init__.py,sha256=ZI45JHM2PoVmuCXW1Je1t0dxCXP_xU6BMQT5tdtrO6E,402
2
2
  databutton/cachetools.py,sha256=soq0BDkE_YNaybBx-fI4pJ1x8k9KuotZ0f_OuZCCI9k,3554
3
3
  databutton/experimental/__init__.py,sha256=S5AFlCNuvWf5HR2BUs_uzNd-GmjbpVm6eA__DLMUpPU,57
4
4
  databutton/experimental/auth/__init__.py,sha256=hqMbUs9GIVW-bJrayhWzdmSLkmU1wvFHDp6jMKwQrWc,73
5
5
  databutton/experimental/auth/get_user.py,sha256=qi6nkG35PRgeljV4J-cHdEE4nhfwJHOYv93tBXR5A9I,3314
6
6
  databutton/experimental/folder/__init__.py,sha256=27dUyREJ-08xP4OmQUtAyWWz7_hWEat6ajqiJ2xgyeo,71
7
- databutton/experimental/folder/folder.py,sha256=p0ypsja9pXupPnoqumI3d7LBWK5vtvzldiMFyO_mCqs,1815
7
+ databutton/experimental/folder/folder.py,sha256=t_7s5nhJVmoAqVlND2vrny_CiOo18mxJa4vpDTWn7SY,1807
8
8
  databutton/internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  databutton/internal/auth.py,sha256=MY4S7Gvb6xufmZ0SssZka0eY_18lJbxHW61cHrisnro,3182
10
10
  databutton/internal/byteutils.py,sha256=2SYQxhbK1Kj__u_ap01kPpeb1b_bcZAXSz6aqWwetUA,740
@@ -18,14 +18,12 @@ databutton/notify/__init__.py,sha256=p6x5D_8q-EXQHS4TuK7_Dli_PdBRPowrQjKOA1_TaVk
18
18
  databutton/notify/email.py,sha256=b4i4T4R5tBBNk5I-tv8kFWwBfju_yFPPRCRzHsLEP8o,12364
19
19
  databutton/notify/send.py,sha256=A5XACf2U7eK5JH-sUWt4O4GWYq4dm40d6vatIjhw-8k,762
20
20
  databutton/pydantic_v1/__init__.py,sha256=J6d7HXLUYp4FcMS3ucvCcLbgFFxSyp8LM8vuULhN2r0,852
21
- databutton/rag/__init__.py,sha256=O_QGqsZGxDLE-HXoC7E3nwB1MuQwNpL0kTm21Y7an_k,68
22
- databutton/rag/chroma.py,sha256=koSVEHoihXYEqNIegubn4VpnFJvERrQUxW5cJ6yVGtU,958
23
21
  databutton/secrets/__init__.py,sha256=sI0okrfRBs2l5tcLTrKc9uUfPVVRMM9D7WED8p226tI,128
24
22
  databutton/secrets/secrets.py,sha256=pehXsD09iKTxHaNQJ6awvIHXgRXBJrf4Xhrc11ZUeOk,3427
25
23
  databutton/storage/__init__.py,sha256=7ZNd4eQQ7lYYIe1MqCuFbFF1aAVCuj2c_zmJfaPVlDY,252
26
24
  databutton/storage/storage.py,sha256=x9LTyoAfLTWFCoy7XhA0tVUTkjldx8gYax09RkhMR1Q,20369
27
- databutton/version.py,sha256=CiMmDNG5P7CTf48drrwIBcBnsyFixu_4LNeOY1b9VS8,175
28
- databutton-0.38.3.dist-info/LICENSE,sha256=c7h4pcVZapFEmqWoRTRv_S1P_aibrtDobqmlR-QtMUk,45
29
- databutton-0.38.3.dist-info/METADATA,sha256=IwK-o-d7bxKvJYmQFY7yfAru5jXl-FEiddAZ4wV8TcU,2753
30
- databutton-0.38.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
- databutton-0.38.3.dist-info/RECORD,,
25
+ databutton/version.py,sha256=GueN3ZvLMRlQoSem5ZqFPPdp0ND1VuFGiDjhP5oruy8,176
26
+ databutton-0.38.10.dist-info/LICENSE,sha256=c7h4pcVZapFEmqWoRTRv_S1P_aibrtDobqmlR-QtMUk,45
27
+ databutton-0.38.10.dist-info/METADATA,sha256=C7ZKW3cvUv2JFBheNP9S20T378lNaZApaAM7Yafy4zk,2733
28
+ databutton-0.38.10.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
29
+ databutton-0.38.10.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- from .chroma import Chroma
2
-
3
- chroma = Chroma()
4
-
5
- __all__ = ["chroma"]
databutton/rag/chroma.py DELETED
@@ -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