File tree Expand file tree Collapse file tree 6 files changed +25
-9
lines changed Expand file tree Collapse file tree 6 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 11{
2- "." : " 1.16.2 "
2+ "." : " 1.17.0 "
33}
Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 1.17.0 (2025-08-06)
4+
5+ Full Changelog: [ v1.16.2...v1.17.0] ( https://github.com/lumalabs/lumaai-python/compare/v1.16.2...v1.17.0 )
6+
7+ ### Features
8+
9+ * ** client:** support file upload requests ([ 34a3cfb] ( https://github.com/lumalabs/lumaai-python/commit/34a3cfb3ca6655c5014fcebf8fb6fbee157cf202 ) )
10+
11+
12+ ### Chores
13+
14+ * ** internal:** fix ruff target version ([ eb0161d] ( https://github.com/lumalabs/lumaai-python/commit/eb0161d4e30ec79cb2e6193b508af6e9bfd36668 ) )
15+
316## 1.16.2 (2025-07-25)
417
518Full Changelog: [ v1.16.1...v1.16.2] ( https://github.com/lumalabs/lumaai-python/compare/v1.16.1...v1.16.2 )
Original file line number Diff line number Diff line change 11[project ]
22name = " lumaai"
3- version = " 1.16.2 "
3+ version = " 1.17.0 "
44description = " The official Python library for the lumaai API"
55dynamic = [" readme" ]
66license = " Apache-2.0"
@@ -159,7 +159,7 @@ reportPrivateUsage = false
159159[tool .ruff ]
160160line-length = 120
161161output-format = " grouped"
162- target-version = " py37 "
162+ target-version = " py38 "
163163
164164[tool .ruff .format ]
165165docstring-code-format = true
Original file line number Diff line number Diff line change @@ -532,7 +532,10 @@ def _build_request(
532532 is_body_allowed = options .method .lower () != "get"
533533
534534 if is_body_allowed :
535- kwargs ["json" ] = json_data if is_given (json_data ) else None
535+ if isinstance (json_data , bytes ):
536+ kwargs ["content" ] = json_data
537+ else :
538+ kwargs ["json" ] = json_data if is_given (json_data ) else None
536539 kwargs ["files" ] = files
537540 else :
538541 headers .pop ("Content-Type" , None )
Original file line number Diff line number Diff line change @@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
6969 return file
7070
7171 if is_tuple_t (file ):
72- return (file [0 ], _read_file_content (file [1 ]), * file [2 :])
72+ return (file [0 ], read_file_content (file [1 ]), * file [2 :])
7373
7474 raise TypeError (f"Expected file types input to be a FileContent type or to be a tuple" )
7575
7676
77- def _read_file_content (file : FileContent ) -> HttpxFileContent :
77+ def read_file_content (file : FileContent ) -> HttpxFileContent :
7878 if isinstance (file , os .PathLike ):
7979 return pathlib .Path (file ).read_bytes ()
8080 return file
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
111111 return file
112112
113113 if is_tuple_t (file ):
114- return (file [0 ], await _async_read_file_content (file [1 ]), * file [2 :])
114+ return (file [0 ], await async_read_file_content (file [1 ]), * file [2 :])
115115
116116 raise TypeError (f"Expected file types input to be a FileContent type or to be a tuple" )
117117
118118
119- async def _async_read_file_content (file : FileContent ) -> HttpxFileContent :
119+ async def async_read_file_content (file : FileContent ) -> HttpxFileContent :
120120 if isinstance (file , os .PathLike ):
121121 return await anyio .Path (file ).read_bytes ()
122122
Original file line number Diff line number Diff line change 11# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
33__title__ = "lumaai"
4- __version__ = "1.16.2 " # x-release-please-version
4+ __version__ = "1.17.0 " # x-release-please-version
You can’t perform that action at this time.
0 commit comments