Skip to main content
Type definitions and utilities for Stash entities.

Importing types

stash_graphql_client.types is the canonical, complete, flat import surface for every public schema type, input, enum, filter, and relationship helper. Anything in this package is importable directly from it — from stash_graphql_client.types import GenderEnum, CustomFieldsInput, VideoFile, FileFilterType — without reaching into the individual submodules (.types.enums, .types.files, .types.metadata, …). Submodule paths still work, but .types is the supported, stable location and the only one that round-trips cleanly under mypy’s no-implicit-reexport. The top-level stash_graphql_client package deliberately re-exports only the curated essentials — the client, store, errors, logging, the core entity types and their create/update inputs, and the UNSET / UnsetType / is_set helpers. For everything else, import from stash_graphql_client.types. So the rule of thumb is: reach for the top-level package for the common path, and stash_graphql_client.types for the full type surface.

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: - Direct Foo(id=...) stub construction is intercepted at the metaclass level (_StashObjectMeta.__call__) for cache lookup, restoring the same-id-yields-same-object guarantee for __init__ callers and eliminating Pydantic’s “validator returning non-self” warning. - For multi-field construction or new server data, from_dict / from_graphql use model_validate and run the wrap validator’s full merge logic.

Attributes

model_config
id
created_at
updated_at

Functions

new
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: Returns:
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:
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:
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:
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:
get_changed_fields
Get fields that have changed since last snapshot. Returns:
mark_clean
Mark object as having no unsaved changes. Updates the snapshot to match the current state and clears any pending queued side operations.
mark_dirty
Mark object as having unsaved changes. Clears the snapshot to force all tracked fields to be considered dirty.
set_primary_file
Designate the primary file for this entity. Parameters: Raises:
find_by_id
Find object by ID. Parameters: Returns:
save
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. Side mutations (side_mutations) are fired AFTER the main mutation so that new objects already have their server-assigned ID. Side-mutation fields are excluded from the main create/update input. When multiple fields map to the same handler (e.g., resume_time and play_duration both map to _save_activity), the handler is deduplicated and fires once. Queued operations (_pending_side_ops) fire after field-based side mutations. These are closures queued by entity methods like increment_o() or reset_play_count(). Parameters: Raises:
delete
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: Returns: Raises: Examples:
bulk_destroy
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: Returns: Raises: Examples:
merge
Merge source entities into a destination entity. Not implemented on the base class: a generic selection set built from field names is invalid GraphQL for any type with nested object fields. Mergeable types (Tag, Scene, Performer) override this with their own fragment-backed mutation via _merge_via; every other type does not support merge. Raises:
to_input
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:

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

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:
Example

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

Attributes

model_config

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

title
code
details
director
date
rating100
o_counter
studio
interactive
interactive_speed
last_played_at
resume_time
play_duration
play_count
play_history
o_history
urls
organized
files
primary_file_id
paths
scene_markers
galleries
groups
tags
performers
stash_ids
scene_streams
captions
custom_fields

Functions

merge
Merge source scenes into the destination scene (sceneMerge).
set_primary_file
Designate a file as primary (reorders files primary-first). Parameters:
reset_play_count
Queue resetting play count to 0. Call save() to persist.
reset_o
Queue resetting o-counter to 0. Call save() to persist.
reset_activity
Queue resetting activity data. Call save() to persist.
generate_screenshot
Queue screenshot generation. Call save() to persist.
add_to_gallery
Add scene to gallery (syncs inverse automatically, call save() to persist).
remove_from_gallery
Remove scene from gallery (syncs inverse automatically, call save() to persist).
add_performer
Add performer to scene (syncs inverse automatically, call save() to persist).
remove_performer
Remove performer from scene (syncs inverse automatically, call save() to persist).
add_tag
Add tag to scene (syncs inverse automatically, call save() to persist).
remove_tag
Remove tag from scene (syncs inverse automatically, call save() to persist).
set_studio
Set scene studio (call save() to persist).

Performer

Bases: StashObject Performer type from schema/types/performer.graphql.

Attributes

name
alias_list
tags
stash_ids
scenes
groups
galleries
images
favorite
ignore_auto_tag
scene_count
image_count
gallery_count
group_count
performer_count
custom_fields
disambiguation
urls
gender
birthdate
rating100
ethnicity
country
eye_color
height_cm
measurements
fake_tits
penis_length
circumcised
career_length
tattoos
piercings
image_path
details
death_date
hair_color
weight
o_counter
career_start
career_end

Functions

merge
Merge source performers into the destination (performerMerge).
update_avatar
Update performer’s avatar image. Parameters: Returns: Raises:
add_tag
Add tag to performer (syncs inverse automatically, call save() to persist).
remove_tag
Remove tag from performer (syncs inverse automatically, call save() to persist).
add_scene
Add scene (syncs inverse automatically, call save() to persist).
remove_scene
Remove scene (syncs inverse automatically, call save() to persist).
add_gallery
Add gallery (syncs inverse automatically, call save() to persist).
remove_gallery
Remove gallery (syncs inverse automatically, call save() to persist).
add_image
Add image (syncs inverse automatically, call save() to persist).
remove_image
Remove image (syncs inverse automatically, call save() to persist).
find_by_name
Find performer by name. Parameters: Returns: Bases: StashObject Gallery type from schema/types/gallery.graphql.

Attributes

title
code
date
details
photographer
rating100
folder
studio
cover
urls
organized
files
primary_file_id
chapters
scenes
images
image_count
tags
performers
paths
custom_fields

Functions

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: Returns: Raises: Examples:
add_image
Add image (syncs Image.galleries inverse, call save() to persist).
remove_image
Remove image (syncs Image.galleries inverse, call save() to persist).
add_performer
Add performer (syncs inverse automatically, call save() to persist).
remove_performer
Remove performer (syncs inverse automatically, call save() to persist).
add_scene
Add scene (syncs inverse automatically, call save() to persist).
remove_scene
Remove scene (syncs inverse automatically, call save() to persist).
add_tag
Add tag (syncs inverse automatically, call save() to persist).
remove_tag
Remove tag (syncs inverse automatically, call save() to persist).
set_primary_file
Designate a file as primary (reorders files primary-first). Parameters:

Image

Bases: StashObject A single image or video-as-image file managed by Stash. visual_files holds the underlying files as list[VisualFile] — a discriminated union of VideoFile | ImageFile. o_counter uses a side-mutation handler (_save_o_counter). Set it to a new value and call save(); the client fires imageIncrementO / imageDecrementO / imageResetO mutations to reach the target value. Images are created by Stash’s scanner, not this client — there is no ImageCreateInput, only updates and destroys.

Attributes

title
code
date
rating100
details
photographer
studio
o_counter
urls
organized
visual_files
primary_file_id
paths
galleries
tags
performers
custom_fields

Functions

set_primary_file
Designate a file as primary (reorders visual_files primary-first). Parameters:
add_performer
Add performer (syncs inverse automatically, call save() to persist).
remove_performer
Remove performer (syncs inverse automatically, call save() to persist).
add_to_gallery
Add gallery (syncs inverse automatically, call save() to persist).
remove_from_gallery
Remove gallery (syncs inverse automatically, call save() to persist).
add_tag
Add tag (syncs inverse automatically, call save() to persist).
remove_tag
Remove tag (syncs inverse automatically, call save() to persist).

Group

Bases: StashObject Group type from schema.

Attributes

name
urls
tags
containing_groups
sub_groups
scenes
aliases
duration
date
rating100
studio
director
synopsis
front_image_path
back_image_path
scene_count
performer_count
sub_group_count
o_counter
custom_fields

Functions

add_sub_group
Add sub-group (syncs inverse automatically, call save() to persist). Parameters:
remove_sub_group
Remove sub-group (syncs inverse automatically, call save() to persist). Parameters:
add_containing_group
Add containing group (syncs inverse automatically, call save() to persist). Parameters:
remove_containing_group
Remove containing group (syncs inverse automatically, call save() to persist). Parameters:

Studio

Bases: StashObject Studio type from schema/types/studio.graphql.

Attributes

name
urls
parent_studio
child_studios
aliases
tags
ignore_auto_tag
image_path
scene_count
image_count
gallery_count
performer_count
group_count
stash_ids
rating100
favorite
details
groups
scenes
images
galleries
o_counter
custom_fields
organized

Functions

handle_deprecated_url
Convert deprecated ‘url’ field to ‘urls’ list for backward compatibility.
add_scene
Add scene (syncs inverse automatically, call save() to persist).
remove_scene
Remove scene (syncs inverse automatically, call save() to persist).
add_image
Add image (syncs inverse automatically, call save() to persist).
remove_image
Remove image (syncs inverse automatically, call save() to persist).
add_gallery
Add gallery (syncs inverse automatically, call save() to persist).
remove_gallery
Remove gallery (syncs inverse automatically, call save() to persist).
add_group
Add group (syncs inverse automatically, call save() to persist).
remove_group
Remove group (syncs inverse automatically, call save() to persist).
set_parent_studio
Set parent studio (syncs inverse automatically, call save() to persist).
add_child_studio
Add child studio (syncs inverse automatically, call save() to persist).
remove_child_studio
Remove child studio (syncs inverse automatically, call save() to persist).

Tag

Bases: StashObject A label attachable to most entity types, with hierarchy support. parents and children are self-referential habtm lists. *_count fields are server-side resolvers — read-only. Content relationship list fields are queryable here but writable only via the owning entity’s bulk update mutations; assignments fire bulk-update side mutations on save() (see __side_mutations__ and the Side Mutations guide).

Attributes

name
sort_name
description
aliases
ignore_auto_tag
favorite
stash_ids
image_path
scene_count
scene_marker_count
image_count
gallery_count
performer_count
studio_count
group_count
parents
children
parent_count
child_count
scenes
images
galleries
performers
groups
studios
scene_markers
custom_fields

Functions

merge
Merge source tags into the destination tag (tagsMerge).
add_parent
Add parent tag (syncs inverse automatically, call save() to persist).
remove_parent
Remove parent tag (syncs inverse automatically, call save() to persist).
add_child
Add child tag (syncs inverse automatically, call save() to persist).
remove_child
Remove child tag (syncs inverse automatically, call save() to persist).
add_scene
Add scene (syncs inverse automatically, call save() to persist).
remove_scene
Remove scene (syncs inverse automatically, call save() to persist).
add_image
Add image (syncs inverse automatically, call save() to persist).
remove_image
Remove image (syncs inverse automatically, call save() to persist).
add_gallery
Add gallery (syncs inverse automatically, call save() to persist).
remove_gallery
Remove gallery (syncs inverse automatically, call save() to persist).
add_performer
Add performer (syncs inverse automatically, call save() to persist).
remove_performer
Remove performer (syncs inverse automatically, call save() to persist).
add_group
Add group (syncs inverse automatically, call save() to persist).
remove_group
Remove group (syncs inverse automatically, call save() to persist).
add_scene_marker
Add scene marker (syncs inverse automatically, call save() to persist).
remove_scene_marker
Remove scene marker (syncs inverse automatically, call save() to persist).
get_all_descendants
Get all descendant tags recursively (children, grandchildren, etc.). Returns:
get_all_ancestors
Get all ancestor tags recursively (parents, grandparents, etc.). Returns:
find_by_name
Find tag by name (case-insensitive search). Parameters: Returns:

SceneMarker

Bases: StashObject A timestamp marker on a Scene (title, seconds, optional end_seconds). Construct using relationship objects, not IDs: SceneMarker(scene=Scene(id="1"), primary_tag=Tag(id="10"), seconds=42.0). scene_id / primary_tag_id exist only on SceneMarkerCreateInput; to_input() extracts IDs from the relationship objects automatically.

Attributes

scene
title
seconds
primary_tag
tags
stream
preview
screenshot
end_seconds

Functions

add_tag
Add tag to scene marker (syncs inverse automatically, call save() to persist).
remove_tag
Remove tag from scene marker (syncs inverse automatically, call save() to persist).

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.

UNSET

Date Utilities

FuzzyDate

Represents a date with variable precision. Examples:
Initialize a fuzzy date from a string. Parameters: Raises:

Attributes

value
precision

Functions

to_datetime
Convert to a datetime object (using first day of period). Returns: 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)

Attributes

DAY
MONTH
YEAR
OTHER

validate_fuzzy_date

Validate that a date string is in a supported fuzzy format. Parameters: Returns: Examples:

normalize_date

Normalize a date string to a specific precision. Parameters: Returns: Raises: Examples:

Enums

Enum types from schema.

Classes

GenderEnum

Bases: StrEnum Gender enum from schema.
Attributes
MALE
FEMALE
TRANSGENDER_MALE
TRANSGENDER_FEMALE
INTERSEX
NON_BINARY

CircumcisedEnum

Bases: StrEnum Circumcision enum from schema.
Attributes
CUT
UNCUT

BulkUpdateIdMode

Bases: StrEnum Bulk update mode enum from schema.
Attributes
SET
ADD
REMOVE

SortDirectionEnum

Bases: StrEnum Sort direction enum from schema.
Attributes
ASC
DESC

ResolutionEnum

Bases: StrEnum Resolution enum from schema.
Attributes
VERY_LOW
LOW
R360P
STANDARD
WEB_HD
STANDARD_HD
FULL_HD
QUAD_HD
FOUR_K
FIVE_K
SIX_K
SEVEN_K
EIGHT_K
HUGE

OrientationEnum

Bases: StrEnum Orientation enum from schema.
Attributes
LANDSCAPE
PORTRAIT
SQUARE

CriterionModifier

Bases: StrEnum Criterion modifier enum from schema.
Attributes
EQUALS
NOT_EQUALS
GREATER_THAN
LESS_THAN
IS_NULL
NOT_NULL
INCLUDES_ALL
INCLUDES
EXCLUDES
MATCHES_REGEX
NOT_MATCHES_REGEX
BETWEEN
NOT_BETWEEN

FilterMode

Bases: StrEnum Filter mode enum from schema.
Attributes
SCENES
PERFORMERS
STUDIOS
GALLERIES
SCENE_MARKERS
MOVIES
GROUPS
TAGS
IMAGES

StreamingResolutionEnum

Bases: StrEnum Streaming resolution enum from schema.
Attributes
LOW
STANDARD
STANDARD_HD
FULL_HD
FOUR_K
ORIGINAL

PreviewPreset

Bases: StrEnum Preview preset enum from schema.
Attributes
ULTRAFAST
VERYFAST
FAST
MEDIUM
SLOW
SLOWER
VERYSLOW

HashAlgorithm

Bases: StrEnum Hash algorithm enum from schema.
Attributes
MD5
OSHASH

BlobsStorageType

Bases: StrEnum Blobs storage type enum from schema.
Attributes
DATABASE
FILESYSTEM

ImageLightboxDisplayMode

Bases: StrEnum Image lightbox display mode enum from schema.
Attributes
ORIGINAL
FIT_XY
FIT_X

ImageLightboxScrollMode

Bases: StrEnum Image lightbox scroll mode enum from schema.
Attributes
ZOOM
PAN_Y

IdentifyFieldStrategy

Bases: StrEnum Strategy for identifying fields from schema/types/metadata.graphql.
Attributes
IGNORE
MERGE
OVERWRITE

ImportDuplicateEnum

Bases: StrEnum Import duplicate behavior from schema/types/metadata.graphql.
Attributes
IGNORE
OVERWRITE
FAIL

ImportMissingRefEnum

Bases: StrEnum Import missing reference behavior from schema/types/metadata.graphql.
Attributes
IGNORE
FAIL
CREATE

SystemStatusEnum

Bases: StrEnum System status enum from schema/types/metadata.graphql.
Attributes
SETUP
NEEDS_MIGRATION
OK

JobStatus

Bases: StrEnum Job status enum from schema/types/job.graphql.
Attributes
READY
RUNNING
FINISHED
STOPPING
CANCELLED
FAILED

JobStatusUpdateType

Bases: StrEnum Job status update type enum from schema/types/job.graphql.
Attributes
ADD
REMOVE
UPDATE

LogLevel

Bases: StrEnum Log level enum from schema/types/logging.graphql.
Attributes
TRACE
DEBUG
INFO
PROGRESS
WARNING
ERROR

PluginSettingTypeEnum

Bases: StrEnum Plugin setting type enum from schema/types/plugin.graphql.
Attributes
STRING
NUMBER
BOOLEAN

ScrapeContentType

Bases: StrEnum Scrape content type enum from schema/types/scraper.graphql.
Attributes
GALLERY
IMAGE
MOVIE
GROUP
PERFORMER
SCENE

ScrapeType

Bases: StrEnum Scrape type enum from schema/types/scraper.graphql.
Attributes
NAME
FRAGMENT
URL

PackageType

Bases: StrEnum Package type enum from schema.
Attributes
SCRAPER
PLUGIN

OnMultipleMatch

Bases: Enum
Attributes
RETURN_NONE
RETURN_LIST
RETURN_FIRST

File Types

VideoFile

Bases: BaseFile Video file type from schema/types/file.graphql. Implements BaseFile and inherits StashObject through it.

Attributes

format
width
height
duration
video_codec
audio_codec
frame_rate
bit_rate
scenes

ImageFile

Bases: BaseFile Image file type from schema/types/file.graphql. Implements BaseFile and inherits StashObject through it.

Attributes

format
width
height
images

GalleryFile

Bases: BaseFile Gallery file type from schema/types/file.graphql. Implements BaseFile with no additional fields and inherits StashObject through it.

Attributes

galleries

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.

Attributes

path
basename
parent_folder
mod_time
size
fingerprints
zip_file

Functions

to_input
Convert to GraphQL input. Returns:

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.

Attributes

path
mod_time
parent_folder
zip_file
basename
parent_folders
sub_folders

Functions

to_input
Convert to GraphQL input. Returns:

Input Types

Input types for mutations (create, update, destroy operations).

SceneCreateInput

Bases: StashInput Input for creating scenes.

Attributes

title
code
details
director
urls
date
rating100
organized
studio_id
gallery_ids
performer_ids
groups
tag_ids
cover_image
stash_ids
file_ids
custom_fields

SceneUpdateInput

Bases: StashInput Input for updating scenes.

Attributes

id
client_mutation_id
title
code
details
director
urls
date
rating100
organized
studio_id
gallery_ids
performer_ids
groups
tag_ids
cover_image
stash_ids
resume_time
play_duration
primary_file_id
custom_fields

PerformerCreateInput

Bases: StashInput Input for creating performers.

Attributes

name
disambiguation
urls
gender
birthdate
ethnicity
country
eye_color
height_cm
measurements
fake_tits
penis_length
circumcised
career_length
tattoos
piercings
alias_list
favorite
tag_ids
image
stash_ids
rating100
details
death_date
hair_color
weight
ignore_auto_tag
custom_fields
career_start
career_end

PerformerUpdateInput

Bases: StashInput Input for updating performers.

Attributes

id
name
disambiguation
urls
gender
birthdate
ethnicity
country
eye_color
height_cm
measurements
fake_tits
penis_length
circumcised
career_length
tattoos
piercings
alias_list
favorite
tag_ids
image
stash_ids
rating100
details
death_date
hair_color
weight
ignore_auto_tag
custom_fields
career_start
career_end

GalleryCreateInput

Bases: StashInput Input for creating galleries.

Attributes

title
code
urls
date
details
photographer
rating100
organized
scene_ids
studio_id
tag_ids
performer_ids
custom_fields

GalleryUpdateInput

Bases: StashInput Input for updating galleries.

Attributes

id
client_mutation_id
title
code
urls
date
details
photographer
rating100
organized
scene_ids
studio_id
tag_ids
performer_ids
primary_file_id
custom_fields

GroupCreateInput

Bases: StashInput Input for creating groups from schema/types/group.graphql.

Attributes

name
aliases
duration
date
rating100
studio_id
director
synopsis
urls
tag_ids
containing_groups
sub_groups
front_image
back_image
custom_fields

GroupUpdateInput

Bases: StashInput Input for updating groups from schema/types/group.graphql.

Attributes

id
name
aliases
duration
date
rating100
studio_id
director
synopsis
urls
tag_ids
containing_groups
sub_groups
front_image
back_image
custom_fields

StudioCreateInput

Bases: StashInput Input for creating studios.

Attributes

name
urls
parent_id
image
stash_ids
rating100
favorite
details
aliases
tag_ids
ignore_auto_tag
organized
custom_fields

StudioUpdateInput

Bases: StashInput Input for updating studios.

Attributes

id
name
urls
parent_id
image
stash_ids
rating100
favorite
details
aliases
tag_ids
ignore_auto_tag
organized
custom_fields

TagCreateInput

Bases: StashInput Input for creating tags.

Attributes

name
sort_name
description
aliases
ignore_auto_tag
favorite
image
stash_ids
parent_ids
child_ids
custom_fields

TagUpdateInput

Bases: StashInput Input for updating tags.

Attributes

id
name
sort_name
description
aliases
ignore_auto_tag
favorite
image
stash_ids
parent_ids
child_ids
custom_fields

Filter Types

SceneFilterType

Bases: StashInput Input for scene filter.

Attributes

AND
OR
NOT
id
title
code
details
director
oshash
checksum
phash_distance
path
file_count
rating100
organized
o_counter
duplicated
resolution
orientation
framerate
bitrate
video_codec
audio_codec
duration
has_markers
is_missing
studios
groups
galleries
tags
tag_count
performer_tags
performer_favorite
performer_age
performers
performer_count
stash_id_endpoint
stash_ids_endpoint
stash_id_count
url
interactive
interactive_speed
captions
resume_time
play_count
play_duration
last_played_at
date
created_at
updated_at
galleries_filter
performers_filter
studios_filter
tags_filter
groups_filter
markers_filter
files_filter
custom_fields

PerformerFilterType

Bases: StashInput Input for performer filter.

Attributes

AND
OR
NOT
name
disambiguation
details
filter_favorites
birth_year
age
ethnicity
country
eye_color
height_cm
measurements
fake_tits
penis_length
circumcised
career_length
career_start
career_end
tattoos
piercings
aliases
gender
is_missing
tags
tag_count
scene_count
image_count
gallery_count
play_count
o_counter
stash_id_endpoint
stash_ids_endpoint
rating100
url
hair_color
weight
death_year
studios
groups
performers
ignore_auto_tag
birthdate
death_date
scenes_filter
images_filter
galleries_filter
tags_filter
markers_filter
created_at
updated_at
marker_count
custom_fields

GalleryFilterType

Bases: StashInput Input for gallery filter.

Attributes

AND
OR
NOT
id
title
details
checksum
path
file_count
is_missing
is_zip
rating100
organized
average_resolution
has_chapters
scenes
studios
tags
tag_count
performer_tags
performers
performer_count
performer_favorite
performer_age
image_count
url
date
created_at
updated_at
code
photographer
scenes_filter
images_filter
performers_filter
studios_filter
tags_filter
files_filter
folders_filter
parent_folder
custom_fields

ImageFilterType

Bases: StashInput Input for image filter.

Attributes

AND
OR
NOT
title
details
id
checksum
path
file_count
rating100
date
url
organized
o_counter
resolution
orientation
is_missing
studios
tags
tag_count
performer_tags
performers
performer_count
performer_favorite
performer_age
galleries
created_at
updated_at
code
photographer
galleries_filter
performers_filter
studios_filter
tags_filter
files_filter
phash_distance
custom_fields

Result Types

FindScenesResultType

Bases: StashResult Result type for finding scenes from schema/types/scene.graphql.

Attributes

count
duration
filesize
scenes

FindPerformersResultType

Bases: StashResult Result type for finding performers from schema/types/performer.graphql.

Attributes

count
performers

FindGalleriesResultType

Bases: StashResult Result type for finding galleries.

Attributes

count
galleries

FindImagesResultType

Bases: StashResult Result type for finding images from schema/types/image.graphql.

Attributes

count
megapixels
filesize
images

Job Types

Job

Bases: FromGraphQLMixin, BaseModel Job type from schema/types/job.graphql.

Attributes

id
status
sub_tasks
description
progress
start_time
end_time
add_time
error

JobStatus

Bases: StrEnum Job status enum from schema/types/job.graphql.

Attributes

READY
RUNNING
FINISHED
STOPPING
CANCELLED
FAILED

Configuration Types

ConfigResult

Bases: FromGraphQLMixin, BaseModel Result type for all configuration.

Attributes

general
interface
dlna
scraping
defaults
ui
plugins

StashConfig

Bases: FromGraphQLMixin, BaseModel Result type for stash configuration.

Attributes

path
exclude_video
exclude_image

Metadata Types

ScanMetadataInput

Bases: StashInput Input for metadata scanning from schema/types/metadata.graphql.

Attributes

paths
rescan
scanGenerateCovers
scanGeneratePreviews
scanGenerateImagePreviews
scanGenerateSprites
scanGeneratePhashes
scanGenerateThumbnails
scanGenerateClipPreviews
scanGenerateImagePhashes
filter

GenerateMetadataInput

Bases: StashInput Input for metadata generation from schema/types/metadata.graphql.

Attributes

covers
sprites
previews
imagePreviews
previewOptions
markers
markerImagePreviews
markerScreenshots
transcodes
forceTranscodes
phashes
interactiveHeatmapsSpeeds
imageThumbnails
clipPreviews
imagePhashes
imageIDs
galleryIDs
paths
sceneIDs
markerIDs
overwrite

AutoTagMetadataInput

Bases: StashInput Input for auto-tagging metadata from schema/types/metadata.graphql.

Attributes

paths
performers
studios
tags

Plugin Types

Plugin

Bases: FromGraphQLMixin, BaseModel Plugin type from schema/types/plugin.graphql.

Attributes

id
name
enabled
paths
description
url
version
tasks
hooks
settings
requires

PluginTask

Bases: FromGraphQLMixin, BaseModel Plugin task type from schema/types/plugin.graphql.

Attributes

name
plugin
description

Package Types

Package

Bases: FromGraphQLMixin, BaseModel Package type from schema/types/package.graphql.

Attributes

package_id
name
version
date
requires
source_url
source_package
metadata

Scraper Types

Scraper

Bases: FromGraphQLMixin, BaseModel Scraper from schema/types/scraper.graphql.

Attributes

id
name
performer
scene
gallery
image
group

ScrapedScene

Bases: FromGraphQLMixin, BaseModel Scene data from scraper from schema/types/scraper.graphql.

Attributes

title
code
details
director
urls
date
image
file
studio
tags
performers
groups
remote_site_id
duration
fingerprints

ScrapedPerformer

Bases: FromGraphQLMixin, BaseModel A performer from a scraping operation from schema/types/scraped-performer.graphql.

Attributes

stored_id
name
disambiguation
gender
urls
birthdate
ethnicity
country
eye_color
height
measurements
fake_tits
penis_length
circumcised
career_length
career_start
career_end
tattoos
piercings
aliases
tags
images
details
death_date
hair_color
weight
remote_site_id

StashBox Types

StashBox

Bases: BaseModel StashBox configuration from schema/types/stash-box.graphql.

Attributes

endpoint
api_key
name
max_requests_per_minute

Logging Types

LogEntry

Bases: BaseModel Log entry type from schema/types/logging.graphql.

Attributes

time
level
message

LogLevel

Bases: StrEnum Log level enum from schema/types/logging.graphql.

Attributes

TRACE
DEBUG
INFO
PROGRESS
WARNING
ERROR

Version Types

Version

Bases: FromGraphQLMixin, BaseModel Version information.

Attributes

version
hash
build_time

LatestVersion

Bases: FromGraphQLMixin, BaseModel Latest version information.

Attributes

version
shorthash
release_date
url