diff --git a/pydantic_ai_slim/pydantic_ai/messages.py b/pydantic_ai_slim/pydantic_ai/messages.py index 43c6a3bb4b..3c4ca0607a 100644 --- a/pydantic_ai_slim/pydantic_ai/messages.py +++ b/pydantic_ai_slim/pydantic_ai/messages.py @@ -2,11 +2,12 @@ import base64 import hashlib -from abc import ABC, abstractmethod +import warnings +from abc import ABC from collections.abc import Callable, Sequence from dataclasses import KW_ONLY, dataclass, field, replace from datetime import datetime -from mimetypes import guess_type +from mimetypes import guess_extension, guess_type from os import PathLike from pathlib import Path from typing import TYPE_CHECKING, Annotated, Any, Literal, TypeAlias, cast, overload @@ -23,8 +24,10 @@ from .usage import RequestUsage if TYPE_CHECKING: - from .models.instrumented import InstrumentationSettings + from magic import Magic + from magika import Magika + from .models.instrumented import InstrumentationSettings AudioMediaType: TypeAlias = Literal['audio/wav', 'audio/mpeg', 'audio/ogg', 'audio/flac', 'audio/aiff', 'audio/aac'] ImageMediaType: TypeAlias = Literal['image/jpeg', 'image/png', 'image/gif', 'image/webp'] @@ -64,6 +67,11 @@ ] """Reason the model finished generating the response, normalized to OpenTelemetry values.""" +# Shared instances for media type detection to avoid repeated initialization overhead + +_magika_instance: Magika | None = None +_magic_instance: Magic | None = None + ProviderDetailsDelta: TypeAlias = dict[str, Any] | Callable[[dict[str, Any] | None], dict[str, Any]] | None """Type for provider_details input: can be a static dict, a callback to update existing details, or None.""" @@ -181,16 +189,22 @@ def identifier(self) -> str: """ return self._identifier or _multi_modal_content_identifier(self.url) - @abstractmethod def _infer_media_type(self) -> str: """Infer the media type of the file based on the URL.""" - raise NotImplementedError + media_type = guess_type(self.url)[0] + if media_type is None: + raise ValueError( + f'Could not infer media type from URL: {self.url}. Explicitly provide a `media_type` instead.' + ) + return media_type @property - @abstractmethod def format(self) -> str: """The file format.""" - raise NotImplementedError + ext = guess_extension(self.media_type) + if ext is None: + raise ValueError(f'Could not infer file format from media type: {self.media_type}') + return ext[1:] # Strip the leading dot __repr__ = _utils.dataclasses_no_defaults_repr @@ -229,7 +243,7 @@ def __init__( ) self.kind = kind - def _infer_media_type(self) -> VideoMediaType: + def _infer_media_type(self) -> VideoMediaType | str: """Return the media type of the video, based on the url.""" if self.url.endswith('.mkv'): return 'video/x-matroska' @@ -253,9 +267,7 @@ def _infer_media_type(self) -> VideoMediaType: elif self.is_youtube: return 'video/mp4' else: - raise ValueError( - f'Could not infer media type from video URL: {self.url}. Explicitly provide a `media_type` instead.' - ) + return super()._infer_media_type() @property def is_youtube(self) -> bool: @@ -263,12 +275,15 @@ def is_youtube(self) -> bool: return self.url.startswith(('https://youtu.be/', 'https://youtube.com/', 'https://www.youtube.com/')) @property - def format(self) -> VideoFormat: + def format(self) -> VideoFormat | str: """The file format of the video. The choice of supported formats were based on the Bedrock Converse API. Other APIs don't require to use a format. """ - return _video_format_lookup[self.media_type] + if self.media_type in _video_format_lookup: + return _video_format_lookup[self.media_type] + else: + return super().format @dataclass(init=False, repr=False) @@ -305,7 +320,7 @@ def __init__( ) self.kind = kind - def _infer_media_type(self) -> AudioMediaType: + def _infer_media_type(self) -> AudioMediaType | str: """Return the media type of the audio file, based on the url. References: @@ -324,14 +339,15 @@ def _infer_media_type(self) -> AudioMediaType: if self.url.endswith('.aac'): return 'audio/aac' - raise ValueError( - f'Could not infer media type from audio URL: {self.url}. Explicitly provide a `media_type` instead.' - ) + return super()._infer_media_type() @property - def format(self) -> AudioFormat: + def format(self) -> AudioFormat | str: """The file format of the audio file.""" - return _audio_format_lookup[self.media_type] + if self.media_type in _audio_format_lookup: + return _audio_format_lookup[self.media_type] + else: + return super().format @dataclass(init=False, repr=False) @@ -368,7 +384,7 @@ def __init__( ) self.kind = kind - def _infer_media_type(self) -> ImageMediaType: + def _infer_media_type(self) -> ImageMediaType | str: """Return the media type of the image, based on the url.""" if self.url.endswith(('.jpg', '.jpeg')): return 'image/jpeg' @@ -378,18 +394,18 @@ def _infer_media_type(self) -> ImageMediaType: return 'image/gif' elif self.url.endswith('.webp'): return 'image/webp' - else: - raise ValueError( - f'Could not infer media type from image URL: {self.url}. Explicitly provide a `media_type` instead.' - ) + return super()._infer_media_type() @property - def format(self) -> ImageFormat: + def format(self) -> ImageFormat | str: """The file format of the image. The choice of supported formats were based on the Bedrock Converse API. Other APIs don't require to use a format. """ - return _image_format_lookup[self.media_type] + if self.media_type in _image_format_lookup: + return _image_format_lookup[self.media_type] + else: + return super().format @dataclass(init=False, repr=False) @@ -448,25 +464,19 @@ def _infer_media_type(self) -> str: return 'application/vnd.ms-excel' elif self.url.endswith('.xlsx'): return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' - - type_, _ = guess_type(self.url) - if type_ is None: - raise ValueError( - f'Could not infer media type from document URL: {self.url}. Explicitly provide a `media_type` instead.' - ) - return type_ + else: + return super()._infer_media_type() @property - def format(self) -> DocumentFormat: + def format(self) -> DocumentFormat | str: """The file format of the document. The choice of supported formats were based on the Bedrock Converse API. Other APIs don't require to use a format. """ - media_type = self.media_type - try: - return _document_format_lookup[media_type] - except KeyError as e: - raise ValueError(f'Unknown document media type: {media_type}') from e + if self.media_type in _document_format_lookup: + return _document_format_lookup[self.media_type] + else: + return super().format @dataclass(init=False, repr=False) @@ -481,7 +491,6 @@ class BinaryContent: _: KW_ONLY - media_type: AudioMediaType | ImageMediaType | DocumentMediaType | str """The media type of the binary data.""" vendor_metadata: dict[str, Any] | None = None @@ -496,6 +505,15 @@ class BinaryContent: compare=False, default=None ) + _media_type: Annotated[str | None, pydantic.Field(alias='media_type', default=None, exclude=True)] = field( + compare=False, default=None + ) + _type: Annotated[str | None, pydantic.Field(alias='type', default=None, exclude=True)] = field( + compare=False, default=None + ) + _extension: Annotated[str | None, pydantic.Field(alias='extension', default=None, exclude=True)] = field( + compare=False, default=None + ) kind: Literal['binary'] = 'binary' """Type identifier, this is available on all parts as a discriminator.""" @@ -503,15 +521,20 @@ def __init__( self, data: bytes, *, - media_type: AudioMediaType | ImageMediaType | DocumentMediaType | str, + media_type: str | None = None, identifier: str | None = None, vendor_metadata: dict[str, Any] | None = None, kind: Literal['binary'] = 'binary', # Required for inline-snapshot which expects all dataclass `__init__` methods to take all field names as kwargs. _identifier: str | None = None, + _media_type: str | None = None, + _type: str | None = None, + _extension: str | None = None, ) -> None: self.data = data - self.media_type = media_type + self._media_type = media_type or _media_type + self._type = _type + self._extension = _extension self._identifier = identifier or _identifier self.vendor_metadata = vendor_metadata self.kind = kind @@ -574,6 +597,58 @@ def identifier(self) -> str: """ return self._identifier or _multi_modal_content_identifier(self.data) + @pydantic.computed_field + @property + def media_type(self) -> str: + """The media type of the binary content. + + Automatically detects the media type using: + 1. Magika (preferred, more accurate for documents) + 2. python-magic (fallback) + + Raises: + ImportError: If neither magika nor python-magic is installed. + """ + return self._media_type or self._infer_media_type() + + def _infer_media_type(self) -> str: + """Infer the media type of the binary content.""" + global _magika_instance, _magic_instance + + # Try Magika first (more accurate, especially for documents) + try: + from magika import Magika + + if _magika_instance is None: + _magika_instance = Magika() + result = _magika_instance.identify_bytes(self.data).output + self._media_type = result.mime_type + self._type = result.group + self._extension = result.extensions[0] if result.extensions else None + return self._media_type + except ImportError: + pass + + # Fallback to python-magic (required dependency) + try: + from magic import Magic + + if _magic_instance is None: + _magic_instance = Magic(mime=True) + self._media_type = _magic_instance.from_buffer(self.data) + warnings.warn( + 'Using magic to identify media_type may result in incorrect identification of some document types. ' + 'To improve identification, please install the "magika" package or provide the media_type explicitly.', + category=UserWarning, + stacklevel=1, + ) + return self._media_type + except ImportError: + raise ImportError( + 'Could not infer media type: please install either "magika" or "python-magic" package, ' + 'or provide the media_type explicitly.' + ) from None + @property def data_uri(self) -> str: """Convert the `BinaryContent` to a data URI.""" @@ -587,37 +662,48 @@ def base64(self) -> str: @property def is_audio(self) -> bool: """Return `True` if the media type is an audio type.""" - return self.media_type.startswith('audio/') + return self._type == 'audio' or self.media_type.startswith('audio/') @property def is_image(self) -> bool: """Return `True` if the media type is an image type.""" - return self.media_type.startswith('image/') + return self._type == 'image' or self.media_type.startswith('image/') @property def is_video(self) -> bool: """Return `True` if the media type is a video type.""" - return self.media_type.startswith('video/') + return self._type == 'video' or self.media_type.startswith('video/') @property def is_document(self) -> bool: """Return `True` if the media type is a document type.""" - return self.media_type in _document_format_lookup + return self._type == 'document' or self.media_type in _document_format_lookup @property def format(self) -> str: - """The file format of the binary content.""" - try: - if self.is_audio: - return _audio_format_lookup[self.media_type] - elif self.is_image: - return _image_format_lookup[self.media_type] - elif self.is_video: - return _video_format_lookup[self.media_type] - else: - return _document_format_lookup[self.media_type] - except KeyError as e: - raise ValueError(f'Unknown media type: {self.media_type}') from e + """The file format of the binary content. + + Returns the file extension (without leading dot) based on the media type. + Uses cached extension from Magika if available, otherwise maps from media_type. + + Raises: + ValueError: If file format cannot be inferred from media type. + """ + if self._extension is not None: + return self._extension + + # Combine all format lookups + + if self.media_type in _type_map: + return _type_map[self.media_type] + + # Fallback to mimetypes.guess_extension + ext = guess_extension(self.media_type) + if ext is None: + raise ValueError(f'Unknown media type: {self.media_type}') + + # Return the extension (strip the leading dot) + return ext[1:] __repr__ = _utils.dataclasses_no_defaults_repr @@ -629,15 +715,26 @@ def __init__( self, data: bytes, *, - media_type: str, + media_type: str | None = None, identifier: str | None = None, vendor_metadata: dict[str, Any] | None = None, # Required for inline-snapshot which expects all dataclass `__init__` methods to take all field names as kwargs. kind: Literal['binary'] = 'binary', _identifier: str | None = None, + _media_type: str | None = None, + _type: str | None = None, + _extension: str | None = None, ): + # Use _media_type if media_type is not provided (for inline-snapshot compatibility) + effective_media_type = media_type or _media_type + super().__init__( - data=data, media_type=media_type, identifier=identifier or _identifier, vendor_metadata=vendor_metadata + data=data, + media_type=effective_media_type, + identifier=identifier or _identifier, + vendor_metadata=vendor_metadata, + _type=_type, + _extension=_extension, ) if not self.is_image: @@ -733,6 +830,7 @@ class ToolReturn: 'video/x-ms-wmv': 'wmv', 'video/3gpp': 'three_gp', } +_type_map = _image_format_lookup | _audio_format_lookup | _document_format_lookup | _video_format_lookup @dataclass(repr=False) @@ -1396,7 +1494,10 @@ def new_event_body(): elif isinstance(part, TextPart | ThinkingPart): kind = part.part_kind body.setdefault('content', []).append( - {'kind': kind, **({'text': part.content} if settings.include_content else {})} + { + 'kind': kind, + **({'text': part.content} if settings.include_content else {}), + } ) elif isinstance(part, FilePart): body.setdefault('content', []).append( diff --git a/pydantic_ai_slim/pydantic_ai/models/bedrock.py b/pydantic_ai_slim/pydantic_ai/models/bedrock.py index 4141544098..c1cdd9d7bf 100644 --- a/pydantic_ai_slim/pydantic_ai/models/bedrock.py +++ b/pydantic_ai_slim/pydantic_ai/models/bedrock.py @@ -754,7 +754,7 @@ async def _map_user_prompt( # noqa: C901 name = f'Document {next(document_count)}' document: DocumentBlockTypeDef = { 'name': name, - 'format': item.format, + 'format': item.format, # type: ignore[assignment] 'source': source, } content.append({'document': document}) diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index 8d196a813b..d73bd8d6bd 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -115,6 +115,9 @@ dbos = ["dbos>=1.14.0"] # Prefect prefect = ["prefect>=3.4.21"] +magika = ["magika>=1.0.1"] +magic = ["python-magic>=0.4.27"] + [tool.hatch.metadata] allow-direct-references = true diff --git a/tests/models/test_google.py b/tests/models/test_google.py index 0560dc883f..436a115efa 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -3149,7 +3149,9 @@ async def test_google_image_generation(allow_model_requests: None, google_provid result = await agent.run('Generate an image of an axolotl.') messages = result.all_messages() - assert result.output == snapshot(BinaryImage(data=IsBytes(), media_type='image/jpeg', _identifier='b6e95a')) + assert result.output == snapshot( + BinaryImage(data=IsBytes(), media_type='image/jpeg', _media_type='image/jpeg', _identifier='b6e95a') + ) assert messages == snapshot( [ ModelRequest( @@ -3167,6 +3169,7 @@ async def test_google_image_generation(allow_model_requests: None, google_provid content=BinaryImage( data=IsBytes(), media_type='image/jpeg', + _media_type='image/jpeg', _identifier='b6e95a', ), provider_details={'thought_signature': IsStr()}, @@ -3190,7 +3193,9 @@ async def test_google_image_generation(allow_model_requests: None, google_provid ) result = await agent.run('Now give it a sombrero.', message_history=messages) - assert result.output == snapshot(BinaryImage(data=IsBytes(), media_type='image/jpeg', _identifier='14bec0')) + assert result.output == snapshot( + BinaryImage(data=IsBytes(), media_type='image/jpeg', _media_type='image/jpeg', _identifier='14bec0') + ) assert result.new_messages() == snapshot( [ ModelRequest( @@ -3208,6 +3213,7 @@ async def test_google_image_generation(allow_model_requests: None, google_provid content=BinaryImage( data=IsBytes(), media_type='image/jpeg', + _media_type='image/jpeg', _identifier='14bec0', ), provider_details={'thought_signature': IsStr()}, @@ -3245,6 +3251,7 @@ async def test_google_image_generation_stream(allow_model_requests: None, google BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='9ff9cc', identifier='9ff9cc', ) @@ -3263,6 +3270,7 @@ async def test_google_image_generation_stream(allow_model_requests: None, google BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='2af2a7', identifier='2af2a7', ) @@ -3285,6 +3293,7 @@ async def test_google_image_generation_stream(allow_model_requests: None, google content=BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='2af2a7', identifier='2af2a7', ) @@ -3317,6 +3326,7 @@ async def test_google_image_generation_stream(allow_model_requests: None, google content=BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='2af2a7', ) ), @@ -3364,6 +3374,7 @@ async def test_google_image_generation_with_text(allow_model_requests: None, goo content=BinaryImage( data=IsBytes(), media_type='image/jpeg', + _media_type='image/jpeg', _identifier='00f2af', identifier=IsStr(), ), @@ -3403,6 +3414,7 @@ async def test_google_image_or_text_output(allow_model_requests: None, google_pr BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='f82faf', identifier='f82faf', ) @@ -3422,6 +3434,7 @@ async def test_google_image_and_text_output(allow_model_requests: None, google_p BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='67b12f', identifier='67b12f', ) @@ -3474,6 +3487,7 @@ class Animal(BaseModel): content=BinaryImage( data=IsBytes(), media_type='image/jpeg', + _media_type='image/jpeg', _identifier='4e5b3e', ), provider_details={'thought_signature': IsStr()}, @@ -3566,7 +3580,9 @@ async def test_google_image_generation_with_web_search(allow_model_requests: Non result = await agent.run( 'Visualize the current weather forecast for the next 5 days in Mexico City as a clean, modern weather chart. Add a visual on what I should wear each day' ) - assert result.output == snapshot(BinaryImage(data=IsBytes(), media_type='image/jpeg', _identifier='787c28')) + assert result.output == snapshot( + BinaryImage(data=IsBytes(), media_type='image/jpeg', _media_type='image/jpeg', _identifier='787c28') + ) assert result.all_messages() == snapshot( [ ModelRequest( @@ -3613,6 +3629,7 @@ async def test_google_image_generation_with_web_search(allow_model_requests: Non content=BinaryImage( data=IsBytes(), media_type='image/jpeg', + _media_type='image/jpeg', _identifier='787c28', ), provider_details={'thought_signature': IsStr()}, diff --git a/tests/models/test_mistral.py b/tests/models/test_mistral.py index dffcc5512f..533ae294d0 100644 --- a/tests/models/test_mistral.py +++ b/tests/models/test_mistral.py @@ -2044,7 +2044,7 @@ async def test_image_as_binary_content_input(allow_model_requests: None): UserPromptPart( content=[ 'hello', - BinaryContent(data=image_bytes, media_type='image/jpeg'), + BinaryContent(data=image_bytes, _media_type='image/jpeg', media_type='image/jpeg'), ], timestamp=IsDatetime(), ) @@ -2128,7 +2128,12 @@ async def test_pdf_as_binary_content_input(allow_model_requests: None): UserPromptPart( content=[ 'hello', - BinaryContent(data=base64_content, media_type='application/pdf', identifier='b9d976'), + BinaryContent( + data=base64_content, + _media_type='application/pdf', + media_type='application/pdf', + identifier='b9d976', + ), ], timestamp=IsDatetime(), ) diff --git a/tests/models/test_openai_responses.py b/tests/models/test_openai_responses.py index 18016ccf4c..a919d6d6da 100644 --- a/tests/models/test_openai_responses.py +++ b/tests/models/test_openai_responses.py @@ -3787,6 +3787,7 @@ async def test_openai_responses_code_execution_return_image(allow_model_requests BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='653a61', identifier='653a61', ) @@ -3847,6 +3848,7 @@ async def test_openai_responses_code_execution_return_image(allow_model_requests content=BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='653a61', identifier='653a61', ), @@ -3884,6 +3886,7 @@ async def test_openai_responses_code_execution_return_image(allow_model_requests BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='81863d', identifier='81863d', ) @@ -3992,6 +3995,7 @@ async def test_openai_responses_code_execution_return_image(allow_model_requests content=BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='81863d', identifier='81863d', ), @@ -4062,6 +4066,7 @@ async def test_openai_responses_code_execution_return_image_stream(allow_model_r BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='df0d78', identifier='df0d78', ) @@ -4095,6 +4100,7 @@ async def test_openai_responses_code_execution_return_image_stream(allow_model_r content=BinaryImage( data=IsBytes(), media_type='image/png', + _media_type='image/png', _identifier='df0d78', identifier='df0d78', ), @@ -5452,7 +5458,9 @@ async def test_openai_responses_code_execution_return_image_stream(allow_model_r PartStartEvent( index=2, part=FilePart( - content=BinaryImage(data=IsBytes(), media_type='image/png', _identifier='df0d78'), + content=BinaryImage( + data=IsBytes(), media_type='image/png', _media_type='image/png', _identifier='df0d78' + ), id='ci_06c1a26fd89d07f20068dd937636948197b6c45865da36d8f7', ), previous_part_kind='builtin-tool-call', @@ -5551,6 +5559,7 @@ async def test_openai_responses_image_generation(allow_model_requests: None, ope assert result.output == snapshot( BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='68b13f', ) @@ -5582,6 +5591,7 @@ async def test_openai_responses_image_generation(allow_model_requests: None, ope FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='68b13f', ), @@ -5624,6 +5634,7 @@ async def test_openai_responses_image_generation(allow_model_requests: None, ope assert result.output == snapshot( BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='2b4fea', ) @@ -5655,6 +5666,7 @@ async def test_openai_responses_image_generation(allow_model_requests: None, ope FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='2b4fea', ), @@ -5702,6 +5714,7 @@ async def test_openai_responses_image_generation_stream(allow_model_requests: No assert await result.get_output() == snapshot( BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='be46a2', ) @@ -5719,6 +5732,7 @@ async def test_openai_responses_image_generation_stream(allow_model_requests: No assert agent_run.result.output == snapshot( BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='69eaa4', ) @@ -5750,6 +5764,7 @@ async def test_openai_responses_image_generation_stream(allow_model_requests: No FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='69eaa4', ), @@ -5829,6 +5844,7 @@ async def test_openai_responses_image_generation_stream(allow_model_requests: No part=FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', ), id='ig_00d13c4dbac420df0068dd91af3070819f86da82a11b9239c2', @@ -5841,6 +5857,7 @@ async def test_openai_responses_image_generation_stream(allow_model_requests: No part=FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='69eaa4', ), @@ -5931,6 +5948,7 @@ async def test_openai_responses_image_generation_tool_without_image_output( FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='c51b7b', ), @@ -5989,6 +6007,7 @@ async def test_openai_responses_image_generation_tool_without_image_output( FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='c9d559', ), @@ -6036,6 +6055,7 @@ async def test_openai_responses_image_or_text_output(allow_model_requests: None, assert result.output == snapshot( BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='f77253', ) @@ -6052,6 +6072,7 @@ async def test_openai_responses_image_and_text_output(allow_model_requests: None [ BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='fbb409', ) @@ -6096,6 +6117,7 @@ class Animal(BaseModel): FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='918a98', ), @@ -6213,6 +6235,7 @@ class Animal(BaseModel): FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='4ed317', ), @@ -6287,6 +6310,7 @@ class Animal(BaseModel): FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='958792', ), @@ -6336,6 +6360,7 @@ async def get_animal() -> str: assert result.output == snapshot( BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='160d47', ) @@ -6397,6 +6422,7 @@ async def get_animal() -> str: FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='160d47', ), @@ -6440,6 +6466,7 @@ async def test_openai_responses_multiple_images(allow_model_requests: None, open assert result.output == snapshot( BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='2a8c51', ) @@ -6471,6 +6498,7 @@ async def test_openai_responses_multiple_images(allow_model_requests: None, open FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='2a8c51', ), @@ -6497,6 +6525,7 @@ async def test_openai_responses_multiple_images(allow_model_requests: None, open FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/png', media_type='image/png', identifier='dd7c41', ), @@ -6544,6 +6573,7 @@ async def test_openai_responses_image_generation_jpeg(allow_model_requests: None assert result.output == snapshot( BinaryImage( data=IsBytes(), + _media_type='image/jpeg', media_type='image/jpeg', identifier='df8cd2', ) @@ -6575,6 +6605,7 @@ async def test_openai_responses_image_generation_jpeg(allow_model_requests: None FilePart( content=BinaryImage( data=IsBytes(), + _media_type='image/jpeg', media_type='image/jpeg', identifier='df8cd2', ), diff --git a/tests/test_agent.py b/tests/test_agent.py index 6ce2d91c54..96687999b6 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -4707,8 +4707,10 @@ def test_tool_return_part_binary_content_serialization(): assert tool_return.model_response_object() == snapshot( { 'data': 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGNgYGAAAAAEAAH2FzgAAAAASUVORK5CYII=', - 'media_type': 'image/png', 'vendor_metadata': None, + '_media_type': 'image/png', + '_type': None, + '_extension': None, '_identifier': None, 'kind': 'binary', } @@ -4771,6 +4773,7 @@ def get_image() -> BinaryContent: BinaryContent( data=b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x02\x00\x00\x00\x90wS\xde\x00\x00\x00\x0cIDATx\x9cc```\x00\x00\x00\x04\x00\x01\xf6\x178\x00\x00\x00\x00IEND\xaeB`\x82', media_type='image/png', + _media_type='image/png', _identifier='image_id_1', ), ], diff --git a/tests/test_agent_output_schemas.py b/tests/test_agent_output_schemas.py index 5c63343126..4a322d9161 100644 --- a/tests/test_agent_output_schemas.py +++ b/tests/test_agent_output_schemas.py @@ -239,29 +239,19 @@ async def test_image_output_json_schema(): 'properties': { 'data': {'format': 'binary', 'title': 'Data', 'type': 'string'}, 'media_type': { - 'anyOf': [ - { - 'enum': ['audio/wav', 'audio/mpeg', 'audio/ogg', 'audio/flac', 'audio/aiff', 'audio/aac'], - 'type': 'string', - }, - {'enum': ['image/jpeg', 'image/png', 'image/gif', 'image/webp'], 'type': 'string'}, - { - 'enum': [ - 'application/pdf', - 'text/plain', - 'text/csv', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'text/html', - 'text/markdown', - 'application/msword', - 'application/vnd.ms-excel', - ], - 'type': 'string', - }, - {'type': 'string'}, - ], + 'description': """\ +The media type of the binary content. + +Automatically detects the media type using: +1. Magika (preferred, more accurate for documents) +2. python-magic (fallback) + +Raises: + ImportError: If neither magika nor python-magic is installed.\ +""", + 'readOnly': True, 'title': 'Media Type', + 'type': 'string', }, 'vendor_metadata': { 'anyOf': [{'additionalProperties': True, 'type': 'object'}, {'type': 'null'}], @@ -288,7 +278,7 @@ async def test_image_output_json_schema(): 'type': 'string', }, }, - 'required': ['data', 'media_type', 'identifier'], + 'required': ['data', 'identifier', 'media_type'], 'title': 'BinaryImage', 'type': 'object', } @@ -305,36 +295,19 @@ async def test_image_output_json_schema(): 'properties': { 'data': {'format': 'binary', 'title': 'Data', 'type': 'string'}, 'media_type': { - 'anyOf': [ - { - 'enum': [ - 'audio/wav', - 'audio/mpeg', - 'audio/ogg', - 'audio/flac', - 'audio/aiff', - 'audio/aac', - ], - 'type': 'string', - }, - {'enum': ['image/jpeg', 'image/png', 'image/gif', 'image/webp'], 'type': 'string'}, - { - 'enum': [ - 'application/pdf', - 'text/plain', - 'text/csv', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'text/html', - 'text/markdown', - 'application/msword', - 'application/vnd.ms-excel', - ], - 'type': 'string', - }, - {'type': 'string'}, - ], + 'description': """\ +The media type of the binary content. + +Automatically detects the media type using: +1. Magika (preferred, more accurate for documents) +2. python-magic (fallback) + +Raises: + ImportError: If neither magika nor python-magic is installed.\ +""", + 'readOnly': True, 'title': 'Media Type', + 'type': 'string', }, 'vendor_metadata': { 'anyOf': [{'additionalProperties': True, 'type': 'object'}, {'type': 'null'}], @@ -361,7 +334,7 @@ async def test_image_output_json_schema(): 'type': 'string', }, }, - 'required': ['data', 'media_type', 'identifier'], + 'required': ['data', 'identifier', 'media_type'], 'title': 'BinaryImage', 'type': 'object', }, @@ -442,36 +415,19 @@ async def test_deferred_output_json_schema(): 'properties': { 'data': {'format': 'binary', 'title': 'Data', 'type': 'string'}, 'media_type': { - 'anyOf': [ - { - 'enum': [ - 'audio/wav', - 'audio/mpeg', - 'audio/ogg', - 'audio/flac', - 'audio/aiff', - 'audio/aac', - ], - 'type': 'string', - }, - {'enum': ['image/jpeg', 'image/png', 'image/gif', 'image/webp'], 'type': 'string'}, - { - 'enum': [ - 'application/pdf', - 'text/plain', - 'text/csv', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'text/html', - 'text/markdown', - 'application/msword', - 'application/vnd.ms-excel', - ], - 'type': 'string', - }, - {'type': 'string'}, - ], + 'description': """\ +The media type of the binary content. + +Automatically detects the media type using: +1. Magika (preferred, more accurate for documents) +2. python-magic (fallback) + +Raises: + ImportError: If neither magika nor python-magic is installed.\ +""", + 'readOnly': True, 'title': 'Media Type', + 'type': 'string', }, 'vendor_metadata': { 'anyOf': [{'additionalProperties': True, 'type': 'object'}, {'type': 'null'}], @@ -498,7 +454,7 @@ async def test_deferred_output_json_schema(): 'type': 'string', }, }, - 'required': ['data', 'media_type', 'identifier'], + 'required': ['data', 'identifier', 'media_type'], 'title': 'BinaryImage', 'type': 'object', }, diff --git a/tests/test_fastmcp.py b/tests/test_fastmcp.py index 1e504692b6..8643c4e897 100644 --- a/tests/test_fastmcp.py +++ b/tests/test_fastmcp.py @@ -338,7 +338,9 @@ async def test_call_tool_with_binary_content( ) assert result == snapshot( - BinaryContent(data=b'fake_image_data', media_type='image/png', identifier='427d68') + BinaryContent( + data=b'fake_image_data', _media_type='image/png', media_type='image/png', identifier='427d68' + ) ) async def test_call_tool_with_audio_content( @@ -354,7 +356,9 @@ async def test_call_tool_with_audio_content( result = await fastmcp_toolset.call_tool(name='audio_tool', tool_args={}, ctx=run_context, tool=audio_tool) assert result == snapshot( - BinaryContent(data=b'fake_audio_data', media_type='audio/mpeg', identifier='f1220f') + BinaryContent( + data=b'fake_audio_data', _media_type='audio/mpeg', media_type='audio/mpeg', identifier='f1220f' + ) ) async def test_call_tool_with_text_content( @@ -471,7 +475,11 @@ async def test_call_tool_with_resource_tool_blob( tool=resource_tool_blob, ) - assert result == snapshot(BinaryContent(data=b'Hello World', media_type='application/octet-stream')) + assert result == snapshot( + BinaryContent( + data=b'Hello World', _media_type='application/octet-stream', media_type='application/octet-stream' + ) + ) async def test_call_tool_with_error_behavior_raise( self, diff --git a/tests/test_mcp.py b/tests/test_mcp.py index 02bab17cc3..8d8f4b7bd0 100644 --- a/tests/test_mcp.py +++ b/tests/test_mcp.py @@ -1528,7 +1528,11 @@ def test_map_from_mcp_params_model_request(): parts=[ UserPromptPart(content='xx', timestamp=IsNow(tz=timezone.utc)), UserPromptPart( - content=[BinaryContent(data=b'img', media_type='image/png', identifier='978ea7')], + content=[ + BinaryContent( + data=b'img', _media_type='image/png', media_type='image/png', identifier='978ea7' + ) + ], timestamp=IsNow(tz=timezone.utc), ), ] diff --git a/tests/test_messages.py b/tests/test_messages.py index e10f9d9d55..c5b7e4a080 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -180,7 +180,7 @@ def test_audio_url(audio_url: AudioUrl, media_type: str, format: str): def test_audio_url_invalid(): - with pytest.raises(ValueError, match='Could not infer media type from audio URL: foobar.potato'): + with pytest.raises(ValueError, match='Could not infer media type from URL: foobar.potato'): AudioUrl('foobar.potato').media_type @@ -200,10 +200,10 @@ def test_image_url_formats(image_url: ImageUrl, media_type: str, format: str): def test_image_url_invalid(): - with pytest.raises(ValueError, match='Could not infer media type from image URL: foobar.potato'): + with pytest.raises(ValueError, match='Could not infer media type from URL: foobar.potato'): ImageUrl('foobar.potato').media_type - with pytest.raises(ValueError, match='Could not infer media type from image URL: foobar.potato'): + with pytest.raises(ValueError, match='Could not infer media type from URL: foobar.potato'): ImageUrl('foobar.potato').format @@ -241,12 +241,9 @@ def test_document_url_formats(document_url: DocumentUrl, media_type: str, format def test_document_url_invalid(): - with pytest.raises(ValueError, match='Could not infer media type from document URL: foobar.potato'): + with pytest.raises(ValueError, match='Could not infer media type from URL: foobar.potato'): DocumentUrl('foobar.potato').media_type - with pytest.raises(ValueError, match='Unknown document media type: text/x-python'): - DocumentUrl('foobar.py').format - def test_binary_content_unknown_media_type(): with pytest.raises(ValueError, match='Unknown media type: application/custom'): @@ -336,7 +333,7 @@ def test_video_url_formats(video_url: VideoUrl, media_type: str, format: str): def test_video_url_invalid(): - with pytest.raises(ValueError, match='Could not infer media type from video URL: foobar.potato'): + with pytest.raises(ValueError, match='Could not infer media type from URL: foobar.potato'): VideoUrl('foobar.potato').media_type @@ -582,8 +579,12 @@ def test_model_response_convenience_methods(): And then, call the 'hello_world' tool\ """) - assert response.files == snapshot([BinaryImage(data=b'fake', media_type='image/jpeg', identifier='c053ec')]) - assert response.images == snapshot([BinaryImage(data=b'fake', media_type='image/jpeg', identifier='c053ec')]) + assert response.files == snapshot( + [BinaryImage(data=b'fake', _media_type='image/jpeg', media_type='image/jpeg', identifier='c053ec')] + ) + assert response.images == snapshot( + [BinaryImage(data=b'fake', _media_type='image/jpeg', media_type='image/jpeg', identifier='c053ec')] + ) assert response.tool_calls == snapshot([ToolCallPart(tool_name='hello_world', args={}, tool_call_id='123')]) assert response.builtin_tool_calls == snapshot( [ @@ -618,7 +619,11 @@ def test_image_url_validation_with_optional_identifier(): ) image = image_url_ta.validate_python( - {'url': 'https://example.com/image.jpg', 'identifier': 'foo', 'media_type': 'image/png'} + { + 'url': 'https://example.com/image.jpg', + 'identifier': 'foo', + 'media_type': 'image/png', + } ) assert image.url == snapshot('https://example.com/image.jpg') assert image.identifier == snapshot('foo') @@ -652,7 +657,11 @@ def test_binary_content_validation_with_optional_identifier(): ) binary_content = binary_content_ta.validate_python( - {'data': b'fake', 'identifier': 'foo', 'media_type': 'image/png'} + { + 'data': b'fake', + 'identifier': 'foo', + 'media_type': 'image/png', + } ) assert binary_content.data == b'fake' assert binary_content.identifier == snapshot('foo') @@ -685,19 +694,30 @@ def test_binary_content_from_path(tmp_path: Path): test_unknown_file = tmp_path / 'test.unknownext' test_unknown_file.write_text('some content', encoding='utf-8') binary_content = BinaryContent.from_path(test_unknown_file) - assert binary_content == snapshot(BinaryContent(data=b'some content', media_type='application/octet-stream')) + assert binary_content == snapshot( + BinaryContent( + data=b'some content', _media_type='application/octet-stream', media_type='application/octet-stream' + ) + ) # test string path test_txt_file = tmp_path / 'test.txt' test_txt_file.write_text('just some text', encoding='utf-8') string_path = test_txt_file.as_posix() binary_content = BinaryContent.from_path(string_path) # pyright: ignore[reportArgumentType] - assert binary_content == snapshot(BinaryContent(data=b'just some text', media_type='text/plain')) + assert binary_content == snapshot( + BinaryContent(data=b'just some text', _media_type='text/plain', media_type='text/plain') + ) # test image file test_jpg_file = tmp_path / 'test.jpg' test_jpg_file.write_bytes(b'\xff\xd8\xff\xe0' + b'0' * 100) # minimal JPEG header + padding binary_content = BinaryContent.from_path(test_jpg_file) assert binary_content == snapshot( - BinaryImage(data=b'\xff\xd8\xff\xe0' + b'0' * 100, media_type='image/jpeg', _identifier='bc8d49') + BinaryImage( + data=b'\xff\xd8\xff\xe0' + b'0' * 100, + media_type='image/jpeg', + _media_type='image/jpeg', + _identifier='bc8d49', + ) ) diff --git a/tests/test_vercel_ai.py b/tests/test_vercel_ai.py index 0e191d445d..9528cfeb0c 100644 --- a/tests/test_vercel_ai.py +++ b/tests/test_vercel_ai.py @@ -1856,7 +1856,9 @@ async def test_adapter_load_messages(): UserPromptPart( content=[ 'Here are some files:', - BinaryImage(data=b'fake', media_type='image/png', _identifier='c053ec'), + BinaryImage( + data=b'fake', media_type='image/png', _media_type='image/png', _identifier='c053ec' + ), ImageUrl(url='https://example.com/image.png', _media_type='image/png'), VideoUrl(url='https://example.com/video.mp4', _media_type='video/mp4'), AudioUrl(url='https://example.com/audio.mp3', _media_type='audio/mpeg'), @@ -1870,7 +1872,11 @@ async def test_adapter_load_messages(): parts=[ ThinkingPart(content='I should tell the user how nice those files are and share another one'), TextPart(content='Nice files, here is another one:'), - FilePart(content=BinaryImage(data=b'fake', media_type='image/png', _identifier='c053ec')), + FilePart( + content=BinaryImage( + data=b'fake', media_type='image/png', _media_type='image/png', _identifier='c053ec' + ) + ), ], timestamp=IsDatetime(), ), @@ -1974,7 +1980,9 @@ async def test_adapter_load_messages(): TextPart( content='Here are the Table of Contents for both repositories:... Both products are designed to work together - Pydantic AI for building AI agents and Logfire for observing and monitoring them in production.' ), - FilePart(content=BinaryContent(data=b'fake', media_type='application/pdf')), + FilePart( + content=BinaryContent(data=b'fake', _media_type='application/pdf', media_type='application/pdf') + ), ToolCallPart( tool_name='get_table_of_contents', args={'repo': 'pydantic'}, tool_call_id='toolu_01XX3rjFfG77h' ), diff --git a/uv.lock b/uv.lock index 75bc6b08fb..42dcda2231 100644 --- a/uv.lock +++ b/uv.lock @@ -2,14 +2,22 @@ version = 1 revision = 3 requires-python = ">=3.10" resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] [manifest] @@ -764,11 +772,16 @@ name = "cffi" version = "1.17.1" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "pycparser", marker = "python_full_version < '3.11' or platform_python_implementation == 'PyPy'" }, @@ -828,9 +841,12 @@ name = "cffi" version = "2.0.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "pycparser", marker = "python_full_version >= '3.11' and implementation_name != 'PyPy' and platform_python_implementation != 'PyPy'" }, @@ -914,9 +930,9 @@ wheels = [ name = "chardet" version = "5.2.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7", size = 2069618, upload-time = "2023-08-01T19:23:02.662Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" } wheels = [ - { url = "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970", size = 199385, upload-time = "2023-08-01T19:23:00.661Z" }, + { url = "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970" }, ] [[package]] @@ -1041,6 +1057,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] +[[package]] +name = "coloredlogs" +version = "15.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "humanfriendly" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cc/c7/eed8f27100517e8c0e6b923d5f0845d0cb99763da6fdee00478f91db7325/coloredlogs-15.0.1.tar.gz", hash = "sha256:7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0", size = 278520, upload-time = "2021-06-11T10:22:45.202Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a7/06/3d6badcf13db419e25b07041d9c7b4a2c331d3f4e7134445ec5df57714cd/coloredlogs-15.0.1-py2.py3-none-any.whl", hash = "sha256:612ee75c546f53e92e70049c9dbfcc18c935a2b9a53b66085ce9ef6a6e5c0934", size = 46018, upload-time = "2021-06-11T10:22:42.561Z" }, +] + [[package]] name = "compressed-tensors" version = "0.11.0" @@ -1174,8 +1202,10 @@ name = "cryptography" version = "45.0.7" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "cffi", version = "1.17.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11' and platform_python_implementation != 'PyPy'" }, @@ -1225,12 +1255,18 @@ name = "cryptography" version = "46.0.2" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "cffi", version = "2.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11' and platform_python_implementation != 'PyPy'" }, @@ -1419,9 +1455,9 @@ wheels = [ name = "defusedxml" version = "0.7.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69", size = 75520, upload-time = "2021-03-08T10:59:26.269Z" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" } wheels = [ - { url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61", size = 25604, upload-time = "2021-03-08T10:59:24.45Z" }, + { url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61" }, ] [[package]] @@ -1446,9 +1482,9 @@ dependencies = [ { name = "executing" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/84/75/b78198620640d394bc435c17bb49db18419afdd6cfa3ed8bcfe14034ec80/devtools-0.12.2.tar.gz", hash = "sha256:efceab184cb35e3a11fa8e602cc4fadacaa2e859e920fc6f87bf130b69885507", size = 75005, upload-time = "2023-09-03T16:57:00.679Z" } +sdist = { url = "https://files.pythonhosted.org/packages/84/75/b78198620640d394bc435c17bb49db18419afdd6cfa3ed8bcfe14034ec80/devtools-0.12.2.tar.gz", hash = "sha256:efceab184cb35e3a11fa8e602cc4fadacaa2e859e920fc6f87bf130b69885507" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/ae/afb1487556e2dc827a17097aac8158a25b433a345386f0e249f6d2694ccb/devtools-0.12.2-py3-none-any.whl", hash = "sha256:c366e3de1df4cdd635f1ad8cbcd3af01a384d7abda71900e68d43b04eb6aaca7", size = 19411, upload-time = "2023-09-03T16:56:59.049Z" }, + { url = "https://files.pythonhosted.org/packages/d1/ae/afb1487556e2dc827a17097aac8158a25b433a345386f0e249f6d2694ccb/devtools-0.12.2-py3-none-any.whl", hash = "sha256:c366e3de1df4cdd635f1ad8cbcd3af01a384d7abda71900e68d43b04eb6aaca7" }, ] [[package]] @@ -1488,9 +1524,9 @@ wheels = [ name = "diskcache" version = "5.6.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz", hash = "sha256:2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc", size = 67916, upload-time = "2023-08-31T06:12:00.316Z" } +sdist = { url = "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz", hash = "sha256:2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3f/27/4570e78fc0bf5ea0ca45eb1de3818a23787af9b390c0b0a0033a1b8236f9/diskcache-5.6.3-py3-none-any.whl", hash = "sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19", size = 45550, upload-time = "2023-08-31T06:11:58.822Z" }, + { url = "https://files.pythonhosted.org/packages/3f/27/4570e78fc0bf5ea0ca45eb1de3818a23787af9b390c0b0a0033a1b8236f9/diskcache-5.6.3-py3-none-any.whl", hash = "sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19" }, ] [[package]] @@ -1831,6 +1867,14 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/89/ec/00d68c4ddfedfe64159999e5f8a98fb8442729a63e2077eb9dcd89623d27/filelock-3.17.0-py3-none-any.whl", hash = "sha256:533dc2f7ba78dc2f0f531fc6c4940addf7b70a481e269a5a3b93be94ffbe8338", size = 16164, upload-time = "2025-01-21T20:04:47.734Z" }, ] +[[package]] +name = "flatbuffers" +version = "25.12.19" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e8/2d/d2a548598be01649e2d46231d151a6c56d10b964d94043a335ae56ea2d92/flatbuffers-25.12.19-py2.py3-none-any.whl", hash = "sha256:7634f50c427838bb021c2d66a3d1168e9d199b0607e6329399f04846d42e20b4", size = 26661, upload-time = "2025-12-19T23:16:13.622Z" }, +] + [[package]] name = "frozendict" version = "2.4.6" @@ -2348,10 +2392,14 @@ name = "huggingface-hub" version = "0.33.5" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "filelock", marker = "python_full_version >= '3.12'" }, @@ -2378,10 +2426,14 @@ name = "huggingface-hub" version = "0.36.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "filelock", marker = "python_full_version < '3.12'" }, @@ -2403,6 +2455,18 @@ inference = [ { name = "aiohttp", marker = "python_full_version < '3.12'" }, ] +[[package]] +name = "humanfriendly" +version = "10.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyreadline3", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz", hash = "sha256:6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc", size = 360702, upload-time = "2021-09-17T21:40:43.31Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f0/0f/310fb31e39e2d734ccaa2c0fb981ee41f7bd5056ce9bc29b2248bd569169/humanfriendly-10.0-py2.py3-none-any.whl", hash = "sha256:1697e1a8a8f550fd43c2865cd84542fc175a61dcb779b6fee18cf6b6ccba1477", size = 86794, upload-time = "2021-09-17T21:40:39.897Z" }, +] + [[package]] name = "humanize" version = "4.13.0" @@ -2514,9 +2578,9 @@ dependencies = [ { name = "humanize" }, { name = "jinja2" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/74/77/0bba383819dd4e67566487c11c49479ced87e77c3285d8e7f7a3401cf882/jinja2_humanize_extension-0.4.0.tar.gz", hash = "sha256:e7d69b1c20f32815bbec722330ee8af14b1287bb1c2b0afa590dbf031cadeaa0", size = 4746, upload-time = "2023-09-01T12:52:42.781Z" } +sdist = { url = "https://files.pythonhosted.org/packages/74/77/0bba383819dd4e67566487c11c49479ced87e77c3285d8e7f7a3401cf882/jinja2_humanize_extension-0.4.0.tar.gz", hash = "sha256:e7d69b1c20f32815bbec722330ee8af14b1287bb1c2b0afa590dbf031cadeaa0" } wheels = [ - { url = "https://files.pythonhosted.org/packages/26/b4/08c9d297edd5e1182506edecccbb88a92e1122a057953068cadac420ca5d/jinja2_humanize_extension-0.4.0-py3-none-any.whl", hash = "sha256:b6326e2da0f7d425338bebf58848e830421defbce785f12ae812e65128518156", size = 4769, upload-time = "2023-09-01T12:52:41.098Z" }, + { url = "https://files.pythonhosted.org/packages/26/b4/08c9d297edd5e1182506edecccbb88a92e1122a057953068cadac420ca5d/jinja2_humanize_extension-0.4.0-py3-none-any.whl", hash = "sha256:b6326e2da0f7d425338bebf58848e830421defbce785f12ae812e65128518156" }, ] [[package]] @@ -2632,9 +2696,9 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "jsonpointer" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz", hash = "sha256:9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c", size = 21699, upload-time = "2023-06-26T12:07:29.144Z" } +sdist = { url = "https://files.pythonhosted.org/packages/42/78/18813351fe5d63acad16aec57f94ec2b70a09e53ca98145589e185423873/jsonpatch-1.33.tar.gz", hash = "sha256:9fcd4009c41e6d12348b4a0ff2563ba56a2923a7dfee731d004e212e1ee5030c" } wheels = [ - { url = "https://files.pythonhosted.org/packages/73/07/02e16ed01e04a374e644b575638ec7987ae846d25ad97bcc9945a3ee4b0e/jsonpatch-1.33-py2.py3-none-any.whl", hash = "sha256:0ae28c0cd062bbd8b8ecc26d7d164fbbea9652a1a3693f3b956c1eae5145dade", size = 12898, upload-time = "2023-06-16T21:01:28.466Z" }, + { url = "https://files.pythonhosted.org/packages/73/07/02e16ed01e04a374e644b575638ec7987ae846d25ad97bcc9945a3ee4b0e/jsonpatch-1.33-py2.py3-none-any.whl", hash = "sha256:0ae28c0cd062bbd8b8ecc26d7d164fbbea9652a1a3693f3b956c1eae5145dade" }, ] [[package]] @@ -2783,10 +2847,14 @@ name = "llvmlite" version = "0.44.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] sdist = { url = "https://files.pythonhosted.org/packages/89/6a/95a3d3610d5c75293d5dbbb2a76480d5d4eeba641557b69fe90af6c5b84e/llvmlite-0.44.0.tar.gz", hash = "sha256:07667d66a5d150abed9157ab6c0b9393c9356f229784a4385c02f99e94fc94d4", size = 171880, upload-time = "2025-01-20T11:14:41.342Z" } wheels = [ @@ -2817,10 +2885,14 @@ name = "llvmlite" version = "0.45.1" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] sdist = { url = "https://files.pythonhosted.org/packages/99/8d/5baf1cef7f9c084fb35a8afbde88074f0d6a727bc63ef764fe0e7543ba40/llvmlite-0.45.1.tar.gz", hash = "sha256:09430bb9d0bb58fc45a45a57c7eae912850bedc095cd0810a57de109c69e1c32", size = 185600, upload-time = "2025-10-01T17:59:52.046Z" } wheels = [ @@ -2985,6 +3057,24 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/83/29/00b9b0322a473aee6cda87473401c9abb19506cd650cc69a8aa38277ea74/lxml-5.3.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:48fd46bf7155def2e15287c6f2b133a2f78e2d22cdf55647269977b873c65499", size = 3487718, upload-time = "2025-02-10T07:50:31.231Z" }, ] +[[package]] +name = "magika" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "numpy" }, + { name = "onnxruntime" }, + { name = "python-dotenv" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/72/1a/d2cedf4e7fe98d62f444b17925eb9e61664e0225ceb27f39e30b73409404/magika-1.0.1.tar.gz", hash = "sha256:313f8cbfcdc9a7e55c24286273230a2732b89825e58a93de2b576531393b8398", size = 3042821, upload-time = "2025-10-31T11:40:45.437Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3d/d9/7a1a5b8148ae56782f9b7f600c10faa7c08fae07420364fc2097176531b7/magika-1.0.1-py3-none-any.whl", hash = "sha256:efb384e87ee779c40f2343d33ff38cded807d71a9e228e7c1fabf2a988831369", size = 2969471, upload-time = "2025-10-31T11:40:34.419Z" }, + { url = "https://files.pythonhosted.org/packages/cf/54/b2bd0d96293afb47570eeadd6506977f70df6a1f1a08e897c07225bde717/magika-1.0.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:efd29299bf577227dd6b2c895a1bb2fac5b012f48492c95fc23eb5e037f0d12b", size = 13359422, upload-time = "2025-10-31T11:40:36.62Z" }, + { url = "https://files.pythonhosted.org/packages/d7/98/936f2393de5d2d687ee256b41c5db67e07732b12b07777b79552321befb9/magika-1.0.1-py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:69457018fc4e5030523b6505e3c8d58e24d0a01985c21ba1ea9387f84e9138d0", size = 15363783, upload-time = "2025-10-31T11:40:39.032Z" }, + { url = "https://files.pythonhosted.org/packages/af/a6/4a71d6d1b0c9f076f811089fc693d5ddcc419695bf41869a710e84307413/magika-1.0.1-py3-none-win_amd64.whl", hash = "sha256:1697e89aa338ea43b389c46652d0c96485e9ec2b72e8562c7d13ec31ff946911", size = 12692654, upload-time = "2025-10-31T11:40:43.299Z" }, +] + [[package]] name = "mako" version = "1.3.10" @@ -3293,9 +3383,9 @@ imaging = [ name = "mkdocs-material-extensions" version = "1.3.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/79/9b/9b4c96d6593b2a541e1cb8b34899a6d021d208bb357042823d4d2cabdbe7/mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443", size = 11847, upload-time = "2023-11-22T19:09:45.208Z" } +sdist = { url = "https://files.pythonhosted.org/packages/79/9b/9b4c96d6593b2a541e1cb8b34899a6d021d208bb357042823d4d2cabdbe7/mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31", size = 8728, upload-time = "2023-11-22T19:09:43.465Z" }, + { url = "https://files.pythonhosted.org/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31" }, ] [[package]] @@ -3685,8 +3775,10 @@ name = "networkx" version = "3.4.2" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] sdist = { url = "https://files.pythonhosted.org/packages/fd/1d/06475e1cd5264c0b870ea2cc6fdb3e37177c1e565c43f56ff17a10e3937f/networkx-3.4.2.tar.gz", hash = "sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1", size = 2151368, upload-time = "2024-10-21T12:39:38.695Z" } wheels = [ @@ -3698,12 +3790,18 @@ name = "networkx" version = "3.5" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] sdist = { url = "https://files.pythonhosted.org/packages/6c/4f/ccdb8ad3a38e583f214547fd2f7ff1fc160c43a75af88e6aec213404b96a/networkx-3.5.tar.gz", hash = "sha256:d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037", size = 2471065, upload-time = "2025-05-29T11:35:07.804Z" } wheels = [ @@ -3762,10 +3860,14 @@ name = "numba" version = "0.61.2" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "llvmlite", version = "0.44.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, @@ -3800,10 +3902,14 @@ name = "numba" version = "0.62.1" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "llvmlite", version = "0.45.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, @@ -3932,7 +4038,7 @@ name = "nvidia-cudnn-cu12" version = "9.10.2.21" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-cublas-cu12" }, + { name = "nvidia-cublas-cu12", marker = "sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/ba/51/e123d997aa098c61d029f76663dedbfb9bc8dcf8c60cbd6adbe42f76d049/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8", size = 706758467, upload-time = "2025-06-06T21:54:08.597Z" }, @@ -3943,7 +4049,7 @@ name = "nvidia-cufft-cu12" version = "11.3.3.83" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12" }, + { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/1f/13/ee4e00f30e676b66ae65b4f08cb5bcbb8392c03f54f2d5413ea99a5d1c80/nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74", size = 193118695, upload-time = "2025-03-07T01:45:27.821Z" }, @@ -3970,9 +4076,9 @@ name = "nvidia-cusolver-cu12" version = "11.7.3.90" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-cublas-cu12" }, - { name = "nvidia-cusparse-cu12" }, - { name = "nvidia-nvjitlink-cu12" }, + { name = "nvidia-cublas-cu12", marker = "sys_platform != 'win32'" }, + { name = "nvidia-cusparse-cu12", marker = "sys_platform != 'win32'" }, + { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/85/48/9a13d2975803e8cf2777d5ed57b87a0b6ca2cc795f9a4f59796a910bfb80/nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450", size = 267506905, upload-time = "2025-03-07T01:47:16.273Z" }, @@ -3983,7 +4089,7 @@ name = "nvidia-cusparse-cu12" version = "12.5.8.93" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "nvidia-nvjitlink-cu12" }, + { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/c2/f5/e1854cb2f2bcd4280c44736c93550cc300ff4b8c95ebe370d0aa7d2b473d/nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b", size = 288216466, upload-time = "2025-03-07T01:48:13.779Z" }, @@ -4002,10 +4108,10 @@ name = "nvidia-nccl-cu12" version = "2.27.3" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] wheels = [ { url = "https://files.pythonhosted.org/packages/5c/5b/4e4fff7bad39adf89f735f2bc87248c81db71205b62bcc0d5ca5b606b3c3/nvidia_nccl_cu12-2.27.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adf27ccf4238253e0b826bce3ff5fa532d65fc42322c8bfdfaf28024c0fbe039", size = 322364134, upload-time = "2025-06-03T21:58:04.013Z" }, @@ -4016,10 +4122,10 @@ name = "nvidia-nccl-cu12" version = "2.27.5" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] wheels = [ { url = "https://files.pythonhosted.org/packages/6e/89/f7a07dc961b60645dbbf42e80f2bc85ade7feb9a491b11a1e973aa00071f/nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ad730cf15cb5d25fe849c6e6ca9eb5b76db16a80f13f425ac68d8e2e55624457", size = 322348229, upload-time = "2025-06-26T04:11:28.385Z" }, @@ -4058,6 +4164,42 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/be/9c/92789c596b8df838baa98fa71844d84283302f7604ed565dafe5a6b5041a/oauthlib-3.3.1-py3-none-any.whl", hash = "sha256:88119c938d2b8fb88561af5f6ee0eec8cc8d552b7bb1f712743136eb7523b7a1", size = 160065, upload-time = "2025-06-19T22:48:06.508Z" }, ] +[[package]] +name = "onnxruntime" +version = "1.20.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "coloredlogs" }, + { name = "flatbuffers" }, + { name = "numpy" }, + { name = "packaging" }, + { name = "protobuf" }, + { name = "sympy" }, +] +wheels = [ + { url = "https://files.pythonhosted.org/packages/4e/28/99f903b0eb1cd6f3faa0e343217d9fb9f47b84bca98bd9859884631336ee/onnxruntime-1.20.1-cp310-cp310-macosx_13_0_universal2.whl", hash = "sha256:e50ba5ff7fed4f7d9253a6baf801ca2883cc08491f9d32d78a80da57256a5439", size = 30996314, upload-time = "2024-11-21T00:48:31.43Z" }, + { url = "https://files.pythonhosted.org/packages/6d/c6/c4c0860bee2fde6037bdd9dcd12d323f6e38cf00fcc9a5065b394337fc55/onnxruntime-1.20.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7b2908b50101a19e99c4d4e97ebb9905561daf61829403061c1adc1b588bc0de", size = 11954010, upload-time = "2024-11-21T00:48:35.254Z" }, + { url = "https://files.pythonhosted.org/packages/63/47/3dc0b075ab539f16b3d8b09df6b504f51836086ee709690a6278d791737d/onnxruntime-1.20.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d82daaec24045a2e87598b8ac2b417b1cce623244e80e663882e9fe1aae86410", size = 13330452, upload-time = "2024-11-21T00:48:40.02Z" }, + { url = "https://files.pythonhosted.org/packages/27/ef/80fab86289ecc01a734b7ddf115dfb93d8b2e004bd1e1977e12881c72b12/onnxruntime-1.20.1-cp310-cp310-win32.whl", hash = "sha256:4c4b251a725a3b8cf2aab284f7d940c26094ecd9d442f07dd81ab5470e99b83f", size = 9813849, upload-time = "2024-11-21T00:48:43.569Z" }, + { url = "https://files.pythonhosted.org/packages/a9/e6/33ab10066c9875a29d55e66ae97c3bf91b9b9b987179455d67c32261a49c/onnxruntime-1.20.1-cp310-cp310-win_amd64.whl", hash = "sha256:d3b616bb53a77a9463707bb313637223380fc327f5064c9a782e8ec69c22e6a2", size = 11329702, upload-time = "2024-11-21T00:48:46.599Z" }, + { url = "https://files.pythonhosted.org/packages/95/8d/2634e2959b34aa8a0037989f4229e9abcfa484e9c228f99633b3241768a6/onnxruntime-1.20.1-cp311-cp311-macosx_13_0_universal2.whl", hash = "sha256:06bfbf02ca9ab5f28946e0f912a562a5f005301d0c419283dc57b3ed7969bb7b", size = 30998725, upload-time = "2024-11-21T00:48:51.013Z" }, + { url = "https://files.pythonhosted.org/packages/a5/da/c44bf9bd66cd6d9018a921f053f28d819445c4d84b4dd4777271b0fe52a2/onnxruntime-1.20.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f6243e34d74423bdd1edf0ae9596dd61023b260f546ee17d701723915f06a9f7", size = 11955227, upload-time = "2024-11-21T00:48:54.556Z" }, + { url = "https://files.pythonhosted.org/packages/11/ac/4120dfb74c8e45cce1c664fc7f7ce010edd587ba67ac41489f7432eb9381/onnxruntime-1.20.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5eec64c0269dcdb8d9a9a53dc4d64f87b9e0c19801d9321246a53b7eb5a7d1bc", size = 13331703, upload-time = "2024-11-21T00:48:57.97Z" }, + { url = "https://files.pythonhosted.org/packages/12/f1/cefacac137f7bb7bfba57c50c478150fcd3c54aca72762ac2c05ce0532c1/onnxruntime-1.20.1-cp311-cp311-win32.whl", hash = "sha256:a19bc6e8c70e2485a1725b3d517a2319603acc14c1f1a017dda0afe6d4665b41", size = 9813977, upload-time = "2024-11-21T00:49:00.519Z" }, + { url = "https://files.pythonhosted.org/packages/2c/2d/2d4d202c0bcfb3a4cc2b171abb9328672d7f91d7af9ea52572722c6d8d96/onnxruntime-1.20.1-cp311-cp311-win_amd64.whl", hash = "sha256:8508887eb1c5f9537a4071768723ec7c30c28eb2518a00d0adcd32c89dea3221", size = 11329895, upload-time = "2024-11-21T00:49:03.845Z" }, + { url = "https://files.pythonhosted.org/packages/e5/39/9335e0874f68f7d27103cbffc0e235e32e26759202df6085716375c078bb/onnxruntime-1.20.1-cp312-cp312-macosx_13_0_universal2.whl", hash = "sha256:22b0655e2bf4f2161d52706e31f517a0e54939dc393e92577df51808a7edc8c9", size = 31007580, upload-time = "2024-11-21T00:49:07.029Z" }, + { url = "https://files.pythonhosted.org/packages/c5/9d/a42a84e10f1744dd27c6f2f9280cc3fb98f869dd19b7cd042e391ee2ab61/onnxruntime-1.20.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f1f56e898815963d6dc4ee1c35fc6c36506466eff6d16f3cb9848cea4e8c8172", size = 11952833, upload-time = "2024-11-21T00:49:10.563Z" }, + { url = "https://files.pythonhosted.org/packages/47/42/2f71f5680834688a9c81becbe5c5bb996fd33eaed5c66ae0606c3b1d6a02/onnxruntime-1.20.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bb71a814f66517a65628c9e4a2bb530a6edd2cd5d87ffa0af0f6f773a027d99e", size = 13333903, upload-time = "2024-11-21T00:49:12.984Z" }, + { url = "https://files.pythonhosted.org/packages/c8/f1/aabfdf91d013320aa2fc46cf43c88ca0182860ff15df872b4552254a9680/onnxruntime-1.20.1-cp312-cp312-win32.whl", hash = "sha256:bd386cc9ee5f686ee8a75ba74037750aca55183085bf1941da8efcfe12d5b120", size = 9814562, upload-time = "2024-11-21T00:49:15.453Z" }, + { url = "https://files.pythonhosted.org/packages/dd/80/76979e0b744307d488c79e41051117634b956612cc731f1028eb17ee7294/onnxruntime-1.20.1-cp312-cp312-win_amd64.whl", hash = "sha256:19c2d843eb074f385e8bbb753a40df780511061a63f9def1b216bf53860223fb", size = 11331482, upload-time = "2024-11-21T00:49:19.412Z" }, + { url = "https://files.pythonhosted.org/packages/f7/71/c5d980ac4189589267a06f758bd6c5667d07e55656bed6c6c0580733ad07/onnxruntime-1.20.1-cp313-cp313-macosx_13_0_universal2.whl", hash = "sha256:cc01437a32d0042b606f462245c8bbae269e5442797f6213e36ce61d5abdd8cc", size = 31007574, upload-time = "2024-11-21T00:49:23.225Z" }, + { url = "https://files.pythonhosted.org/packages/81/0d/13bbd9489be2a6944f4a940084bfe388f1100472f38c07080a46fbd4ab96/onnxruntime-1.20.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fb44b08e017a648924dbe91b82d89b0c105b1adcfe31e90d1dc06b8677ad37be", size = 11951459, upload-time = "2024-11-21T00:49:26.269Z" }, + { url = "https://files.pythonhosted.org/packages/c0/ea/4454ae122874fd52bbb8a961262de81c5f932edeb1b72217f594c700d6ef/onnxruntime-1.20.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bda6aebdf7917c1d811f21d41633df00c58aff2bef2f598f69289c1f1dabc4b3", size = 13331620, upload-time = "2024-11-21T00:49:28.875Z" }, + { url = "https://files.pythonhosted.org/packages/d8/e0/50db43188ca1c945decaa8fc2a024c33446d31afed40149897d4f9de505f/onnxruntime-1.20.1-cp313-cp313-win_amd64.whl", hash = "sha256:d30367df7e70f1d9fc5a6a68106f5961686d39b54d3221f760085524e8d38e16", size = 11331758, upload-time = "2024-11-21T00:49:31.417Z" }, + { url = "https://files.pythonhosted.org/packages/d8/55/3821c5fd60b52a6c82a00bba18531793c93c4addfe64fbf061e235c5617a/onnxruntime-1.20.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c9158465745423b2b5d97ed25aa7740c7d38d2993ee2e5c3bfacb0c4145c49d8", size = 11950342, upload-time = "2024-11-21T00:49:34.164Z" }, + { url = "https://files.pythonhosted.org/packages/14/56/fd990ca222cef4f9f4a9400567b9a15b220dee2eafffb16b2adbc55c8281/onnxruntime-1.20.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0df6f2df83d61f46e842dbcde610ede27218947c33e994545a22333491e72a3b", size = 13337040, upload-time = "2024-11-21T00:49:37.271Z" }, +] + [[package]] name = "openai" version = "2.11.0" @@ -5609,6 +5751,12 @@ huggingface = [ logfire = [ { name = "logfire", extra = ["httpx"] }, ] +magic = [ + { name = "python-magic" }, +] +magika = [ + { name = "magika" }, +] mcp = [ { name = "mcp" }, ] @@ -5691,6 +5839,7 @@ requires-dist = [ { name = "httpx", marker = "extra == 'web'", specifier = ">=0.27.0" }, { name = "huggingface-hub", extras = ["inference"], marker = "extra == 'huggingface'", specifier = ">=0.33.5,<1.0.0" }, { name = "logfire", extras = ["httpx"], marker = "extra == 'logfire'", specifier = ">=4.16.0" }, + { name = "magika", marker = "extra == 'magika'", specifier = ">=1.0.1" }, { name = "mcp", marker = "extra == 'mcp'", specifier = ">=1.18.0" }, { name = "mistralai", marker = "extra == 'mistral'", specifier = ">=1.9.10" }, { name = "openai", marker = "extra == 'openai'", specifier = ">=2.11.0" }, @@ -5709,6 +5858,7 @@ requires-dist = [ { name = "pydantic-evals", marker = "extra == 'evals'", editable = "pydantic_evals" }, { name = "pydantic-graph", editable = "pydantic_graph" }, { name = "pyperclip", marker = "extra == 'cli'", specifier = ">=1.9.0" }, + { name = "python-magic", marker = "extra == 'magic'", specifier = ">=0.4.27" }, { name = "requests", marker = "extra == 'vertexai'", specifier = ">=2.32.2" }, { name = "rich", marker = "extra == 'cli'", specifier = ">=13" }, { name = "starlette", marker = "extra == 'ag-ui'", specifier = ">=0.45.3" }, @@ -5724,7 +5874,7 @@ requires-dist = [ { name = "uvicorn", marker = "extra == 'web'", specifier = ">=0.38.0" }, { name = "vllm", marker = "(python_full_version < '3.12' and platform_machine != 'x86_64' and extra == 'outlines-vllm-offline') or (python_full_version < '3.12' and sys_platform != 'darwin' and extra == 'outlines-vllm-offline')" }, ] -provides-extras = ["a2a", "ag-ui", "anthropic", "bedrock", "cli", "cohere", "dbos", "duckduckgo", "evals", "fastmcp", "google", "groq", "huggingface", "logfire", "mcp", "mistral", "openai", "openrouter", "outlines-llamacpp", "outlines-mlxlm", "outlines-sglang", "outlines-transformers", "outlines-vllm-offline", "prefect", "retries", "tavily", "temporal", "ui", "vertexai", "web"] +provides-extras = ["a2a", "ag-ui", "anthropic", "bedrock", "cli", "cohere", "dbos", "duckduckgo", "evals", "fastmcp", "google", "groq", "huggingface", "logfire", "magic", "magika", "mcp", "mistral", "openai", "openrouter", "outlines-llamacpp", "outlines-mlxlm", "outlines-sglang", "outlines-transformers", "outlines-vllm-offline", "prefect", "retries", "tavily", "temporal", "ui", "vertexai", "web"] [[package]] name = "pydantic-core" @@ -5941,6 +6091,15 @@ version = "1.9.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz", hash = "sha256:b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310", size = 20961, upload-time = "2024-06-18T20:38:48.401Z" } +[[package]] +name = "pyreadline3" +version = "3.5.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/49/4cea918a08f02817aabae639e3d0ac046fef9f9180518a3ad394e22da148/pyreadline3-3.5.4.tar.gz", hash = "sha256:8d57d53039a1c75adba8e50dd3d992b28143480816187ea5efbd5c78e6c885b7", size = 99839, upload-time = "2024-09-19T02:40:10.062Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/dc/491b7661614ab97483abf2056be1deee4dc2490ecbf7bff9ab5cdbac86e1/pyreadline3-3.5.4-py3-none-any.whl", hash = "sha256:eaf8e6cc3c49bcccf145fc6067ba8643d1df34d604a1ec0eccbf7a18e6d3fae6", size = 83178, upload-time = "2024-09-19T02:40:08.598Z" }, +] + [[package]] name = "pyright" version = "1.1.398" @@ -6067,6 +6226,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/51/e5/fecf13f06e5e5f67e8837d777d1bc43fac0ed2b77a676804df5c34744727/python_json_logger-4.0.0-py3-none-any.whl", hash = "sha256:af09c9daf6a813aa4cc7180395f50f2a9e5fa056034c9953aec92e381c5ba1e2", size = 15548, upload-time = "2025-10-06T04:15:17.553Z" }, ] +[[package]] +name = "python-magic" +version = "0.4.27" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/da/db/0b3e28ac047452d079d375ec6798bf76a036a08182dbb39ed38116a49130/python-magic-0.4.27.tar.gz", hash = "sha256:c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b", size = 14677, upload-time = "2022-06-07T20:16:59.508Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6c/73/9f872cb81fc5c3bb48f7227872c28975f998f3e7c2b1c16e95e6432bbb90/python_magic-0.4.27-py2.py3-none-any.whl", hash = "sha256:c212960ad306f700aa0d01e5d7a325d20548ff97eb9920dcd29513174f0294d3", size = 13840, upload-time = "2022-06-07T20:16:57.763Z" }, +] + [[package]] name = "python-multipart" version = "0.0.20" @@ -6854,8 +7022,10 @@ name = "scipy" version = "1.15.3" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "numpy", marker = "python_full_version < '3.11'" }, @@ -6914,8 +7084,10 @@ name = "scipy" version = "1.16.2" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "numpy", marker = "python_full_version == '3.11.*'" }, @@ -7484,10 +7656,14 @@ name = "tokenizers" version = "0.21.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "huggingface-hub", version = "0.33.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, @@ -7515,10 +7691,14 @@ name = "tokenizers" version = "0.22.1" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "huggingface-hub", version = "0.36.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, @@ -7603,10 +7783,14 @@ name = "torch" version = "2.8.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "filelock", marker = "python_full_version < '3.12'" }, @@ -7660,10 +7844,14 @@ name = "torch" version = "2.9.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "filelock", marker = "python_full_version >= '3.12'" }, @@ -7800,10 +7988,14 @@ name = "transformers" version = "4.53.3" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "filelock", marker = "python_full_version >= '3.12'" }, @@ -7827,10 +8019,14 @@ name = "transformers" version = "4.57.1" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "filelock", marker = "python_full_version < '3.12'" }, @@ -7854,13 +8050,13 @@ name = "triton" version = "3.4.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ - { name = "setuptools", marker = "python_full_version < '3.12'" }, + { name = "setuptools", marker = "python_full_version < '3.12' and sys_platform != 'win32'" }, ] wheels = [ { url = "https://files.pythonhosted.org/packages/62/ee/0ee5f64a87eeda19bbad9bc54ae5ca5b98186ed00055281fd40fb4beb10e/triton-3.4.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7ff2785de9bc02f500e085420273bb5cc9c9bb767584a4aa28d6e360cec70128", size = 155430069, upload-time = "2025-07-30T19:58:21.715Z" }, @@ -7875,10 +8071,10 @@ name = "triton" version = "3.5.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] wheels = [ { url = "https://files.pythonhosted.org/packages/0b/eb/09e31d107a5d00eb281aa7e6635ca463e9bca86515944e399480eadb71f8/triton-3.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d5d3b3d480debf24eaa739623c9a42446b0b77f95593d30eb1f64cd2278cc1f0", size = 170333110, upload-time = "2025-10-13T16:37:49.588Z" }, @@ -8126,10 +8322,14 @@ name = "vcrpy" version = "5.1.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation == 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation == 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "pyyaml", marker = "platform_python_implementation == 'PyPy'" }, @@ -8146,10 +8346,14 @@ name = "vcrpy" version = "7.0.0" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.13' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy'", - "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy'", - "python_full_version < '3.11' and platform_python_implementation != 'PyPy'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version >= '3.13' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.12.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version == '3.11.*' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform == 'win32'", + "python_full_version < '3.11' and platform_python_implementation != 'PyPy' and sys_platform != 'win32'", ] dependencies = [ { name = "pyyaml", marker = "platform_python_implementation != 'PyPy'" }, @@ -8600,8 +8804,8 @@ name = "xformers" version = "0.0.32.post1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "numpy", marker = "python_full_version < '3.12'" }, - { name = "torch", version = "2.8.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, + { name = "numpy", marker = "python_full_version < '3.12' and sys_platform != 'win32'" }, + { name = "torch", version = "2.8.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12' and sys_platform != 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/6f/33/3b9c4d3d5b2da453d27de891df4ad653ac5795324961aa3a5c15b0353fe6/xformers-0.0.32.post1.tar.gz", hash = "sha256:1de84a45c497c8d92326986508d81f4b0a8c6be4d3d62a29b8ad6048a6ab51e1", size = 12106196, upload-time = "2025-08-14T18:07:45.486Z" } wheels = [