aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/jiter
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/jiter')
-rw-r--r--.venv/lib/python3.12/site-packages/jiter/__init__.py5
-rw-r--r--.venv/lib/python3.12/site-packages/jiter/__init__.pyi70
-rwxr-xr-x.venv/lib/python3.12/site-packages/jiter/jiter.cpython-312-x86_64-linux-gnu.sobin0 -> 833312 bytes
-rw-r--r--.venv/lib/python3.12/site-packages/jiter/py.typed0
4 files changed, 75 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/jiter/__init__.py b/.venv/lib/python3.12/site-packages/jiter/__init__.py
new file mode 100644
index 00000000..3d17192f
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/jiter/__init__.py
@@ -0,0 +1,5 @@
+from .jiter import *
+
+__doc__ = jiter.__doc__
+if hasattr(jiter, "__all__"):
+ __all__ = jiter.__all__ \ No newline at end of file
diff --git a/.venv/lib/python3.12/site-packages/jiter/__init__.pyi b/.venv/lib/python3.12/site-packages/jiter/__init__.pyi
new file mode 100644
index 00000000..928fa751
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/jiter/__init__.pyi
@@ -0,0 +1,70 @@
+import decimal
+from typing import Any, Literal
+
+def from_json(
+ json_data: bytes,
+ /,
+ *,
+ allow_inf_nan: bool = True,
+ cache_mode: Literal[True, False, "all", "keys", "none"] = "all",
+ partial_mode: Literal[True, False, "off", "on", "trailing-strings"] = False,
+ catch_duplicate_keys: bool = False,
+ float_mode: Literal["float", "decimal", "lossless-float"] = False,
+) -> Any:
+ """
+ Parse input bytes into a JSON object.
+
+ Arguments:
+ json_data: The JSON data to parse
+ allow_inf_nan: Whether to allow infinity (`Infinity` an `-Infinity`) and `NaN` values to float fields.
+ Defaults to True.
+ cache_mode: cache Python strings to improve performance at the cost of some memory usage
+ - True / 'all' - cache all strings
+ - 'keys' - cache only object keys
+ - False / 'none' - cache nothing
+ partial_mode: How to handle incomplete strings:
+ - False / 'off' - raise an exception if the input is incomplete
+ - True / 'on' - allow incomplete JSON but discard the last string if it is incomplete
+ - 'trailing-strings' - allow incomplete JSON, and include the last incomplete string in the output
+ catch_duplicate_keys: if True, raise an exception if objects contain the same key multiple times
+ float_mode: How to return floats: as a `float`, `Decimal` or `LosslessFloat`
+
+ Returns:
+ Python object built from the JSON input.
+ """
+
+def cache_clear() -> None:
+ """
+ Reset the string cache.
+ """
+
+def cache_usage() -> int:
+ """
+ get the size of the string cache.
+
+ Returns:
+ Size of the string cache in bytes.
+ """
+
+
+class LosslessFloat:
+ """
+ Represents a float from JSON, by holding the underlying bytes representing a float from JSON.
+ """
+ def __init__(self, json_float: bytes):
+ """Construct a LosslessFloat object from a JSON bytes slice"""
+
+ def as_decimal(self) -> decimal.Decimal:
+ """Construct a Python Decimal from the JSON bytes slice"""
+
+ def __float__(self) -> float:
+ """Construct a Python float from the JSON bytes slice"""
+
+ def __bytes__(self) -> bytes:
+ """Return the JSON bytes slice as bytes"""
+
+ def __str__(self):
+ """Return the JSON bytes slice as a string"""
+
+ def __repr__(self):
+ ...
diff --git a/.venv/lib/python3.12/site-packages/jiter/jiter.cpython-312-x86_64-linux-gnu.so b/.venv/lib/python3.12/site-packages/jiter/jiter.cpython-312-x86_64-linux-gnu.so
new file mode 100755
index 00000000..0a7a8f17
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/jiter/jiter.cpython-312-x86_64-linux-gnu.so
Binary files differ
diff --git a/.venv/lib/python3.12/site-packages/jiter/py.typed b/.venv/lib/python3.12/site-packages/jiter/py.typed
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/jiter/py.typed