Types¶
Type definitions and utilities for Stash entities.
Base Types¶
StashObject
¶
Bases: FromGraphQLMixin, BaseModel
Base interface for our Stash model implementations.
While this is not a schema interface, it represents a common pattern in the schema where many types have id, created_at, and updated_at fields. We use this interface to provide common functionality for these types.
Common fields (matching schema pattern): - id: Unique identifier (ID!) Note: created_at and updated_at are handled by Stash internally
Common functionality provided: - find_by_id: Find object by ID - save: Save object to Stash - to_input: Convert to GraphQL input type - is_dirty: Check if object has unsaved changes - mark_clean: Mark object as having no unsaved changes - mark_dirty: Mark object as having unsaved changes
Identity Map Integration: - Uses mode='wrap' validator to check cache before construction - Returns cached instance if entity already exists in store - Automatically caches new instances after construction
Attributes¶
model_config
class-attribute
instance-attribute
¶
model_config = ConfigDict(
arbitrary_types_allowed=True,
extra="allow",
validate_assignment=True,
populate_by_name=True,
)
Functions¶
new
classmethod
¶
Create a new object that hasn't been saved to the server yet.
This is a convenience method that creates a new instance without providing an 'id', which triggers UUID4 auto-generation and sets _is_new=True.
This is equivalent to calling the constructor without an 'id' field, but makes the intent more explicit in the code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**data
|
Any
|
Field values for the new object (excluding 'id') |
{}
|
Returns:
| Type | Description |
|---|---|
T
|
New instance with auto-generated UUID4 and _is_new=True |
Example
tag = Tag.new(name="New Tag", description="A new tag") tag.is_new() # True tag.id # '3fa85f6457174562b3fc2c963f66afa6' (UUID4 hex)
is_new
¶
Check if this is a new object not yet saved to the server.
Uses the _is_new flag which is set during initialization for new objects or when explicitly creating new objects with UUID4 identifiers.
Returns:
| Type | Description |
|---|---|
bool
|
True if this object has not been saved to the server |
update_id
¶
Update the temporary UUID with the server-assigned ID.
This should be called after a successful create operation to replace the auto-generated UUID with the permanent ID from the server. Also marks the object as no longer new.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
server_id
|
str
|
The permanent ID assigned by the Stash server |
required |
Example
scene = Scene(title="Example") # Auto-generates UUID scene.id # "a1b2c3d4e5f6..." scene._is_new # True await scene.save(client) # Server assigns ID "123" scene.id # "123" scene._is_new # False
model_post_init
¶
Initialize object and store snapshot after Pydantic init.
This is called by Pydantic after all fields are initialized, so it's the right place to capture the initial state for dirty tracking.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
_context
|
Any
|
Pydantic context (unused but required by signature) |
required |
is_dirty
¶
Check if tracked fields have unsaved changes.
Compares current field values with snapshot using object identity for StashObjects to avoid circular reference errors during comparison.
Returns:
| Type | Description |
|---|---|
bool
|
True if any tracked field has changed since last snapshot |
get_changed_fields
¶
Get fields that have changed since last snapshot.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary of field names to current values for changed fields |
mark_clean
¶
Mark object as having no unsaved changes.
Updates the snapshot to match the current state.
mark_dirty
¶
Mark object as having unsaved changes.
Clears the snapshot to force all tracked fields to be considered dirty.
find_by_id
async
classmethod
¶
find_by_id(client: StashClient, id: str) -> T | None
Find object by ID.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
StashClient
|
StashClient instance |
required |
id
|
str
|
Object ID |
required |
Returns:
| Type | Description |
|---|---|
T | None
|
Object instance if found, None otherwise |
save
async
¶
save(client: StashClient) -> None
Save object to Stash.
For new objects (created without a server ID), this performs a create operation and updates the temporary UUID with the server-assigned ID.
For existing objects, this performs an update operation, but only if there are dirty (changed) fields.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
StashClient
|
StashClient instance |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If save fails |
delete
async
¶
delete(client: StashClient, **kwargs: Any) -> bool
Delete this object from Stash and invalidate from cache.
Builds a destroy input from __destroy_input_type__ and executes
the corresponding GraphQL destroy mutation. Extra keyword arguments
are merged into the destroy input (e.g., delete_file=True).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
StashClient
|
StashClient instance |
required |
**kwargs
|
Any
|
Additional destroy input fields (e.g., delete_file, delete_generated) |
{}
|
Returns:
| Type | Description |
|---|---|
bool
|
True if the object was successfully deleted |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the type has no destroy_input_type |
ValueError
|
If the object has no server ID or delete fails |
Examples:
bulk_destroy
async
classmethod
¶
bulk_destroy(
client: StashClient, ids: list[str], **kwargs: Any
) -> bool
Delete multiple objects of this type from Stash.
Uses the bulk destroy mutation (e.g., scenesDestroy, tagsDestroy).
Types with __bulk_destroy_input_type__ use an input object; others
use the bare ids parameter pattern.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
StashClient
|
StashClient instance |
required |
ids
|
list[str]
|
List of entity IDs to delete |
required |
**kwargs
|
Any
|
Additional destroy input fields (e.g., delete_file) |
{}
|
Returns:
| Type | Description |
|---|---|
bool
|
True if successfully deleted |
Raises:
| Type | Description |
|---|---|
ValueError
|
If delete fails |
Examples:
merge
async
classmethod
¶
merge(
client: StashClient,
source_ids: list[str],
destination_id: str,
**kwargs: Any,
) -> Self | None
Merge source entities into a destination entity.
Combines multiple entities of this type into one, transferring relationships and optionally overriding field values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
StashClient
|
StashClient instance |
required |
source_ids
|
list[str]
|
IDs of entities to merge from (these will be deleted) |
required |
destination_id
|
str
|
ID of the entity to merge into (this will be kept) |
required |
**kwargs
|
Any
|
Additional merge input fields (e.g., values, play_history) |
{}
|
Returns:
| Type | Description |
|---|---|
Self | None
|
The merged destination entity, or None |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the type doesn't support merge |
ValueError
|
If merge fails |
Examples:
to_input
async
¶
Convert to GraphQL input type.
For new objects (with temporary UUID), includes all fields. For existing objects, includes only dirty (changed) fields plus ID.
Fields with value UNSET are excluded from the input to avoid overwriting server values that were never touched locally.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary of input fields. For new objects, all non-UNSET fields |
dict[str, Any]
|
are included. For existing objects, only changed fields plus ID. |
StashInput
¶
Bases: BaseModel
Base class for all Stash GraphQL input types.
Configures Pydantic to accept both Python snake_case field names and GraphQL aliases during construction, while serializing to GraphQL field names using Field aliases and by_alias=True.
This allows tests and Python code to use Pythonic naming conventions while ensuring GraphQL compatibility.
Capability Gating (__safe_to_eat__):
Subclasses may declare a __safe_to_eat__ class variable containing
GraphQL field names (as they appear in the schema) that are known to be
absent on older server versions.
When to_graphql() detects that the server schema lacks one of these
fields, it silently strips it (with a warning) instead of raising.
Unsupported fields not in __safe_to_eat__ raise ValueError.
Example
Attributes¶
model_config
class-attribute
instance-attribute
¶
Functions¶
to_graphql
¶
Convert to GraphQL-compatible dictionary.
Excludes UNSET sentinel values but keeps None (null) values. This allows: - UNSET fields to be omitted from the request (not sent to GraphQL) - None fields to explicitly clear/null values in GraphQL - Regular values to be sent normally
After building the dict, applies capability gating: if the
fragment_store has detected server capabilities, every key
is checked against the server schema. Fields listed in
__safe_to_eat__ are silently stripped (with a warning) when
the server doesn't support them; other unsupported fields raise
ValueError.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary ready to send to GraphQL API with GraphQL field names |
StashResult
¶
Bases: FromGraphQLMixin, BaseModel
Base class for all Stash GraphQL result/output types.
Result types wrap collections of entities returned from list queries like findScenes, findPerformers, etc.
Example result types: - FindScenesResultType - FindPerformersResultType - StatsResultType
Core Entity Types¶
Scene
¶
Bases: StashObject
Scene type from schema/types/scene.graphql.
Note: Inherits from StashObject for implementation convenience, not because Scene implements any interface in the schema. StashObject provides common functionality like find_by_id, save, and to_input methods.
Attributes¶
rating100
class-attribute
instance-attribute
¶
o_counter
class-attribute
instance-attribute
¶
interactive_speed
class-attribute
instance-attribute
¶
play_count
class-attribute
instance-attribute
¶
play_history
class-attribute
instance-attribute
¶
scene_markers
class-attribute
instance-attribute
¶
scene_markers: list[SceneMarker] | UnsetType = UNSET
scene_streams
class-attribute
instance-attribute
¶
scene_streams: list[SceneStreamEndpoint] | UnsetType = (
Field(default=UNSET, alias="sceneStreams")
)
captions
class-attribute
instance-attribute
¶
Functions¶
add_to_gallery
async
¶
add_to_gallery(gallery: Gallery) -> None
Add scene to gallery (syncs inverse automatically, call save() to persist).
remove_from_gallery
async
¶
remove_from_gallery(gallery: Gallery) -> None
Remove scene from gallery (syncs inverse automatically, call save() to persist).
add_performer
async
¶
add_performer(performer: Performer) -> None
Add performer to scene (syncs inverse automatically, call save() to persist).
remove_performer
async
¶
remove_performer(performer: Performer) -> None
Remove performer from scene (syncs inverse automatically, call save() to persist).
add_tag
async
¶
add_tag(tag: Tag) -> None
Add tag to scene (syncs inverse automatically, call save() to persist).
Performer
¶
Bases: StashObject
Performer type from schema/types/performer.graphql.
Attributes¶
scene_count
class-attribute
instance-attribute
¶
image_count
class-attribute
instance-attribute
¶
gallery_count
class-attribute
instance-attribute
¶
group_count
class-attribute
instance-attribute
¶
performer_count
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
circumcised
class-attribute
instance-attribute
¶
circumcised: CircumcisedEnum | None | UnsetType = UNSET
o_counter
class-attribute
instance-attribute
¶
Functions¶
update_avatar
async
¶
update_avatar(
client: StashClient, image_path: str | Path
) -> Performer
Update performer's avatar image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
StashClient
|
"StashClient" instance to use for update |
required |
image_path
|
str | Path
|
Path to image file to use as avatar |
required |
Returns:
| Type | Description |
|---|---|
Performer
|
Updated Performer object with the new image |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If image file doesn't exist |
ValueError
|
If image file can't be read or update fails |
add_tag
async
¶
add_tag(tag: Tag) -> None
Add tag to performer (syncs inverse automatically, call save() to persist).
remove_tag
async
¶
remove_tag(tag: Tag) -> None
Remove tag from performer (syncs inverse automatically, call save() to persist).
find_by_name
async
classmethod
¶
find_by_name(client: StashClient, name: str) -> T | None
Find performer by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
StashClient
|
"StashClient" instance |
required |
name
|
str
|
Performer name to search for |
required |
Returns:
| Type | Description |
|---|---|
T | None
|
Performer instance if found, None otherwise |
Gallery
¶
Bases: StashObject
Gallery type from schema/types/gallery.graphql.
Attributes¶
rating100
class-attribute
instance-attribute
¶
image_count
class-attribute
instance-attribute
¶
Functions¶
image
async
¶
image(index: int) -> Image
Get image at index from this gallery.
Uses the GraphQL gallery.image(index) resolver to fetch a specific image
by its position in the gallery.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
index
|
int
|
Zero-based index of the image in the gallery |
required |
Returns:
| Type | Description |
|---|---|
Image
|
Image object at the specified index |
Raises:
| Type | Description |
|---|---|
ValueError
|
If gallery ID is not set or index is out of bounds |
RuntimeError
|
If no StashEntityStore is configured |
Examples:
add_performer
async
¶
add_performer(performer: Performer) -> None
Add performer (syncs inverse automatically, call save() to persist).
remove_performer
async
¶
remove_performer(performer: Performer) -> None
Remove performer (syncs inverse automatically, call save() to persist).
add_scene
async
¶
add_scene(scene: Scene) -> None
Add scene (syncs inverse automatically, call save() to persist).
remove_scene
async
¶
remove_scene(scene: Scene) -> None
Remove scene (syncs inverse automatically, call save() to persist).
Image
¶
Bases: StashObject
Image type from schema.
Attributes¶
rating100
class-attribute
instance-attribute
¶
o_counter
class-attribute
instance-attribute
¶
visual_files
class-attribute
instance-attribute
¶
galleries
class-attribute
instance-attribute
¶
performers
class-attribute
instance-attribute
¶
Functions¶
add_performer
async
¶
add_performer(performer: Performer) -> None
Add performer (syncs inverse automatically, call save() to persist).
remove_performer
async
¶
remove_performer(performer: Performer) -> None
Remove performer (syncs inverse automatically, call save() to persist).
add_to_gallery
async
¶
add_to_gallery(gallery: Gallery) -> None
Add gallery (syncs inverse automatically, call save() to persist).
remove_from_gallery
async
¶
remove_from_gallery(gallery: Gallery) -> None
Remove gallery (syncs inverse automatically, call save() to persist).
Group
¶
Bases: StashObject
Group type from schema.
Attributes¶
containing_groups
class-attribute
instance-attribute
¶
sub_groups
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
front_image_path
class-attribute
instance-attribute
¶
back_image_path
class-attribute
instance-attribute
¶
scene_count
class-attribute
instance-attribute
¶
performer_count
class-attribute
instance-attribute
¶
sub_group_count
class-attribute
instance-attribute
¶
o_counter
class-attribute
instance-attribute
¶
Functions¶
add_sub_group
async
¶
add_sub_group(
sub_group: Group | GroupDescription,
description: str | None = None,
) -> None
Add sub-group (syncs inverse automatically, call save() to persist).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sub_group
|
Group | GroupDescription
|
Either a Group object or a GroupDescription object |
required |
description
|
str | None
|
Optional description for the relationship (only used if sub_group is a Group) |
None
|
remove_sub_group
async
¶
remove_sub_group(
sub_group: Group | GroupDescription,
) -> None
Remove sub-group (syncs inverse automatically, call save() to persist).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sub_group
|
Group | GroupDescription
|
Either a Group object or GroupDescription object to remove |
required |
add_containing_group
async
¶
add_containing_group(
containing_group: Group | GroupDescription,
) -> None
Add containing group (syncs inverse automatically, call save() to persist).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
containing_group
|
Group | GroupDescription
|
Either a Group object (will be wrapped with None description) or a GroupDescription object (used as-is) |
required |
remove_containing_group
async
¶
remove_containing_group(
containing_group: Group | GroupDescription,
) -> None
Remove containing group (syncs inverse automatically, call save() to persist).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
containing_group
|
Group | GroupDescription
|
Either a Group object or GroupDescription object to remove |
required |
Studio
¶
Bases: StashObject
Studio type from schema/types/studio.graphql.
Attributes¶
child_studios
class-attribute
instance-attribute
¶
ignore_auto_tag
class-attribute
instance-attribute
¶
scene_count
class-attribute
instance-attribute
¶
image_count
class-attribute
instance-attribute
¶
gallery_count
class-attribute
instance-attribute
¶
performer_count
class-attribute
instance-attribute
¶
group_count
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
o_counter
class-attribute
instance-attribute
¶
Functions¶
handle_deprecated_url
classmethod
¶
Convert deprecated 'url' field to 'urls' list for backward compatibility.
set_parent_studio
async
¶
set_parent_studio(parent: Studio | None) -> None
Set parent studio (syncs inverse automatically, call save() to persist).
Tag
¶
Bases: StashObject
Tag type from schema/types/tag.graphql.
Attributes¶
ignore_auto_tag
class-attribute
instance-attribute
¶
scene_count
class-attribute
instance-attribute
¶
scene_marker_count
class-attribute
instance-attribute
¶
image_count
class-attribute
instance-attribute
¶
gallery_count
class-attribute
instance-attribute
¶
performer_count
class-attribute
instance-attribute
¶
studio_count
class-attribute
instance-attribute
¶
group_count
class-attribute
instance-attribute
¶
parent_count
class-attribute
instance-attribute
¶
child_count
class-attribute
instance-attribute
¶
Functions¶
add_parent
async
¶
add_parent(parent_tag: Tag) -> None
Add parent tag (syncs inverse automatically, call save() to persist).
remove_parent
async
¶
remove_parent(parent_tag: Tag) -> None
Remove parent tag (syncs inverse automatically, call save() to persist).
add_child
async
¶
add_child(child_tag: Tag) -> None
Add child tag (syncs inverse automatically, call save() to persist).
remove_child
async
¶
remove_child(child_tag: Tag) -> None
Remove child tag (syncs inverse automatically, call save() to persist).
get_all_descendants
async
¶
get_all_descendants() -> list[Tag]
Get all descendant tags recursively (children, grandchildren, etc.).
Returns:
| Type | Description |
|---|---|
list[Tag]
|
List of all descendant tags in the hierarchy |
get_all_ancestors
async
¶
get_all_ancestors() -> list[Tag]
Get all ancestor tags recursively (parents, grandparents, etc.).
Returns:
| Type | Description |
|---|---|
list[Tag]
|
List of all ancestor tags in the hierarchy |
find_by_name
async
classmethod
¶
find_by_name(client: StashClient, name: str) -> T | None
Find tag by name (case-insensitive search).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
StashClient
|
"StashClient" instance |
required |
name
|
str
|
Tag name to search for |
required |
Returns:
| Type | Description |
|---|---|
T | None
|
Tag instance if found, None otherwise |
SceneMarker
¶
Bases: StashObject
Scene marker type from schema/types/scene-marker.graphql.
UNSET Pattern¶
UnsetType
¶
Sentinel value representing an unset field.
Used throughout the type system to indicate a field has never been set, as distinct from being explicitly set to None.
This is a singleton - all instances are the same object.
Date Utilities¶
FuzzyDate
¶
Represents a date with variable precision.
Examples:
Initialize a fuzzy date from a string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
str
|
Date string in format YYYY, YYYY-MM, or YYYY-MM-DD |
required |
Raises:
| Type | Description |
|---|---|
StashIntegrationError
|
If the date format is invalid |
Attributes¶
Functions¶
to_datetime
¶
Convert to a datetime object (using first day of period).
Returns:
| Name | Type | Description |
|---|---|---|
datetime |
datetime
|
A datetime object representing the start of the period. - Year precision: January 1st of that year - Month precision: 1st day of that month - Day precision: That specific day (time stripped if present) |
Examples:
DatePrecision
¶
Bases: StrEnum
Date precision levels supported by Stash. These correspond to the database precision values: - DAY = 0 (YYYY-MM-DD) - MONTH = 1 (YYYY-MM) - YEAR = 2 (YYYY) - OTHER = 3 (YYYY-MM-DD HH:MM:SS - more precise than day)
validate_fuzzy_date
¶
Validate that a date string is in a supported fuzzy format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date_str
|
str
|
Date string to validate |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the date is valid, False otherwise |
Examples:
normalize_date
¶
normalize_date(
date_str: str,
target_precision: Literal["day", "month", "year"]
| None = None,
) -> str
Normalize a date string to a specific precision.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date_str
|
str
|
Date string to normalize |
required |
target_precision
|
Literal['day', 'month', 'year'] | None
|
Target precision level. If None, returns the date as-is after validation. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Normalized date string |
Raises:
| Type | Description |
|---|---|
StashIntegrationError
|
If the date format is invalid or conversion fails |
Examples:
Enums¶
Enum types from schema.
Classes¶
CircumcisedEnum
¶
BulkUpdateIdMode
¶
SortDirectionEnum
¶
OrientationEnum
¶
HashAlgorithm
¶
BlobsStorageType
¶
ImageLightboxDisplayMode
¶
ImageLightboxScrollMode
¶
IdentifyFieldStrategy
¶
ImportDuplicateEnum
¶
ImportMissingRefEnum
¶
SystemStatusEnum
¶
JobStatusUpdateType
¶
PluginSettingTypeEnum
¶
ScrapeContentType
¶
ScrapeType
¶
PackageType
¶
File Types¶
VideoFile
¶
ImageFile
¶
Bases: BaseFile
Image file type from schema/types/file.graphql.
Implements BaseFile and inherits StashObject through it.
GalleryFile
¶
Bases: BaseFile
Gallery file type from schema/types/file.graphql.
Implements BaseFile with no additional fields and inherits StashObject through it.
BaseFile
¶
Bases: StashObject
Base interface for all file types from schema/types/file.graphql.
Note: Inherits from StashObject since it has id, created_at, and updated_at fields in the schema, matching the common pattern.
Folder
¶
Bases: StashObject
Folder type from schema/types/file.graphql.
Note: Inherits from StashObject since it has id, created_at, and updated_at fields in the schema, matching the common pattern.
Input Types¶
Input types for mutations (create, update, destroy operations).
SceneCreateInput
¶
SceneUpdateInput
¶
Bases: StashInput
Input for updating scenes.
Attributes¶
client_mutation_id
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
performer_ids
class-attribute
instance-attribute
¶
groups
class-attribute
instance-attribute
¶
stash_ids
class-attribute
instance-attribute
¶
primary_file_id
class-attribute
instance-attribute
¶
PerformerCreateInput
¶
Bases: StashInput
Input for creating performers.
Attributes¶
circumcised
class-attribute
instance-attribute
¶
circumcised: CircumcisedEnum | None | UnsetType = UNSET
stash_ids
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
ignore_auto_tag
class-attribute
instance-attribute
¶
custom_fields
class-attribute
instance-attribute
¶
PerformerUpdateInput
¶
Bases: StashInput
Input for updating performers.
Attributes¶
circumcised
class-attribute
instance-attribute
¶
circumcised: CircumcisedEnum | None | UnsetType = UNSET
stash_ids
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
ignore_auto_tag
class-attribute
instance-attribute
¶
custom_fields
class-attribute
instance-attribute
¶
GalleryCreateInput
¶
Bases: StashInput
Input for creating galleries.
GalleryUpdateInput
¶
GroupCreateInput
¶
Bases: StashInput
Input for creating groups from schema/types/group.graphql.
GroupUpdateInput
¶
Bases: StashInput
Input for updating groups from schema/types/group.graphql.
StudioCreateInput
¶
Bases: StashInput
Input for creating studios.
StudioUpdateInput
¶
Bases: StashInput
Input for updating studios.
TagCreateInput
¶
Bases: StashInput
Input for creating tags.
TagUpdateInput
¶
Bases: StashInput
Input for updating tags.
Filter Types¶
SceneFilterType
¶
Bases: StashInput
Input for scene filter.
Attributes¶
details
class-attribute
instance-attribute
¶
director
class-attribute
instance-attribute
¶
checksum
class-attribute
instance-attribute
¶
phash_distance
class-attribute
instance-attribute
¶
file_count
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
o_counter
class-attribute
instance-attribute
¶
duplicated
class-attribute
instance-attribute
¶
resolution
class-attribute
instance-attribute
¶
orientation
class-attribute
instance-attribute
¶
framerate
class-attribute
instance-attribute
¶
video_codec
class-attribute
instance-attribute
¶
audio_codec
class-attribute
instance-attribute
¶
duration
class-attribute
instance-attribute
¶
studios
class-attribute
instance-attribute
¶
groups
class-attribute
instance-attribute
¶
galleries
class-attribute
instance-attribute
¶
tags
class-attribute
instance-attribute
¶
tag_count
class-attribute
instance-attribute
¶
performer_tags
class-attribute
instance-attribute
¶
performer_favorite
class-attribute
instance-attribute
¶
performer_age
class-attribute
instance-attribute
¶
performers
class-attribute
instance-attribute
¶
performer_count
class-attribute
instance-attribute
¶
stash_id_endpoint
class-attribute
instance-attribute
¶
stash_ids_endpoint
class-attribute
instance-attribute
¶
stash_id_count
class-attribute
instance-attribute
¶
interactive_speed
class-attribute
instance-attribute
¶
captions
class-attribute
instance-attribute
¶
resume_time
class-attribute
instance-attribute
¶
play_count
class-attribute
instance-attribute
¶
play_duration
class-attribute
instance-attribute
¶
last_played_at
class-attribute
instance-attribute
¶
created_at
class-attribute
instance-attribute
¶
updated_at
class-attribute
instance-attribute
¶
galleries_filter
class-attribute
instance-attribute
¶
galleries_filter: GalleryFilterType | None | UnsetType = (
UNSET
)
performers_filter
class-attribute
instance-attribute
¶
performers_filter: (
PerformerFilterType | None | UnsetType
) = UNSET
studios_filter
class-attribute
instance-attribute
¶
tags_filter
class-attribute
instance-attribute
¶
groups_filter
class-attribute
instance-attribute
¶
markers_filter
class-attribute
instance-attribute
¶
files_filter
class-attribute
instance-attribute
¶
PerformerFilterType
¶
Bases: StashInput
Input for performer filter.
Attributes¶
disambiguation
class-attribute
instance-attribute
¶
details
class-attribute
instance-attribute
¶
filter_favorites
class-attribute
instance-attribute
¶
birth_year
class-attribute
instance-attribute
¶
ethnicity
class-attribute
instance-attribute
¶
country
class-attribute
instance-attribute
¶
eye_color
class-attribute
instance-attribute
¶
height_cm
class-attribute
instance-attribute
¶
measurements
class-attribute
instance-attribute
¶
fake_tits
class-attribute
instance-attribute
¶
penis_length
class-attribute
instance-attribute
¶
circumcised
class-attribute
instance-attribute
¶
career_length
class-attribute
instance-attribute
¶
career_start
class-attribute
instance-attribute
¶
career_end
class-attribute
instance-attribute
¶
tattoos
class-attribute
instance-attribute
¶
piercings
class-attribute
instance-attribute
¶
aliases
class-attribute
instance-attribute
¶
tags
class-attribute
instance-attribute
¶
tag_count
class-attribute
instance-attribute
¶
scene_count
class-attribute
instance-attribute
¶
image_count
class-attribute
instance-attribute
¶
gallery_count
class-attribute
instance-attribute
¶
play_count
class-attribute
instance-attribute
¶
o_counter
class-attribute
instance-attribute
¶
stash_id_endpoint
class-attribute
instance-attribute
¶
stash_ids_endpoint
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
hair_color
class-attribute
instance-attribute
¶
death_year
class-attribute
instance-attribute
¶
studios
class-attribute
instance-attribute
¶
groups
class-attribute
instance-attribute
¶
performers
class-attribute
instance-attribute
¶
ignore_auto_tag
class-attribute
instance-attribute
¶
birthdate
class-attribute
instance-attribute
¶
death_date
class-attribute
instance-attribute
¶
scenes_filter
class-attribute
instance-attribute
¶
scenes_filter: SceneFilterType | None | UnsetType = UNSET
images_filter
class-attribute
instance-attribute
¶
images_filter: ImageFilterType | None | UnsetType = UNSET
galleries_filter
class-attribute
instance-attribute
¶
galleries_filter: GalleryFilterType | None | UnsetType = (
UNSET
)
tags_filter
class-attribute
instance-attribute
¶
markers_filter
class-attribute
instance-attribute
¶
created_at
class-attribute
instance-attribute
¶
updated_at
class-attribute
instance-attribute
¶
marker_count
class-attribute
instance-attribute
¶
GalleryFilterType
¶
Bases: StashInput
Input for gallery filter.
Attributes¶
details
class-attribute
instance-attribute
¶
checksum
class-attribute
instance-attribute
¶
file_count
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
average_resolution
class-attribute
instance-attribute
¶
studios
class-attribute
instance-attribute
¶
tags
class-attribute
instance-attribute
¶
tag_count
class-attribute
instance-attribute
¶
performer_tags
class-attribute
instance-attribute
¶
performers
class-attribute
instance-attribute
¶
performer_count
class-attribute
instance-attribute
¶
performer_favorite
class-attribute
instance-attribute
¶
performer_age
class-attribute
instance-attribute
¶
image_count
class-attribute
instance-attribute
¶
created_at
class-attribute
instance-attribute
¶
updated_at
class-attribute
instance-attribute
¶
photographer
class-attribute
instance-attribute
¶
scenes_filter
class-attribute
instance-attribute
¶
scenes_filter: SceneFilterType | None | UnsetType = UNSET
images_filter
class-attribute
instance-attribute
¶
images_filter: ImageFilterType | None | UnsetType = UNSET
performers_filter
class-attribute
instance-attribute
¶
performers_filter: (
PerformerFilterType | None | UnsetType
) = UNSET
studios_filter
class-attribute
instance-attribute
¶
tags_filter
class-attribute
instance-attribute
¶
files_filter
class-attribute
instance-attribute
¶
folders_filter
class-attribute
instance-attribute
¶
parent_folder
class-attribute
instance-attribute
¶
ImageFilterType
¶
Bases: StashInput
Input for image filter.
Attributes¶
details
class-attribute
instance-attribute
¶
checksum
class-attribute
instance-attribute
¶
file_count
class-attribute
instance-attribute
¶
rating100
class-attribute
instance-attribute
¶
o_counter
class-attribute
instance-attribute
¶
resolution
class-attribute
instance-attribute
¶
orientation
class-attribute
instance-attribute
¶
studios
class-attribute
instance-attribute
¶
tags
class-attribute
instance-attribute
¶
tag_count
class-attribute
instance-attribute
¶
performer_tags
class-attribute
instance-attribute
¶
performers
class-attribute
instance-attribute
¶
performer_count
class-attribute
instance-attribute
¶
performer_favorite
class-attribute
instance-attribute
¶
performer_age
class-attribute
instance-attribute
¶
galleries
class-attribute
instance-attribute
¶
created_at
class-attribute
instance-attribute
¶
updated_at
class-attribute
instance-attribute
¶
photographer
class-attribute
instance-attribute
¶
galleries_filter
class-attribute
instance-attribute
¶
galleries_filter: GalleryFilterType | None | UnsetType = (
UNSET
)
performers_filter
class-attribute
instance-attribute
¶
performers_filter: (
PerformerFilterType | None | UnsetType
) = UNSET
studios_filter
class-attribute
instance-attribute
¶
tags_filter
class-attribute
instance-attribute
¶
files_filter
class-attribute
instance-attribute
¶
phash_distance
class-attribute
instance-attribute
¶
Result Types¶
FindScenesResultType
¶
Bases: StashResult
Result type for finding scenes from schema/types/scene.graphql.
Fields: count: Total number of scenes duration: Total duration in seconds filesize: Total file size in bytes scenes: List of scenes
Attributes¶
FindPerformersResultType
¶
FindGalleriesResultType
¶
Bases: StashResult
Result type for finding galleries.
FindImagesResultType
¶
Job Types¶
Job
¶
Configuration Types¶
ConfigResult
¶
StashConfig
¶
Metadata Types¶
ScanMetadataInput
¶
Bases: StashInput
Input for metadata scanning from schema/types/metadata.graphql.
Attributes¶
scanGenerateCovers
class-attribute
instance-attribute
¶
scanGeneratePreviews
class-attribute
instance-attribute
¶
scanGenerateImagePreviews
class-attribute
instance-attribute
¶
scanGenerateSprites
class-attribute
instance-attribute
¶
scanGeneratePhashes
class-attribute
instance-attribute
¶
scanGenerateThumbnails
class-attribute
instance-attribute
¶
scanGenerateClipPreviews
class-attribute
instance-attribute
¶
scanGenerateImagePhashes
class-attribute
instance-attribute
¶
GenerateMetadataInput
¶
Bases: StashInput
Input for metadata generation from schema/types/metadata.graphql.
AutoTagMetadataInput
¶
Plugin Types¶
Plugin
¶
PluginTask
¶
Bases: FromGraphQLMixin, BaseModel
Plugin task type from schema/types/plugin.graphql.
Package Types¶
Package
¶
Scraper Types¶
ScrapedScene
¶
Bases: FromGraphQLMixin, BaseModel
Scene data from scraper from schema/types/scraper.graphql.
Attributes¶
performers
class-attribute
instance-attribute
¶
performers: list[ScrapedPerformer] | None | UnsetType = (
UNSET
)
ScrapedPerformer
¶
Bases: FromGraphQLMixin, BaseModel
A performer from a scraping operation from schema/types/scraped-performer.graphql.
Attributes¶
StashBox Types¶
Logging Types¶
LogEntry
¶
Bases: BaseModel
Log entry type from schema/types/logging.graphql.
Version Types¶
Version
¶
Bases: FromGraphQLMixin, BaseModel
Version information.