chunkr-ai 0.3.5__py3-none-any.whl → 0.3.6__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.
- chunkr_ai/api/auth.py +2 -27
- {chunkr_ai-0.3.5.dist-info → chunkr_ai-0.3.6.dist-info}/METADATA +1 -1
- {chunkr_ai-0.3.5.dist-info → chunkr_ai-0.3.6.dist-info}/RECORD +6 -6
- {chunkr_ai-0.3.5.dist-info → chunkr_ai-0.3.6.dist-info}/WHEEL +0 -0
- {chunkr_ai-0.3.5.dist-info → chunkr_ai-0.3.6.dist-info}/licenses/LICENSE +0 -0
- {chunkr_ai-0.3.5.dist-info → chunkr_ai-0.3.6.dist-info}/top_level.txt +0 -0
chunkr_ai/api/auth.py
CHANGED
@@ -1,32 +1,5 @@
|
|
1
1
|
import platform
|
2
2
|
import sys
|
3
|
-
from pathlib import Path
|
4
|
-
|
5
|
-
# Handle tomllib import for Python 3.10 compatibility
|
6
|
-
try:
|
7
|
-
import tomllib
|
8
|
-
except ImportError:
|
9
|
-
import tomli as tomllib
|
10
|
-
|
11
|
-
def _find_pyproject_toml(start_path: Path) -> Path | None:
|
12
|
-
"""Search for pyproject.toml in current and parent directories."""
|
13
|
-
for parent in [start_path, *start_path.parents]:
|
14
|
-
candidate = parent / "pyproject.toml"
|
15
|
-
if candidate.is_file():
|
16
|
-
return candidate
|
17
|
-
return None
|
18
|
-
|
19
|
-
# Read version from pyproject.toml
|
20
|
-
try:
|
21
|
-
pyproject_path = _find_pyproject_toml(Path(__file__).resolve().parent)
|
22
|
-
if pyproject_path is not None:
|
23
|
-
with open(pyproject_path, "rb") as f:
|
24
|
-
pyproject_data = tomllib.load(f)
|
25
|
-
__version__ = pyproject_data["project"]["version"]
|
26
|
-
else:
|
27
|
-
__version__ = "unknown"
|
28
|
-
except Exception:
|
29
|
-
__version__ = "unknown"
|
30
3
|
|
31
4
|
class HeadersMixin:
|
32
5
|
"""Mixin class for handling authorization headers"""
|
@@ -40,6 +13,8 @@ class HeadersMixin:
|
|
40
13
|
|
41
14
|
def _headers(self) -> dict:
|
42
15
|
"""Generate authorization headers and version information"""
|
16
|
+
# Import version from the main package to avoid duplication
|
17
|
+
from .. import __version__
|
43
18
|
user_agent = f"chunkr-ai/{__version__} (Python/{sys.version.split()[0]}; {platform.system()}/{platform.release()})"
|
44
19
|
return {
|
45
20
|
"Authorization": self.get_api_key(),
|
@@ -1,7 +1,7 @@
|
|
1
1
|
chunkr_ai/__init__.py,sha256=d4EqExa_cJMpkPuJIaH-KhftCXEhXfNPijbAvqNpYEk,466
|
2
2
|
chunkr_ai/models.py,sha256=NvFJOpsgzEyYHhE-flp7Yr9tpTDvFmF4T87jttFRquU,1202
|
3
3
|
chunkr_ai/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
chunkr_ai/api/auth.py,sha256=
|
4
|
+
chunkr_ai/api/auth.py,sha256=5mF9KA_O4b5geRGA0q7ReiZHThyCGKMntu2vewghGXA,775
|
5
5
|
chunkr_ai/api/chunkr.py,sha256=3QAlZeq8zbiHp1HxgWpBBUAmvjabD9iBZxIkuGVsKJk,3822
|
6
6
|
chunkr_ai/api/chunkr_base.py,sha256=8roSPoCADmaXM2r7zz2iHfZzIcY9NopOfa4j-dfk8RA,6310
|
7
7
|
chunkr_ai/api/configuration.py,sha256=YDSN-hv5VyffKxDJBUaVE3u27BsDafxGNGfOBVRmRUk,11682
|
@@ -9,8 +9,8 @@ chunkr_ai/api/decorators.py,sha256=B-neL5d4N-skq2rjnOfaCVSTz6HEye6udcykacbv7G4,4
|
|
9
9
|
chunkr_ai/api/misc.py,sha256=pNjbiD5reMdDSkjNTWHn0VgTVsGYn0fl751WuRtSkL8,5389
|
10
10
|
chunkr_ai/api/protocol.py,sha256=LjPrYSq52m1afIlAo0yVGXlGZxPRh8J6g7S4PAit3Zo,388
|
11
11
|
chunkr_ai/api/task_response.py,sha256=omnKkACjN3ijnbG6UncHLI_IDbsaJ1wHu1g4X9JbijU,8017
|
12
|
-
chunkr_ai-0.3.
|
13
|
-
chunkr_ai-0.3.
|
14
|
-
chunkr_ai-0.3.
|
15
|
-
chunkr_ai-0.3.
|
16
|
-
chunkr_ai-0.3.
|
12
|
+
chunkr_ai-0.3.6.dist-info/licenses/LICENSE,sha256=w3R12yNDyZpMiy2lxy_hvNbsldC75ww79sF0u11rkho,1069
|
13
|
+
chunkr_ai-0.3.6.dist-info/METADATA,sha256=KQRhytdeklFy2JTlY9G5SLD0rJF2YwdT7on_XZb0as4,7180
|
14
|
+
chunkr_ai-0.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
15
|
+
chunkr_ai-0.3.6.dist-info/top_level.txt,sha256=0IZY7PZIiS8bw5r4NUQRUQ-ATi-L_3vLQVq3ZLouOW8,10
|
16
|
+
chunkr_ai-0.3.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|