-
Notifications
You must be signed in to change notification settings - Fork 780
MAINT: Evict I/O modules from pyrit.models into pyrit.memory.storage #1929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rlundeen2
merged 13 commits into
microsoft:main
from
rlundeen2:rlundeen2/evict-io-to-pyrit-io
Jun 6, 2026
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
702bfcd
MAINT: Evict I/O modules from pyrit.models into pyrit.io
rlundeen2 aaa3c0f
MAINT: Move pyrit.io into pyrit.memory.storage
rlundeen2 67a4193
Merge remote-tracking branch 'origin/main' into rlundeen2/evict-io-to…
rlundeen2 98f166a
MAINT: Expose pyrit.memory.storage public API from pyrit.memory
rlundeen2 c0e8365
Update pyrit/common/data_url_converter.py
rlundeen2 439601f
Update pyrit/prompt_target/openai/openai_chat_target.py
rlundeen2 79cbb42
Update pyrit/message_normalizer/chat_message_normalizer.py
rlundeen2 b466d6b
Update pyrit/message_normalizer/chat_message_normalizer.py
rlundeen2 014424e
Merge remote-tracking branch 'origin/main' into rlundeen2/evict-io-to…
rlundeen2 5847892
Fix import shortenings: prefer module-level, fall back to submodule f…
rlundeen2 3905398
Merge remote-tracking branch 'origin/main' into rlundeen2/evict-io-to…
rlundeen2 d603e65
Modernize storage typing to PEP 604 after merging main
rlundeen2 231f7b6
Suppress pre-existing ty errors surfaced by import relocation
rlundeen2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT license. | ||
|
|
||
| """ | ||
| I/O layer for PyRIT: storage backends and multi-modal data serializers. | ||
|
|
||
| Provides the disk and blob storage adapters (``StorageIO`` and its | ||
| implementations) and the data-type serializers (``data_serializer_factory`` and | ||
| the per-type ``*DataTypeSerializer`` classes) used to read and write prompt | ||
| payloads such as text, images, audio, and video. | ||
|
|
||
| Unlike ``pyrit.models``, modules in this package may depend on ``pyrit.memory`` | ||
| and ``pyrit.auth`` (resolved lazily to avoid import cycles). | ||
| """ | ||
|
|
||
| from pyrit.io.serializers import ( | ||
| AllowedCategories, | ||
| AudioPathDataTypeSerializer, | ||
| BinaryPathDataTypeSerializer, | ||
| DataTypeSerializer, | ||
| ErrorDataTypeSerializer, | ||
| ImagePathDataTypeSerializer, | ||
| TextDataTypeSerializer, | ||
| URLDataTypeSerializer, | ||
| VideoPathDataTypeSerializer, | ||
| data_serializer_factory, | ||
| set_message_piece_sha256_async, | ||
| set_seed_sha256_async, | ||
| ) | ||
| from pyrit.io.storage import ( | ||
| AzureBlobStorageIO, | ||
| DiskStorageIO, | ||
| StorageIO, | ||
| SupportedContentType, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| "AllowedCategories", | ||
| "AudioPathDataTypeSerializer", | ||
| "AzureBlobStorageIO", | ||
| "BinaryPathDataTypeSerializer", | ||
| "DataTypeSerializer", | ||
| "data_serializer_factory", | ||
| "DiskStorageIO", | ||
| "ErrorDataTypeSerializer", | ||
| "ImagePathDataTypeSerializer", | ||
| "set_message_piece_sha256_async", | ||
| "set_seed_sha256_async", | ||
| "StorageIO", | ||
| "SupportedContentType", | ||
| "TextDataTypeSerializer", | ||
| "URLDataTypeSerializer", | ||
| "VideoPathDataTypeSerializer", | ||
| ] | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.