baml-py 0.90.2__cp38-abi3-musllinux_1_1_aarch64.whl → 0.201.0__cp38-abi3-musllinux_1_1_aarch64.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.
baml_py/baml_py.abi3.so CHANGED
Binary file
baml_py/baml_py.pyi CHANGED
@@ -103,6 +103,8 @@ class RuntimeContextManager:
103
103
  def context_depth(self) -> int: ...
104
104
 
105
105
  class BamlRuntime:
106
+ def __getstate__(self) -> Tuple[str, Dict[str, str]]: ...
107
+ def __setstate__(self, state: Tuple[str, Dict[str, str]]) -> None: ...
106
108
  @staticmethod
107
109
  def from_directory(directory: str, env_vars: Dict[str, str]) -> BamlRuntime: ...
108
110
  async def call_function(
baml_py/ctx_manager.py CHANGED
@@ -31,6 +31,16 @@ prev_ctx_manager: typing.Optional["CtxManager"] = None
31
31
 
32
32
 
33
33
  class CtxManager:
34
+ def __setstate__(self, state: typing.Dict[str, typing.Any]) -> None:
35
+ self.rt = state["rt"]
36
+ self.ctx = contextvars.ContextVar[typing.Dict[int, RuntimeContextManager]](
37
+ "baml_ctx", default={current_thread_id(): self.rt.create_context_manager()}
38
+ )
39
+ atexit.register(self.rt.flush)
40
+
41
+ def __getstate__(self) -> typing.Dict[str, typing.Any]:
42
+ return {"rt": self.rt}
43
+
34
44
  def __new__(cls, *args, **kwargs):
35
45
  if prev_ctx_manager is not None:
36
46
  return prev_ctx_manager
baml_py/stream.py CHANGED
@@ -50,7 +50,7 @@ class BamlStream(Generic[PartialOutputType, FinalOutputType]):
50
50
  retval = await self.__ffi_stream.done(self.__ctx_manager)
51
51
 
52
52
  self.__future.set_result(retval)
53
-
53
+
54
54
  return retval
55
55
  except Exception as e:
56
56
  self.__future.set_exception(e)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: baml-py
3
- Version: 0.90.2
3
+ Version: 0.201.0
4
4
  License-File: LICENSE
5
5
  Summary: BAML python bindings (pyproject.toml)
6
6
  Author: Boundary <contact@boundaryml.com>
@@ -0,0 +1,17 @@
1
+ baml_py-0.201.0.dist-info/METADATA,sha256=JropL9HMS5Kattful84VALE7D6qCzPfttqMvWi8HaRU,335
2
+ baml_py-0.201.0.dist-info/WHEEL,sha256=B43xczSjoNhPSK5OHg1ebG0-FCDNoF4LtGHeVtc4gB8,106
3
+ baml_py-0.201.0.dist-info/entry_points.txt,sha256=9Uu_VcUjoI2qQMjVb0PRjEgI6pQ55WqBbzNparAPJyA,54
4
+ baml_py-0.201.0.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
5
+ baml_py.libs/libgcc_s-e52197c3.so.1,sha256=vkPW1Auw6CH9Bjk7frmX3hry_1H9c0tRI0Ncyg71WUI,724137
6
+ baml_py/__init__.py,sha256=QWyuR-eLmqkiRW5v9RKF83knRj_HG8fyTlp6Sse9D3o,827
7
+ baml_py/baml_py.abi3.so,sha256=lIxJA9HQge3aSe0Klg0Xx4rtcRYXtmFilN3SMK1U46U,49222873
8
+ baml_py/baml_py.pyi,sha256=Ev8oqkdiQhp0tb9-62xEy3ZtMN43uyJIxP68ZNlGD98,13995
9
+ baml_py/ctx_manager.py,sha256=JwWLvxFT05BnYiguzB-k-g47r7mft74L3mYt8e3qtus,6081
10
+ baml_py/errors.py,sha256=wqv7xT_-pVXQNxD5JbOrrr_CABCFuNrLrEhmEX8RVJ8,389
11
+ baml_py/internal_monkeypatch.py,sha256=JDwBPw4S8veD3nvJ13lFw8P5p29UOmDvvkgOy8eKA58,2106
12
+ baml_py/logging.py,sha256=zM-yKPJ3LF4qpIptYQVr5zw_Gjimy3deWlTt4dOzVp0,190
13
+ baml_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ baml_py/safe_import.py,sha256=turgUpn9B4G273ZuDVjfZ_CkA2qmFQyiP-ZCPhtJO4M,2888
15
+ baml_py/stream.py,sha256=pNfXDOa-6u4cjANaq071I6AevUx9N7DhDORc18Vh03k,6881
16
+ baml_py/type_builder.py,sha256=HIAlses70C5DWNWgx3ZwsLeGt5-tviWXCXZiyyWedSg,6374
17
+ baml_py-0.201.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.8.7)
2
+ Generator: maturin (1.9.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp38-abi3-musllinux_1_1_aarch64
@@ -1,17 +0,0 @@
1
- baml_py-0.90.2.dist-info/METADATA,sha256=Pbxxa0hcGk-Rdm_XDA_d5jKqVeLyF9v1Prf1K4KZskc,334
2
- baml_py-0.90.2.dist-info/WHEEL,sha256=XixS5oaMfUF0-gEpI90VVlwOOXpl5blTCy27P2vE08I,106
3
- baml_py-0.90.2.dist-info/entry_points.txt,sha256=9Uu_VcUjoI2qQMjVb0PRjEgI6pQ55WqBbzNparAPJyA,54
4
- baml_py-0.90.2.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
5
- baml_py.libs/libgcc_s-e52197c3.so.1,sha256=vkPW1Auw6CH9Bjk7frmX3hry_1H9c0tRI0Ncyg71WUI,724137
6
- baml_py/__init__.py,sha256=QWyuR-eLmqkiRW5v9RKF83knRj_HG8fyTlp6Sse9D3o,827
7
- baml_py/baml_py.abi3.so,sha256=NXpR4-EmyuEbTGUU-zr7vW4WRUkLYKS0Fq0JwEEqiCQ,46208225
8
- baml_py/baml_py.pyi,sha256=YYyXU1tLGLhz2OMRm9lroIAaKmQ0RZfATQ5Dea8q73s,13858
9
- baml_py/ctx_manager.py,sha256=p6Y4X1qfUExLeBeJKcVuf4WS9NrSabjRcRFrPIasTxY,5660
10
- baml_py/errors.py,sha256=wqv7xT_-pVXQNxD5JbOrrr_CABCFuNrLrEhmEX8RVJ8,389
11
- baml_py/internal_monkeypatch.py,sha256=JDwBPw4S8veD3nvJ13lFw8P5p29UOmDvvkgOy8eKA58,2106
12
- baml_py/logging.py,sha256=zM-yKPJ3LF4qpIptYQVr5zw_Gjimy3deWlTt4dOzVp0,190
13
- baml_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- baml_py/safe_import.py,sha256=turgUpn9B4G273ZuDVjfZ_CkA2qmFQyiP-ZCPhtJO4M,2888
15
- baml_py/stream.py,sha256=RoHvdlYi1lap7DN0sCUA-H5HtAfxxePnm1nIe6BRTTs,6892
16
- baml_py/type_builder.py,sha256=HIAlses70C5DWNWgx3ZwsLeGt5-tviWXCXZiyyWedSg,6374
17
- baml_py-0.90.2.dist-info/RECORD,,