Skip to content

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,
)
id class-attribute instance-attribute
id: str = ''
created_at class-attribute instance-attribute
created_at: Time | UnsetType = UNSET
updated_at class-attribute instance-attribute
updated_at: Time | UnsetType = UNSET

Functions

new classmethod
new(**data: Any) -> T

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
is_new() -> bool

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_id(server_id: str) -> None

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
model_post_init(_context: Any) -> None

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
is_dirty() -> bool

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_changed_fields() -> dict[str, Any]

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_clean() -> None

Mark object as having no unsaved changes.

Updates the snapshot to match the current state.

mark_dirty
mark_dirty() -> None

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:

>>> await scene.delete(client)
>>> await scene.delete(client, delete_file=True)
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:

>>> await Scene.bulk_destroy(client, ["1", "2", "3"])
>>> await Scene.bulk_destroy(client, ["1", "2"], delete_file=True)
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:

>>> merged = await Tag.merge(client, ["1", "2"], "3")
>>> merged = await Scene.merge(client, ["1"], "2", play_history=True)
to_input async
to_input() -> dict[str, Any]

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
class MyInput(StashInput):
    my_field: str = Field(alias="myField")

# Both work during construction:
MyInput(my_field="value")    # Python style
MyInput(myField="value")     # GraphQL style

# Serialization always uses GraphQL style:
obj.to_graphql()  # {"myField": "value"}

Attributes

model_config class-attribute instance-attribute
model_config = ConfigDict(
    populate_by_name=True,
    ser_json_inf_nan="constants",
    extra="allow",
)

Functions

to_graphql
to_graphql() -> dict[str, Any]

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

Example
from .unset import UNSET

input_obj = SceneUpdateInput(
    title="New Title",  # Send this value
    rating=None,         # Send null (clear rating)
    url=UNSET            # Don't send at all
)
result = input_obj.to_graphql()
# {'title': 'New Title', 'rating': None}  # url excluded

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 class-attribute instance-attribute
model_config = ConfigDict(populate_by_name=True)

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 class-attribute instance-attribute
title: str | None | UnsetType = UNSET
code class-attribute instance-attribute
code: str | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
director class-attribute instance-attribute
director: str | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
o_counter class-attribute instance-attribute
o_counter: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
studio class-attribute instance-attribute
studio: Studio | None | UnsetType = UNSET
interactive class-attribute instance-attribute
interactive: bool | None | UnsetType = UNSET
interactive_speed class-attribute instance-attribute
interactive_speed: int | None | UnsetType = UNSET
last_played_at class-attribute instance-attribute
last_played_at: Time | None | UnsetType = UNSET
resume_time class-attribute instance-attribute
resume_time: float | None | UnsetType = UNSET
play_duration class-attribute instance-attribute
play_duration: float | None | UnsetType = UNSET
play_count class-attribute instance-attribute
play_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
play_history class-attribute instance-attribute
play_history: list[Time] | None | UnsetType = UNSET
o_history class-attribute instance-attribute
o_history: list[Time] | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | UnsetType = UNSET
organized class-attribute instance-attribute
organized: bool | UnsetType = UNSET
files class-attribute instance-attribute
files: list[VideoFile] | UnsetType = UNSET
paths class-attribute instance-attribute
paths: ScenePathsType | UnsetType = UNSET
scene_markers class-attribute instance-attribute
scene_markers: list[SceneMarker] | UnsetType = UNSET
galleries class-attribute instance-attribute
galleries: list[Gallery] | UnsetType = UNSET
groups class-attribute instance-attribute
groups: list[SceneGroup] | UnsetType = UNSET
tags class-attribute instance-attribute
tags: list[Tag] | UnsetType = UNSET
performers class-attribute instance-attribute
performers: list[Performer] | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashID] | UnsetType = UNSET
scene_streams class-attribute instance-attribute
scene_streams: list[SceneStreamEndpoint] | UnsetType = (
    Field(default=UNSET, alias="sceneStreams")
)
captions class-attribute instance-attribute
captions: list[VideoCaption] | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: Map | UnsetType = UNSET

Functions

add_to_gallery(gallery: Gallery) -> None

Add scene to gallery (syncs inverse automatically, call save() to persist).

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).

remove_tag async
remove_tag(tag: Tag) -> None

Remove tag from scene (syncs inverse automatically, call save() to persist).

set_studio
set_studio(studio: Studio | None) -> None

Set scene studio (call save() to persist).

Performer

Bases: StashObject

Performer type from schema/types/performer.graphql.

Attributes

name class-attribute instance-attribute
name: str | UnsetType = UNSET
alias_list class-attribute instance-attribute
alias_list: list[str] | UnsetType = UNSET
tags class-attribute instance-attribute
tags: list[Tag] | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashID] | UnsetType = UNSET
scenes class-attribute instance-attribute
scenes: list[Scene] | UnsetType = UNSET
groups class-attribute instance-attribute
groups: list[Group] | UnsetType = UNSET
favorite class-attribute instance-attribute
favorite: bool | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | UnsetType = UNSET
scene_count class-attribute instance-attribute
scene_count: int | UnsetType = Field(default=UNSET, ge=0)
image_count class-attribute instance-attribute
image_count: int | UnsetType = Field(default=UNSET, ge=0)
gallery_count class-attribute instance-attribute
gallery_count: int | UnsetType = Field(default=UNSET, ge=0)
group_count class-attribute instance-attribute
group_count: int | UnsetType = Field(default=UNSET, ge=0)
performer_count class-attribute instance-attribute
performer_count: int | UnsetType = Field(
    default=UNSET, ge=0
)
custom_fields class-attribute instance-attribute
custom_fields: Map | UnsetType = UNSET
disambiguation class-attribute instance-attribute
disambiguation: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | UnsetType = UNSET
gender class-attribute instance-attribute
gender: GenderEnum | None | UnsetType = UNSET
birthdate class-attribute instance-attribute
birthdate: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
ethnicity class-attribute instance-attribute
ethnicity: str | None | UnsetType = UNSET
country class-attribute instance-attribute
country: str | None | UnsetType = UNSET
eye_color class-attribute instance-attribute
eye_color: str | None | UnsetType = UNSET
height_cm class-attribute instance-attribute
height_cm: int | None | UnsetType = UNSET
measurements class-attribute instance-attribute
measurements: str | None | UnsetType = UNSET
fake_tits class-attribute instance-attribute
fake_tits: str | None | UnsetType = UNSET
penis_length class-attribute instance-attribute
penis_length: float | None | UnsetType = UNSET
circumcised class-attribute instance-attribute
circumcised: CircumcisedEnum | None | UnsetType = UNSET
career_length class-attribute instance-attribute
career_length: str | None | UnsetType = UNSET
tattoos class-attribute instance-attribute
tattoos: str | None | UnsetType = UNSET
piercings class-attribute instance-attribute
piercings: str | None | UnsetType = UNSET
image_path class-attribute instance-attribute
image_path: str | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
death_date class-attribute instance-attribute
death_date: str | None | UnsetType = UNSET
hair_color class-attribute instance-attribute
hair_color: str | None | UnsetType = UNSET
weight class-attribute instance-attribute
weight: int | None | UnsetType = UNSET
o_counter class-attribute instance-attribute
o_counter: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
career_start class-attribute instance-attribute
career_start: str | None | UnsetType = UNSET
career_end class-attribute instance-attribute
career_end: str | None | UnsetType = UNSET

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

title class-attribute instance-attribute
title: str | None | UnsetType = UNSET
code class-attribute instance-attribute
code: str | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
photographer class-attribute instance-attribute
photographer: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
folder class-attribute instance-attribute
folder: Folder | None | UnsetType = UNSET
studio class-attribute instance-attribute
studio: Studio | None | UnsetType = UNSET
cover class-attribute instance-attribute
cover: Image | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | UnsetType = UNSET
organized class-attribute instance-attribute
organized: bool | UnsetType = UNSET
files class-attribute instance-attribute
files: list[GalleryFile] | UnsetType = UNSET
chapters class-attribute instance-attribute
chapters: list[GalleryChapter] | UnsetType = UNSET
scenes class-attribute instance-attribute
scenes: list[Scene] | UnsetType = UNSET
image_count class-attribute instance-attribute
image_count: int | UnsetType = Field(default=UNSET, ge=0)
tags class-attribute instance-attribute
tags: list[Tag] | UnsetType = UNSET
performers class-attribute instance-attribute
performers: list[Performer] | UnsetType = UNSET
paths class-attribute instance-attribute
paths: GalleryPathsType | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: Map | UnsetType = UNSET

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:

gallery = await client.find_gallery("123")

# Get first image
first_image = await gallery.image(0)

# Get last image (if you know the count)
if is_set(gallery.image_count):
    last_image = await gallery.image(gallery.image_count - 1)
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).

add_tag async
add_tag(tag: Tag) -> None

Add tag (syncs inverse automatically, call save() to persist).

remove_tag async
remove_tag(tag: Tag) -> None

Remove tag (syncs inverse automatically, call save() to persist).

Image

Bases: StashObject

Image type from schema.

Attributes

title class-attribute instance-attribute
title: str | None | UnsetType = UNSET
code class-attribute instance-attribute
code: str | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
photographer class-attribute instance-attribute
photographer: str | None | UnsetType = UNSET
studio class-attribute instance-attribute
studio: Studio | None | UnsetType = UNSET
o_counter class-attribute instance-attribute
o_counter: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
urls class-attribute instance-attribute
urls: list[str] | UnsetType = Field(default=UNSET)
organized class-attribute instance-attribute
organized: bool | UnsetType = UNSET
visual_files class-attribute instance-attribute
visual_files: list[VisualFile] | UnsetType = Field(
    default=UNSET
)
paths class-attribute instance-attribute
paths: ImagePathsType | UnsetType = Field(default=UNSET)
galleries class-attribute instance-attribute
galleries: list[Gallery] | UnsetType = Field(default=UNSET)
tags class-attribute instance-attribute
tags: list[Tag] | UnsetType = Field(default=UNSET)
performers class-attribute instance-attribute
performers: list[Performer] | UnsetType = Field(
    default=UNSET
)
custom_fields class-attribute instance-attribute
custom_fields: Map | UnsetType = UNSET

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(gallery: Gallery) -> None

Add gallery (syncs inverse automatically, call save() to persist).

remove_from_gallery(gallery: Gallery) -> None

Remove gallery (syncs inverse automatically, call save() to persist).

add_tag async
add_tag(tag: Tag) -> None

Add tag (syncs inverse automatically, call save() to persist).

remove_tag async
remove_tag(tag: Tag) -> None

Remove tag (syncs inverse automatically, call save() to persist).

Group

Bases: StashObject

Group type from schema.

Attributes

name class-attribute instance-attribute
name: str | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | UnsetType = Field(default=UNSET)
tags class-attribute instance-attribute
tags: list[Tag] | UnsetType = Field(default=UNSET)
containing_groups class-attribute instance-attribute
containing_groups: list[GroupDescription] | UnsetType = (
    Field(default=UNSET)
)
sub_groups class-attribute instance-attribute
sub_groups: list[GroupDescription] | UnsetType = Field(
    default=UNSET
)
scenes class-attribute instance-attribute
scenes: list[Scene] | UnsetType = Field(default=UNSET)
aliases class-attribute instance-attribute
aliases: str | None | UnsetType = UNSET
duration class-attribute instance-attribute
duration: int | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
studio class-attribute instance-attribute
studio: Studio | None | UnsetType = UNSET
director class-attribute instance-attribute
director: str | None | UnsetType = UNSET
synopsis class-attribute instance-attribute
synopsis: str | None | UnsetType = UNSET
front_image_path class-attribute instance-attribute
front_image_path: str | None | UnsetType = UNSET
back_image_path class-attribute instance-attribute
back_image_path: str | None | UnsetType = UNSET
scene_count class-attribute instance-attribute
scene_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
performer_count class-attribute instance-attribute
performer_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
sub_group_count class-attribute instance-attribute
sub_group_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
o_counter class-attribute instance-attribute
o_counter: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
custom_fields class-attribute instance-attribute
custom_fields: Map | UnsetType = UNSET

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

name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
parent_studio class-attribute instance-attribute
parent_studio: Studio | None | UnsetType = UNSET
child_studios class-attribute instance-attribute
child_studios: list[Studio] | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: list[str] | None | UnsetType = UNSET
tags class-attribute instance-attribute
tags: list[Tag] | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
image_path class-attribute instance-attribute
image_path: str | None | UnsetType = UNSET
scene_count class-attribute instance-attribute
scene_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
image_count class-attribute instance-attribute
image_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
gallery_count class-attribute instance-attribute
gallery_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
performer_count class-attribute instance-attribute
performer_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
group_count class-attribute instance-attribute
group_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
stash_ids class-attribute instance-attribute
stash_ids: list[StashID] | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
favorite class-attribute instance-attribute
favorite: bool | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
groups class-attribute instance-attribute
groups: list[Any] | None | UnsetType = UNSET
o_counter class-attribute instance-attribute
o_counter: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
custom_fields class-attribute instance-attribute
custom_fields: Map | UnsetType = UNSET
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET

Functions

handle_deprecated_url classmethod
handle_deprecated_url(data: Any) -> Any

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).

add_child_studio async
add_child_studio(child: Studio) -> None

Add child studio (syncs inverse automatically, call save() to persist).

remove_child_studio async
remove_child_studio(child: Studio) -> None

Remove child studio (syncs inverse automatically, call save() to persist).

Tag

Bases: StashObject

Tag type from schema/types/tag.graphql.

Attributes

name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
sort_name class-attribute instance-attribute
sort_name: str | None | UnsetType = UNSET
description class-attribute instance-attribute
description: str | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: list[str] | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
favorite class-attribute instance-attribute
favorite: bool | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashID] | None | UnsetType = UNSET
image_path class-attribute instance-attribute
image_path: str | None | UnsetType = UNSET
scene_count class-attribute instance-attribute
scene_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
scene_marker_count class-attribute instance-attribute
scene_marker_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
image_count class-attribute instance-attribute
image_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
gallery_count class-attribute instance-attribute
gallery_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
performer_count class-attribute instance-attribute
performer_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
studio_count class-attribute instance-attribute
studio_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
group_count class-attribute instance-attribute
group_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
parents class-attribute instance-attribute
parents: list[Tag] | None | UnsetType = UNSET
children class-attribute instance-attribute
children: list[Tag] | None | UnsetType = UNSET
parent_count class-attribute instance-attribute
parent_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
child_count class-attribute instance-attribute
child_count: int | None | UnsetType = Field(
    default=UNSET, ge=0
)
custom_fields class-attribute instance-attribute
custom_fields: Map | UnsetType = UNSET

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.

Attributes

scene class-attribute instance-attribute
scene: Scene | None | UnsetType = UNSET
title class-attribute instance-attribute
title: str | None | UnsetType = UNSET
seconds class-attribute instance-attribute
seconds: float | None | UnsetType = UNSET
primary_tag class-attribute instance-attribute
primary_tag: Tag | None | UnsetType = UNSET
tags class-attribute instance-attribute
tags: list[Tag] | None | UnsetType = UNSET
stream class-attribute instance-attribute
stream: str | None | UnsetType = UNSET
preview class-attribute instance-attribute
preview: str | None | UnsetType = UNSET
screenshot class-attribute instance-attribute
screenshot: str | None | UnsetType = UNSET
end_seconds class-attribute instance-attribute
end_seconds: float | None | UnsetType = UNSET

Functions

add_tag async
add_tag(tag: Tag) -> None

Add tag to scene marker (syncs inverse automatically, call save() to persist).

remove_tag async
remove_tag(tag: Tag) -> None

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 module-attribute

UNSET = UnsetType()

Date Utilities

FuzzyDate

FuzzyDate(value: str)

Represents a date with variable precision.

Examples:

>>> date = FuzzyDate("2024")
>>> date.precision
<DatePrecision.YEAR: 'year'>
>>> date.value
'2024'
>>> date = FuzzyDate("2024-03")
>>> date.precision
<DatePrecision.MONTH: 'month'>
>>> date = FuzzyDate("2024-03-15")
>>> date.precision
<DatePrecision.DAY: 'day'>

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

value instance-attribute
value = value
precision instance-attribute
precision = parse_date_precision(value)

Functions

to_datetime
to_datetime() -> 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:

>>> FuzzyDate("2024").to_datetime()
datetime.datetime(2024, 1, 1, 0, 0)
>>> FuzzyDate("2024-03").to_datetime()
datetime.datetime(2024, 3, 1, 0, 0)
>>> FuzzyDate("2024-03-15").to_datetime()
datetime.datetime(2024, 3, 15, 0, 0)

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 class-attribute instance-attribute
DAY = 'day'
MONTH class-attribute instance-attribute
MONTH = 'month'
YEAR class-attribute instance-attribute
YEAR = 'year'
OTHER class-attribute instance-attribute
OTHER = 'other'

validate_fuzzy_date

validate_fuzzy_date(date_str: str) -> bool

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:

>>> validate_fuzzy_date("2024")
True
>>> validate_fuzzy_date("2024-03")
True
>>> validate_fuzzy_date("2024-03-15")
True
>>> validate_fuzzy_date("2024-3-15")
False
>>> validate_fuzzy_date("invalid")
False

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:

>>> normalize_date("2024-03-15", "month")
'2024-03'
>>> normalize_date("2024-03-15", "year")
'2024'
>>> normalize_date("2024", "day")
'2024-01-01'

Enums

Enum types from schema.

Classes

GenderEnum

Bases: StrEnum

Gender enum from schema.

Attributes
MALE class-attribute instance-attribute
MALE = 'MALE'
FEMALE class-attribute instance-attribute
FEMALE = 'FEMALE'
TRANSGENDER_MALE class-attribute instance-attribute
TRANSGENDER_MALE = 'TRANSGENDER_MALE'
TRANSGENDER_FEMALE class-attribute instance-attribute
TRANSGENDER_FEMALE = 'TRANSGENDER_FEMALE'
INTERSEX class-attribute instance-attribute
INTERSEX = 'INTERSEX'
NON_BINARY class-attribute instance-attribute
NON_BINARY = 'NON_BINARY'

CircumcisedEnum

Bases: StrEnum

Circumcision enum from schema.

Attributes
CUT class-attribute instance-attribute
CUT = 'CUT'
UNCUT class-attribute instance-attribute
UNCUT = 'UNCUT'

BulkUpdateIdMode

Bases: StrEnum

Bulk update mode enum from schema.

Attributes
SET class-attribute instance-attribute
SET = 'SET'
ADD class-attribute instance-attribute
ADD = 'ADD'
REMOVE class-attribute instance-attribute
REMOVE = 'REMOVE'

SortDirectionEnum

Bases: StrEnum

Sort direction enum from schema.

Attributes
ASC class-attribute instance-attribute
ASC = 'ASC'
DESC class-attribute instance-attribute
DESC = 'DESC'

ResolutionEnum

Bases: StrEnum

Resolution enum from schema.

Attributes
VERY_LOW class-attribute instance-attribute
VERY_LOW = 'VERY_LOW'
LOW class-attribute instance-attribute
LOW = 'LOW'
R360P class-attribute instance-attribute
R360P = 'R360P'
STANDARD class-attribute instance-attribute
STANDARD = 'STANDARD'
WEB_HD class-attribute instance-attribute
WEB_HD = 'WEB_HD'
STANDARD_HD class-attribute instance-attribute
STANDARD_HD = 'STANDARD_HD'
FULL_HD class-attribute instance-attribute
FULL_HD = 'FULL_HD'
QUAD_HD class-attribute instance-attribute
QUAD_HD = 'QUAD_HD'
FOUR_K class-attribute instance-attribute
FOUR_K = 'FOUR_K'
FIVE_K class-attribute instance-attribute
FIVE_K = 'FIVE_K'
SIX_K class-attribute instance-attribute
SIX_K = 'SIX_K'
SEVEN_K class-attribute instance-attribute
SEVEN_K = 'SEVEN_K'
EIGHT_K class-attribute instance-attribute
EIGHT_K = 'EIGHT_K'
HUGE class-attribute instance-attribute
HUGE = 'HUGE'

OrientationEnum

Bases: StrEnum

Orientation enum from schema.

Attributes
LANDSCAPE class-attribute instance-attribute
LANDSCAPE = 'LANDSCAPE'
PORTRAIT class-attribute instance-attribute
PORTRAIT = 'PORTRAIT'
SQUARE class-attribute instance-attribute
SQUARE = 'SQUARE'

CriterionModifier

Bases: StrEnum

Criterion modifier enum from schema.

Attributes
EQUALS class-attribute instance-attribute
EQUALS = 'EQUALS'
NOT_EQUALS class-attribute instance-attribute
NOT_EQUALS = 'NOT_EQUALS'
GREATER_THAN class-attribute instance-attribute
GREATER_THAN = 'GREATER_THAN'
LESS_THAN class-attribute instance-attribute
LESS_THAN = 'LESS_THAN'
IS_NULL class-attribute instance-attribute
IS_NULL = 'IS_NULL'
NOT_NULL class-attribute instance-attribute
NOT_NULL = 'NOT_NULL'
INCLUDES_ALL class-attribute instance-attribute
INCLUDES_ALL = 'INCLUDES_ALL'
INCLUDES class-attribute instance-attribute
INCLUDES = 'INCLUDES'
EXCLUDES class-attribute instance-attribute
EXCLUDES = 'EXCLUDES'
MATCHES_REGEX class-attribute instance-attribute
MATCHES_REGEX = 'MATCHES_REGEX'
NOT_MATCHES_REGEX class-attribute instance-attribute
NOT_MATCHES_REGEX = 'NOT_MATCHES_REGEX'
BETWEEN class-attribute instance-attribute
BETWEEN = 'BETWEEN'
NOT_BETWEEN class-attribute instance-attribute
NOT_BETWEEN = 'NOT_BETWEEN'

FilterMode

Bases: StrEnum

Filter mode enum from schema.

Attributes
SCENES class-attribute instance-attribute
SCENES = 'SCENES'
PERFORMERS class-attribute instance-attribute
PERFORMERS = 'PERFORMERS'
STUDIOS class-attribute instance-attribute
STUDIOS = 'STUDIOS'
GALLERIES class-attribute instance-attribute
GALLERIES = 'GALLERIES'
SCENE_MARKERS class-attribute instance-attribute
SCENE_MARKERS = 'SCENE_MARKERS'
MOVIES class-attribute instance-attribute
MOVIES = 'MOVIES'
GROUPS class-attribute instance-attribute
GROUPS = 'GROUPS'
TAGS class-attribute instance-attribute
TAGS = 'TAGS'
IMAGES class-attribute instance-attribute
IMAGES = 'IMAGES'

StreamingResolutionEnum

Bases: StrEnum

Streaming resolution enum from schema.

Attributes
LOW class-attribute instance-attribute
LOW = 'LOW'
STANDARD class-attribute instance-attribute
STANDARD = 'STANDARD'
STANDARD_HD class-attribute instance-attribute
STANDARD_HD = 'STANDARD_HD'
FULL_HD class-attribute instance-attribute
FULL_HD = 'FULL_HD'
FOUR_K class-attribute instance-attribute
FOUR_K = 'FOUR_K'
ORIGINAL class-attribute instance-attribute
ORIGINAL = 'ORIGINAL'

PreviewPreset

Bases: StrEnum

Preview preset enum from schema.

Attributes
ULTRAFAST class-attribute instance-attribute
ULTRAFAST = 'ultrafast'
VERYFAST class-attribute instance-attribute
VERYFAST = 'veryfast'
FAST class-attribute instance-attribute
FAST = 'fast'
MEDIUM class-attribute instance-attribute
MEDIUM = 'medium'
SLOW class-attribute instance-attribute
SLOW = 'slow'
SLOWER class-attribute instance-attribute
SLOWER = 'slower'
VERYSLOW class-attribute instance-attribute
VERYSLOW = 'veryslow'

HashAlgorithm

Bases: StrEnum

Hash algorithm enum from schema.

Attributes
MD5 class-attribute instance-attribute
MD5 = 'MD5'
OSHASH class-attribute instance-attribute
OSHASH = 'OSHASH'

BlobsStorageType

Bases: StrEnum

Blobs storage type enum from schema.

Attributes
DATABASE class-attribute instance-attribute
DATABASE = 'DATABASE'
FILESYSTEM class-attribute instance-attribute
FILESYSTEM = 'FILESYSTEM'

ImageLightboxDisplayMode

Bases: StrEnum

Image lightbox display mode enum from schema.

Attributes
ORIGINAL class-attribute instance-attribute
ORIGINAL = 'ORIGINAL'
FIT_XY class-attribute instance-attribute
FIT_XY = 'FIT_XY'
FIT_X class-attribute instance-attribute
FIT_X = 'FIT_X'

ImageLightboxScrollMode

Bases: StrEnum

Image lightbox scroll mode enum from schema.

Attributes
ZOOM class-attribute instance-attribute
ZOOM = 'ZOOM'
PAN_Y class-attribute instance-attribute
PAN_Y = 'PAN_Y'

IdentifyFieldStrategy

Bases: StrEnum

Strategy for identifying fields from schema/types/metadata.graphql.

Attributes
IGNORE class-attribute instance-attribute
IGNORE = 'IGNORE'
MERGE class-attribute instance-attribute
MERGE = 'MERGE'
OVERWRITE class-attribute instance-attribute
OVERWRITE = 'OVERWRITE'

ImportDuplicateEnum

Bases: StrEnum

Import duplicate behavior from schema/types/metadata.graphql.

Attributes
IGNORE class-attribute instance-attribute
IGNORE = 'IGNORE'
OVERWRITE class-attribute instance-attribute
OVERWRITE = 'OVERWRITE'
FAIL class-attribute instance-attribute
FAIL = 'FAIL'

ImportMissingRefEnum

Bases: StrEnum

Import missing reference behavior from schema/types/metadata.graphql.

Attributes
IGNORE class-attribute instance-attribute
IGNORE = 'IGNORE'
FAIL class-attribute instance-attribute
FAIL = 'FAIL'
CREATE class-attribute instance-attribute
CREATE = 'CREATE'

SystemStatusEnum

Bases: StrEnum

System status enum from schema/types/metadata.graphql.

Attributes
SETUP class-attribute instance-attribute
SETUP = 'SETUP'
NEEDS_MIGRATION class-attribute instance-attribute
NEEDS_MIGRATION = 'NEEDS_MIGRATION'
OK class-attribute instance-attribute
OK = 'OK'

JobStatus

Bases: StrEnum

Job status enum from schema/types/job.graphql.

Attributes
READY class-attribute instance-attribute
READY = 'READY'
RUNNING class-attribute instance-attribute
RUNNING = 'RUNNING'
FINISHED class-attribute instance-attribute
FINISHED = 'FINISHED'
STOPPING class-attribute instance-attribute
STOPPING = 'STOPPING'
CANCELLED class-attribute instance-attribute
CANCELLED = 'CANCELLED'
FAILED class-attribute instance-attribute
FAILED = 'FAILED'

JobStatusUpdateType

Bases: StrEnum

Job status update type enum from schema/types/job.graphql.

Attributes
ADD class-attribute instance-attribute
ADD = 'ADD'
REMOVE class-attribute instance-attribute
REMOVE = 'REMOVE'
UPDATE class-attribute instance-attribute
UPDATE = 'UPDATE'

LogLevel

Bases: StrEnum

Log level enum from schema/types/logging.graphql.

Attributes
TRACE class-attribute instance-attribute
TRACE = 'Trace'
DEBUG class-attribute instance-attribute
DEBUG = 'Debug'
INFO class-attribute instance-attribute
INFO = 'Info'
PROGRESS class-attribute instance-attribute
PROGRESS = 'Progress'
WARNING class-attribute instance-attribute
WARNING = 'Warning'
ERROR class-attribute instance-attribute
ERROR = 'Error'

PluginSettingTypeEnum

Bases: StrEnum

Plugin setting type enum from schema/types/plugin.graphql.

Attributes
STRING class-attribute instance-attribute
STRING = 'STRING'
NUMBER class-attribute instance-attribute
NUMBER = 'NUMBER'
BOOLEAN class-attribute instance-attribute
BOOLEAN = 'BOOLEAN'

ScrapeContentType

Bases: StrEnum

Scrape content type enum from schema/types/scraper.graphql.

Attributes
GALLERY class-attribute instance-attribute
GALLERY = 'GALLERY'
IMAGE class-attribute instance-attribute
IMAGE = 'IMAGE'
MOVIE class-attribute instance-attribute
MOVIE = 'MOVIE'
GROUP class-attribute instance-attribute
GROUP = 'GROUP'
PERFORMER class-attribute instance-attribute
PERFORMER = 'PERFORMER'
SCENE class-attribute instance-attribute
SCENE = 'SCENE'

ScrapeType

Bases: StrEnum

Scrape type enum from schema/types/scraper.graphql.

Attributes
NAME class-attribute instance-attribute
NAME = 'NAME'
FRAGMENT class-attribute instance-attribute
FRAGMENT = 'FRAGMENT'
URL class-attribute instance-attribute
URL = 'URL'

PackageType

Bases: StrEnum

Package type enum from schema.

Attributes
SCRAPER class-attribute instance-attribute
SCRAPER = 'Scraper'
PLUGIN class-attribute instance-attribute
PLUGIN = 'Plugin'

OnMultipleMatch

Bases: Enum

Attributes
RETURN_NONE class-attribute instance-attribute
RETURN_NONE = 0
RETURN_LIST class-attribute instance-attribute
RETURN_LIST = 1
RETURN_FIRST class-attribute instance-attribute
RETURN_FIRST = 2

File Types

VideoFile

Bases: BaseFile

Video file type from schema/types/file.graphql.

Implements BaseFile and inherits StashObject through it.

Attributes

format class-attribute instance-attribute
format: str | UnsetType = UNSET
width class-attribute instance-attribute
width: int | UnsetType = UNSET
height class-attribute instance-attribute
height: int | UnsetType = UNSET
duration class-attribute instance-attribute
duration: float | UnsetType = UNSET
video_codec class-attribute instance-attribute
video_codec: str | UnsetType = UNSET
audio_codec class-attribute instance-attribute
audio_codec: str | UnsetType = UNSET
frame_rate class-attribute instance-attribute
frame_rate: float | UnsetType = UNSET
bit_rate class-attribute instance-attribute
bit_rate: int | UnsetType = UNSET

ImageFile

Bases: BaseFile

Image file type from schema/types/file.graphql.

Implements BaseFile and inherits StashObject through it.

Attributes

format class-attribute instance-attribute
format: str | UnsetType = UNSET
width class-attribute instance-attribute
width: int | UnsetType = UNSET
height class-attribute instance-attribute
height: int | UnsetType = UNSET

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.

Attributes

path class-attribute instance-attribute
path: str | UnsetType = UNSET
basename class-attribute instance-attribute
basename: str | UnsetType = UNSET
parent_folder class-attribute instance-attribute
parent_folder: Folder | UnsetType = UNSET
mod_time class-attribute instance-attribute
mod_time: datetime | UnsetType = UNSET
size class-attribute instance-attribute
size: int | UnsetType = UNSET
fingerprints class-attribute instance-attribute
fingerprints: list[Fingerprint] | UnsetType = UNSET
zip_file class-attribute instance-attribute
zip_file: BasicFile | None | UnsetType = UNSET

Functions

to_input async
to_input() -> dict[str, Any]

Convert to GraphQL input.

Returns:

Type Description
dict[str, Any]

Dictionary of input fields for move or set fingerprints operations.

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 class-attribute instance-attribute
path: str | UnsetType = UNSET
mod_time class-attribute instance-attribute
mod_time: datetime | UnsetType = UNSET
parent_folder class-attribute instance-attribute
parent_folder: Folder | None | UnsetType = UNSET
zip_file class-attribute instance-attribute
zip_file: BasicFile | None | UnsetType = UNSET
basename class-attribute instance-attribute
basename: str | None | UnsetType = UNSET
parent_folders class-attribute instance-attribute
parent_folders: list[Folder] | None | UnsetType = UNSET

Functions

to_input async
to_input() -> dict[str, Any]

Convert to GraphQL input.

Returns:

Type Description
dict[str, Any]

Dictionary of input fields for move operation.

Input Types

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

SceneCreateInput

Bases: StashInput

Input for creating scenes.

Attributes

title class-attribute instance-attribute
title: str | None | UnsetType = UNSET
code class-attribute instance-attribute
code: str | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
director class-attribute instance-attribute
director: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
studio_id class-attribute instance-attribute
studio_id: str | None | UnsetType = UNSET
gallery_ids class-attribute instance-attribute
gallery_ids: list[str] | None | UnsetType = UNSET
performer_ids class-attribute instance-attribute
performer_ids: list[str] | None | UnsetType = UNSET
groups class-attribute instance-attribute
groups: list[SceneGroupInput] | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
cover_image class-attribute instance-attribute
cover_image: str | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashIDInput] | None | UnsetType = UNSET
file_ids class-attribute instance-attribute
file_ids: list[str] | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: dict[str, Any] | None | UnsetType = UNSET

SceneUpdateInput

Bases: StashInput

Input for updating scenes.

Attributes

id instance-attribute
id: str
client_mutation_id class-attribute instance-attribute
client_mutation_id: str | None | UnsetType = Field(
    default=UNSET, alias="clientMutationId"
)
title class-attribute instance-attribute
title: str | None | UnsetType = UNSET
code class-attribute instance-attribute
code: str | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
director class-attribute instance-attribute
director: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
studio_id class-attribute instance-attribute
studio_id: str | None | UnsetType = UNSET
gallery_ids class-attribute instance-attribute
gallery_ids: list[str] | None | UnsetType = UNSET
performer_ids class-attribute instance-attribute
performer_ids: list[str] | None | UnsetType = UNSET
groups class-attribute instance-attribute
groups: list[SceneGroupInput] | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
cover_image class-attribute instance-attribute
cover_image: str | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashIDInput] | None | UnsetType = UNSET
resume_time class-attribute instance-attribute
resume_time: float | None | UnsetType = UNSET
play_duration class-attribute instance-attribute
play_duration: float | None | UnsetType = UNSET
primary_file_id class-attribute instance-attribute
primary_file_id: str | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: CustomFieldsInput | None | UnsetType = UNSET

PerformerCreateInput

Bases: StashInput

Input for creating performers.

Attributes

name instance-attribute
name: str
disambiguation class-attribute instance-attribute
disambiguation: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
gender class-attribute instance-attribute
gender: GenderEnum | None | UnsetType = UNSET
birthdate class-attribute instance-attribute
birthdate: str | None | UnsetType = UNSET
ethnicity class-attribute instance-attribute
ethnicity: str | None | UnsetType = UNSET
country class-attribute instance-attribute
country: str | None | UnsetType = UNSET
eye_color class-attribute instance-attribute
eye_color: str | None | UnsetType = UNSET
height_cm class-attribute instance-attribute
height_cm: int | None | UnsetType = UNSET
measurements class-attribute instance-attribute
measurements: str | None | UnsetType = UNSET
fake_tits class-attribute instance-attribute
fake_tits: str | None | UnsetType = UNSET
penis_length class-attribute instance-attribute
penis_length: float | None | UnsetType = UNSET
circumcised class-attribute instance-attribute
circumcised: CircumcisedEnum | None | UnsetType = UNSET
career_length class-attribute instance-attribute
career_length: str | None | UnsetType = UNSET
tattoos class-attribute instance-attribute
tattoos: str | None | UnsetType = UNSET
piercings class-attribute instance-attribute
piercings: str | None | UnsetType = UNSET
alias_list class-attribute instance-attribute
alias_list: list[str] | None | UnsetType = UNSET
favorite class-attribute instance-attribute
favorite: bool | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
image class-attribute instance-attribute
image: str | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashIDInput] | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
death_date class-attribute instance-attribute
death_date: str | None | UnsetType = UNSET
hair_color class-attribute instance-attribute
hair_color: str | None | UnsetType = UNSET
weight class-attribute instance-attribute
weight: int | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: dict[str, Any] | None | UnsetType = UNSET
career_start class-attribute instance-attribute
career_start: str | None | UnsetType = UNSET
career_end class-attribute instance-attribute
career_end: str | None | UnsetType = UNSET

PerformerUpdateInput

Bases: StashInput

Input for updating performers.

Attributes

id instance-attribute
id: str
name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
disambiguation class-attribute instance-attribute
disambiguation: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
gender class-attribute instance-attribute
gender: GenderEnum | None | UnsetType = UNSET
birthdate class-attribute instance-attribute
birthdate: str | None | UnsetType = UNSET
ethnicity class-attribute instance-attribute
ethnicity: str | None | UnsetType = UNSET
country class-attribute instance-attribute
country: str | None | UnsetType = UNSET
eye_color class-attribute instance-attribute
eye_color: str | None | UnsetType = UNSET
height_cm class-attribute instance-attribute
height_cm: int | None | UnsetType = UNSET
measurements class-attribute instance-attribute
measurements: str | None | UnsetType = UNSET
fake_tits class-attribute instance-attribute
fake_tits: str | None | UnsetType = UNSET
penis_length class-attribute instance-attribute
penis_length: float | None | UnsetType = UNSET
circumcised class-attribute instance-attribute
circumcised: CircumcisedEnum | None | UnsetType = UNSET
career_length class-attribute instance-attribute
career_length: str | None | UnsetType = UNSET
tattoos class-attribute instance-attribute
tattoos: str | None | UnsetType = UNSET
piercings class-attribute instance-attribute
piercings: str | None | UnsetType = UNSET
alias_list class-attribute instance-attribute
alias_list: list[str] | None | UnsetType = UNSET
favorite class-attribute instance-attribute
favorite: bool | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
image class-attribute instance-attribute
image: str | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashIDInput] | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
death_date class-attribute instance-attribute
death_date: str | None | UnsetType = UNSET
hair_color class-attribute instance-attribute
hair_color: str | None | UnsetType = UNSET
weight class-attribute instance-attribute
weight: int | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: CustomFieldsInput | None | UnsetType = UNSET
career_start class-attribute instance-attribute
career_start: str | None | UnsetType = UNSET
career_end class-attribute instance-attribute
career_end: str | None | UnsetType = UNSET

GalleryCreateInput

Bases: StashInput

Input for creating galleries.

Attributes

title instance-attribute
title: str
code class-attribute instance-attribute
code: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
photographer class-attribute instance-attribute
photographer: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
scene_ids class-attribute instance-attribute
scene_ids: list[str] | None | UnsetType = UNSET
studio_id class-attribute instance-attribute
studio_id: str | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
performer_ids class-attribute instance-attribute
performer_ids: list[str] | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: dict[str, Any] | None | UnsetType = UNSET

GalleryUpdateInput

Bases: StashInput

Input for updating galleries.

Attributes

id instance-attribute
id: str
client_mutation_id class-attribute instance-attribute
client_mutation_id: str | None | UnsetType = Field(
    default=UNSET, alias="clientMutationId"
)
title class-attribute instance-attribute
title: str | None | UnsetType = UNSET
code class-attribute instance-attribute
code: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
photographer class-attribute instance-attribute
photographer: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
scene_ids class-attribute instance-attribute
scene_ids: list[str] | None | UnsetType = UNSET
studio_id class-attribute instance-attribute
studio_id: str | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
performer_ids class-attribute instance-attribute
performer_ids: list[str] | None | UnsetType = UNSET
primary_file_id class-attribute instance-attribute
primary_file_id: str | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: CustomFieldsInput | None | UnsetType = UNSET

GroupCreateInput

Bases: StashInput

Input for creating groups from schema/types/group.graphql.

Attributes

name class-attribute instance-attribute
name: str | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: str | None | UnsetType = UNSET
duration class-attribute instance-attribute
duration: int | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
studio_id class-attribute instance-attribute
studio_id: str | None | UnsetType = UNSET
director class-attribute instance-attribute
director: str | None | UnsetType = UNSET
synopsis class-attribute instance-attribute
synopsis: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
containing_groups class-attribute instance-attribute
containing_groups: (
    list[GroupDescriptionInput] | None | UnsetType
) = UNSET
sub_groups class-attribute instance-attribute
sub_groups: (
    list[GroupDescriptionInput] | None | UnsetType
) = UNSET
front_image class-attribute instance-attribute
front_image: str | None | UnsetType = UNSET
back_image class-attribute instance-attribute
back_image: str | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: dict[str, Any] | None | UnsetType = UNSET

GroupUpdateInput

Bases: StashInput

Input for updating groups from schema/types/group.graphql.

Attributes

id instance-attribute
id: str
name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: str | None | UnsetType = UNSET
duration class-attribute instance-attribute
duration: int | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
studio_id class-attribute instance-attribute
studio_id: str | None | UnsetType = UNSET
director class-attribute instance-attribute
director: str | None | UnsetType = UNSET
synopsis class-attribute instance-attribute
synopsis: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
containing_groups class-attribute instance-attribute
containing_groups: (
    list[GroupDescriptionInput] | None | UnsetType
) = UNSET
sub_groups class-attribute instance-attribute
sub_groups: (
    list[GroupDescriptionInput] | None | UnsetType
) = UNSET
front_image class-attribute instance-attribute
front_image: str | None | UnsetType = UNSET
back_image class-attribute instance-attribute
back_image: str | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: CustomFieldsInput | None | UnsetType = UNSET

StudioCreateInput

Bases: StashInput

Input for creating studios.

Attributes

name instance-attribute
name: str
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
parent_id class-attribute instance-attribute
parent_id: str | None | UnsetType = UNSET
image class-attribute instance-attribute
image: str | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashIDInput] | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
favorite class-attribute instance-attribute
favorite: bool | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: list[str] | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: dict[str, Any] | None | UnsetType = UNSET

StudioUpdateInput

Bases: StashInput

Input for updating studios.

Attributes

id instance-attribute
id: str
name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
parent_id class-attribute instance-attribute
parent_id: str | None | UnsetType = UNSET
image class-attribute instance-attribute
image: str | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashIDInput] | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: int | None | UnsetType = Field(
    default=UNSET, ge=0, le=100
)
favorite class-attribute instance-attribute
favorite: bool | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: list[str] | None | UnsetType = UNSET
tag_ids class-attribute instance-attribute
tag_ids: list[str] | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: CustomFieldsInput | None | UnsetType = UNSET

TagCreateInput

Bases: StashInput

Input for creating tags.

Attributes

name instance-attribute
name: str
sort_name class-attribute instance-attribute
sort_name: str | None | UnsetType = UNSET
description class-attribute instance-attribute
description: str | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: list[str] | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
favorite class-attribute instance-attribute
favorite: bool | None | UnsetType = UNSET
image class-attribute instance-attribute
image: str | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashIDInput] | None | UnsetType = UNSET
parent_ids class-attribute instance-attribute
parent_ids: list[str] | None | UnsetType = UNSET
child_ids class-attribute instance-attribute
child_ids: list[str] | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: dict[str, Any] | None | UnsetType = UNSET

TagUpdateInput

Bases: StashInput

Input for updating tags.

Attributes

id instance-attribute
id: str
name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
sort_name class-attribute instance-attribute
sort_name: str | None | UnsetType = UNSET
description class-attribute instance-attribute
description: str | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: list[str] | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
favorite class-attribute instance-attribute
favorite: bool | None | UnsetType = UNSET
image class-attribute instance-attribute
image: str | None | UnsetType = UNSET
stash_ids class-attribute instance-attribute
stash_ids: list[StashIDInput] | None | UnsetType = UNSET
parent_ids class-attribute instance-attribute
parent_ids: list[str] | None | UnsetType = UNSET
child_ids class-attribute instance-attribute
child_ids: list[str] | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: CustomFieldsInput | None | UnsetType = UNSET

Filter Types

SceneFilterType

Bases: StashInput

Input for scene filter.

Attributes

AND class-attribute instance-attribute
OR class-attribute instance-attribute
NOT class-attribute instance-attribute
id class-attribute instance-attribute
id: IntCriterionInput | None | UnsetType = UNSET
title class-attribute instance-attribute
title: StringCriterionInput | None | UnsetType = UNSET
code class-attribute instance-attribute
code: StringCriterionInput | None | UnsetType = UNSET
details class-attribute instance-attribute
details: StringCriterionInput | None | UnsetType = UNSET
director class-attribute instance-attribute
director: StringCriterionInput | None | UnsetType = UNSET
oshash class-attribute instance-attribute
oshash: StringCriterionInput | None | UnsetType = UNSET
checksum class-attribute instance-attribute
checksum: StringCriterionInput | None | UnsetType = UNSET
phash_distance class-attribute instance-attribute
phash_distance: (
    PhashDistanceCriterionInput | None | UnsetType
) = UNSET
path class-attribute instance-attribute
path: StringCriterionInput | None | UnsetType = UNSET
file_count class-attribute instance-attribute
file_count: IntCriterionInput | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: IntCriterionInput | None | UnsetType = UNSET
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
o_counter class-attribute instance-attribute
o_counter: IntCriterionInput | None | UnsetType = UNSET
duplicated class-attribute instance-attribute
duplicated: DuplicationCriterionInput | None | UnsetType = (
    UNSET
)
resolution class-attribute instance-attribute
resolution: ResolutionCriterionInput | None | UnsetType = (
    UNSET
)
orientation class-attribute instance-attribute
orientation: (
    OrientationCriterionInput | None | UnsetType
) = UNSET
framerate class-attribute instance-attribute
framerate: IntCriterionInput | None | UnsetType = UNSET
bitrate class-attribute instance-attribute
bitrate: IntCriterionInput | None | UnsetType = UNSET
video_codec class-attribute instance-attribute
video_codec: StringCriterionInput | None | UnsetType = UNSET
audio_codec class-attribute instance-attribute
audio_codec: StringCriterionInput | None | UnsetType = UNSET
duration class-attribute instance-attribute
duration: IntCriterionInput | None | UnsetType = UNSET
has_markers class-attribute instance-attribute
has_markers: str | None | UnsetType = UNSET
is_missing class-attribute instance-attribute
is_missing: str | None | UnsetType = UNSET
studios class-attribute instance-attribute
studios: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
groups class-attribute instance-attribute
groups: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
galleries class-attribute instance-attribute
galleries: MultiCriterionInput | None | UnsetType = UNSET
tags class-attribute instance-attribute
tags: HierarchicalMultiCriterionInput | None | UnsetType = (
    UNSET
)
tag_count class-attribute instance-attribute
tag_count: IntCriterionInput | None | UnsetType = UNSET
performer_tags class-attribute instance-attribute
performer_tags: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
performer_favorite class-attribute instance-attribute
performer_favorite: bool | None | UnsetType = UNSET
performer_age class-attribute instance-attribute
performer_age: IntCriterionInput | None | UnsetType = UNSET
performers class-attribute instance-attribute
performers: MultiCriterionInput | None | UnsetType = UNSET
performer_count class-attribute instance-attribute
performer_count: IntCriterionInput | None | UnsetType = (
    UNSET
)
stash_id_endpoint class-attribute instance-attribute
stash_id_endpoint: (
    StashIDCriterionInput | None | UnsetType
) = UNSET
stash_ids_endpoint class-attribute instance-attribute
stash_ids_endpoint: (
    StashIDsCriterionInput | None | UnsetType
) = UNSET
stash_id_count class-attribute instance-attribute
stash_id_count: IntCriterionInput | None | UnsetType = UNSET
url class-attribute instance-attribute
url: StringCriterionInput | None | UnsetType = UNSET
interactive class-attribute instance-attribute
interactive: bool | None | UnsetType = UNSET
interactive_speed class-attribute instance-attribute
interactive_speed: IntCriterionInput | None | UnsetType = (
    UNSET
)
captions class-attribute instance-attribute
captions: StringCriterionInput | None | UnsetType = UNSET
resume_time class-attribute instance-attribute
resume_time: IntCriterionInput | None | UnsetType = UNSET
play_count class-attribute instance-attribute
play_count: IntCriterionInput | None | UnsetType = UNSET
play_duration class-attribute instance-attribute
play_duration: IntCriterionInput | None | UnsetType = UNSET
last_played_at class-attribute instance-attribute
last_played_at: (
    TimestampCriterionInput | None | UnsetType
) = UNSET
date class-attribute instance-attribute
date: DateCriterionInput | None | UnsetType = UNSET
created_at class-attribute instance-attribute
created_at: TimestampCriterionInput | None | UnsetType = (
    UNSET
)
updated_at class-attribute instance-attribute
updated_at: TimestampCriterionInput | None | UnsetType = (
    UNSET
)
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
studios_filter: StudioFilterType | None | UnsetType = UNSET
tags_filter class-attribute instance-attribute
tags_filter: TagFilterType | None | UnsetType = UNSET
groups_filter class-attribute instance-attribute
groups_filter: GroupFilterType | None | UnsetType = UNSET
markers_filter class-attribute instance-attribute
markers_filter: SceneMarkerFilterType | None | UnsetType = (
    UNSET
)
files_filter class-attribute instance-attribute
files_filter: FileFilterType | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: (
    list[CustomFieldCriterionInput] | None | UnsetType
) = UNSET

PerformerFilterType

Bases: StashInput

Input for performer filter.

Attributes

AND class-attribute instance-attribute
OR class-attribute instance-attribute
NOT class-attribute instance-attribute
name class-attribute instance-attribute
name: StringCriterionInput | None | UnsetType = UNSET
disambiguation class-attribute instance-attribute
disambiguation: StringCriterionInput | None | UnsetType = (
    UNSET
)
details class-attribute instance-attribute
details: StringCriterionInput | None | UnsetType = UNSET
filter_favorites class-attribute instance-attribute
filter_favorites: bool | None | UnsetType = UNSET
birth_year class-attribute instance-attribute
birth_year: IntCriterionInput | None | UnsetType = UNSET
age class-attribute instance-attribute
age: IntCriterionInput | None | UnsetType = UNSET
ethnicity class-attribute instance-attribute
ethnicity: StringCriterionInput | None | UnsetType = UNSET
country class-attribute instance-attribute
country: StringCriterionInput | None | UnsetType = UNSET
eye_color class-attribute instance-attribute
eye_color: StringCriterionInput | None | UnsetType = UNSET
height_cm class-attribute instance-attribute
height_cm: IntCriterionInput | None | UnsetType = UNSET
measurements class-attribute instance-attribute
measurements: StringCriterionInput | None | UnsetType = (
    UNSET
)
fake_tits class-attribute instance-attribute
fake_tits: StringCriterionInput | None | UnsetType = UNSET
penis_length class-attribute instance-attribute
penis_length: FloatCriterionInput | None | UnsetType = UNSET
circumcised class-attribute instance-attribute
circumcised: (
    CircumcisionCriterionInput | None | UnsetType
) = UNSET
career_length class-attribute instance-attribute
career_length: StringCriterionInput | None | UnsetType = (
    UNSET
)
career_start class-attribute instance-attribute
career_start: DateCriterionInput | None | UnsetType = UNSET
career_end class-attribute instance-attribute
career_end: DateCriterionInput | None | UnsetType = UNSET
tattoos class-attribute instance-attribute
tattoos: StringCriterionInput | None | UnsetType = UNSET
piercings class-attribute instance-attribute
piercings: StringCriterionInput | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: StringCriterionInput | None | UnsetType = UNSET
gender class-attribute instance-attribute
gender: GenderCriterionInput | None | UnsetType = UNSET
is_missing class-attribute instance-attribute
is_missing: str | None | UnsetType = UNSET
tags class-attribute instance-attribute
tags: HierarchicalMultiCriterionInput | None | UnsetType = (
    UNSET
)
tag_count class-attribute instance-attribute
tag_count: IntCriterionInput | None | UnsetType = UNSET
scene_count class-attribute instance-attribute
scene_count: IntCriterionInput | None | UnsetType = UNSET
image_count class-attribute instance-attribute
image_count: IntCriterionInput | None | UnsetType = UNSET
gallery_count class-attribute instance-attribute
gallery_count: IntCriterionInput | None | UnsetType = UNSET
play_count class-attribute instance-attribute
play_count: IntCriterionInput | None | UnsetType = UNSET
o_counter class-attribute instance-attribute
o_counter: IntCriterionInput | None | UnsetType = UNSET
stash_id_endpoint class-attribute instance-attribute
stash_id_endpoint: (
    StashIDCriterionInput | None | UnsetType
) = UNSET
stash_ids_endpoint class-attribute instance-attribute
stash_ids_endpoint: (
    StashIDsCriterionInput | None | UnsetType
) = UNSET
rating100 class-attribute instance-attribute
rating100: IntCriterionInput | None | UnsetType = UNSET
url class-attribute instance-attribute
url: StringCriterionInput | None | UnsetType = UNSET
hair_color class-attribute instance-attribute
hair_color: StringCriterionInput | None | UnsetType = UNSET
weight class-attribute instance-attribute
weight: IntCriterionInput | None | UnsetType = UNSET
death_year class-attribute instance-attribute
death_year: IntCriterionInput | None | UnsetType = UNSET
studios class-attribute instance-attribute
studios: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
groups class-attribute instance-attribute
groups: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
performers class-attribute instance-attribute
performers: MultiCriterionInput | None | UnsetType = UNSET
ignore_auto_tag class-attribute instance-attribute
ignore_auto_tag: bool | None | UnsetType = UNSET
birthdate class-attribute instance-attribute
birthdate: DateCriterionInput | None | UnsetType = UNSET
death_date class-attribute instance-attribute
death_date: DateCriterionInput | None | UnsetType = UNSET
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
tags_filter: TagFilterType | None | UnsetType = UNSET
markers_filter class-attribute instance-attribute
markers_filter: SceneMarkerFilterType | None | UnsetType = (
    UNSET
)
created_at class-attribute instance-attribute
created_at: TimestampCriterionInput | None | UnsetType = (
    UNSET
)
updated_at class-attribute instance-attribute
updated_at: TimestampCriterionInput | None | UnsetType = (
    UNSET
)
marker_count class-attribute instance-attribute
marker_count: IntCriterionInput | None | UnsetType = UNSET
custom_fields class-attribute instance-attribute
custom_fields: (
    list[CustomFieldCriterionInput] | None | UnsetType
) = UNSET

GalleryFilterType

Bases: StashInput

Input for gallery filter.

Attributes

AND class-attribute instance-attribute
OR class-attribute instance-attribute
NOT class-attribute instance-attribute
id class-attribute instance-attribute
id: IntCriterionInput | None | UnsetType = UNSET
title class-attribute instance-attribute
title: StringCriterionInput | None | UnsetType = UNSET
details class-attribute instance-attribute
details: StringCriterionInput | None | UnsetType = UNSET
checksum class-attribute instance-attribute
checksum: StringCriterionInput | None | UnsetType = UNSET
path class-attribute instance-attribute
path: StringCriterionInput | None | UnsetType = UNSET
file_count class-attribute instance-attribute
file_count: IntCriterionInput | None | UnsetType = UNSET
is_missing class-attribute instance-attribute
is_missing: str | None | UnsetType = UNSET
is_zip class-attribute instance-attribute
is_zip: bool | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: IntCriterionInput | None | UnsetType = UNSET
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
average_resolution class-attribute instance-attribute
average_resolution: (
    ResolutionCriterionInput | None | UnsetType
) = UNSET
has_chapters class-attribute instance-attribute
has_chapters: str | None | UnsetType = UNSET
scenes class-attribute instance-attribute
scenes: MultiCriterionInput | None | UnsetType = UNSET
studios class-attribute instance-attribute
studios: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
tags class-attribute instance-attribute
tags: HierarchicalMultiCriterionInput | None | UnsetType = (
    UNSET
)
tag_count class-attribute instance-attribute
tag_count: IntCriterionInput | None | UnsetType = UNSET
performer_tags class-attribute instance-attribute
performer_tags: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
performers class-attribute instance-attribute
performers: MultiCriterionInput | None | UnsetType = UNSET
performer_count class-attribute instance-attribute
performer_count: IntCriterionInput | None | UnsetType = (
    UNSET
)
performer_favorite class-attribute instance-attribute
performer_favorite: bool | None | UnsetType = UNSET
performer_age class-attribute instance-attribute
performer_age: IntCriterionInput | None | UnsetType = UNSET
image_count class-attribute instance-attribute
image_count: IntCriterionInput | None | UnsetType = UNSET
url class-attribute instance-attribute
url: StringCriterionInput | None | UnsetType = UNSET
date class-attribute instance-attribute
date: DateCriterionInput | None | UnsetType = UNSET
created_at class-attribute instance-attribute
created_at: TimestampCriterionInput | None | UnsetType = (
    UNSET
)
updated_at class-attribute instance-attribute
updated_at: TimestampCriterionInput | None | UnsetType = (
    UNSET
)
code class-attribute instance-attribute
code: StringCriterionInput | None | UnsetType = UNSET
photographer class-attribute instance-attribute
photographer: StringCriterionInput | None | UnsetType = (
    UNSET
)
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
studios_filter: StudioFilterType | None | UnsetType = UNSET
tags_filter class-attribute instance-attribute
tags_filter: TagFilterType | None | UnsetType = UNSET
files_filter class-attribute instance-attribute
files_filter: FileFilterType | None | UnsetType = UNSET
folders_filter class-attribute instance-attribute
folders_filter: FolderFilterType | None | UnsetType = UNSET
parent_folder class-attribute instance-attribute
parent_folder: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
custom_fields class-attribute instance-attribute
custom_fields: (
    list[CustomFieldCriterionInput] | None | UnsetType
) = UNSET

ImageFilterType

Bases: StashInput

Input for image filter.

Attributes

AND class-attribute instance-attribute
OR class-attribute instance-attribute
NOT class-attribute instance-attribute
title class-attribute instance-attribute
title: StringCriterionInput | None | UnsetType = UNSET
details class-attribute instance-attribute
details: StringCriterionInput | None | UnsetType = UNSET
id class-attribute instance-attribute
id: IntCriterionInput | None | UnsetType = UNSET
checksum class-attribute instance-attribute
checksum: StringCriterionInput | None | UnsetType = UNSET
path class-attribute instance-attribute
path: StringCriterionInput | None | UnsetType = UNSET
file_count class-attribute instance-attribute
file_count: IntCriterionInput | None | UnsetType = UNSET
rating100 class-attribute instance-attribute
rating100: IntCriterionInput | None | UnsetType = UNSET
date class-attribute instance-attribute
date: DateCriterionInput | None | UnsetType = UNSET
url class-attribute instance-attribute
url: StringCriterionInput | None | UnsetType = UNSET
organized class-attribute instance-attribute
organized: bool | None | UnsetType = UNSET
o_counter class-attribute instance-attribute
o_counter: IntCriterionInput | None | UnsetType = UNSET
resolution class-attribute instance-attribute
resolution: ResolutionCriterionInput | None | UnsetType = (
    UNSET
)
orientation class-attribute instance-attribute
orientation: (
    OrientationCriterionInput | None | UnsetType
) = UNSET
is_missing class-attribute instance-attribute
is_missing: str | None | UnsetType = UNSET
studios class-attribute instance-attribute
studios: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
tags class-attribute instance-attribute
tags: HierarchicalMultiCriterionInput | None | UnsetType = (
    UNSET
)
tag_count class-attribute instance-attribute
tag_count: IntCriterionInput | None | UnsetType = UNSET
performer_tags class-attribute instance-attribute
performer_tags: (
    HierarchicalMultiCriterionInput | None | UnsetType
) = UNSET
performers class-attribute instance-attribute
performers: MultiCriterionInput | None | UnsetType = UNSET
performer_count class-attribute instance-attribute
performer_count: IntCriterionInput | None | UnsetType = (
    UNSET
)
performer_favorite class-attribute instance-attribute
performer_favorite: bool | None | UnsetType = UNSET
performer_age class-attribute instance-attribute
performer_age: IntCriterionInput | None | UnsetType = UNSET
galleries class-attribute instance-attribute
galleries: MultiCriterionInput | None | UnsetType = UNSET
created_at class-attribute instance-attribute
created_at: TimestampCriterionInput | None | UnsetType = (
    UNSET
)
updated_at class-attribute instance-attribute
updated_at: TimestampCriterionInput | None | UnsetType = (
    UNSET
)
code class-attribute instance-attribute
code: StringCriterionInput | None | UnsetType = UNSET
photographer class-attribute instance-attribute
photographer: StringCriterionInput | None | UnsetType = (
    UNSET
)
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
studios_filter: StudioFilterType | None | UnsetType = UNSET
tags_filter class-attribute instance-attribute
tags_filter: TagFilterType | None | UnsetType = UNSET
files_filter class-attribute instance-attribute
files_filter: FileFilterType | None | UnsetType = UNSET
phash_distance class-attribute instance-attribute
phash_distance: (
    PhashDistanceCriterionInput | None | UnsetType
) = UNSET
custom_fields class-attribute instance-attribute
custom_fields: (
    list[CustomFieldCriterionInput] | None | UnsetType
) = UNSET

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

count class-attribute instance-attribute
count: int | UnsetType = UNSET
duration class-attribute instance-attribute
duration: float | UnsetType = UNSET
filesize class-attribute instance-attribute
filesize: float | UnsetType = UNSET
scenes class-attribute instance-attribute
scenes: list[Scene] | UnsetType = UNSET

FindPerformersResultType

Bases: StashResult

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

Attributes

count class-attribute instance-attribute
count: int | UnsetType = UNSET
performers class-attribute instance-attribute
performers: list[Performer] | UnsetType = UNSET

FindGalleriesResultType

Bases: StashResult

Result type for finding galleries.

Attributes

count instance-attribute
count: int
galleries instance-attribute
galleries: list[Gallery]

FindImagesResultType

Bases: StashResult

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

Attributes

count class-attribute instance-attribute
count: int | UnsetType = UNSET
megapixels class-attribute instance-attribute
megapixels: float | UnsetType = UNSET
filesize class-attribute instance-attribute
filesize: float | UnsetType = UNSET
images class-attribute instance-attribute
images: list[Image] | UnsetType = Field(default=UNSET)

Job Types

Job

Bases: FromGraphQLMixin, BaseModel

Job type from schema/types/job.graphql.

Attributes

id class-attribute instance-attribute
id: str | None | UnsetType = UNSET
status class-attribute instance-attribute
status: JobStatus | None | UnsetType = UNSET
sub_tasks class-attribute instance-attribute
sub_tasks: list[str] | None | UnsetType = Field(
    default=UNSET, alias="subTasks"
)
description class-attribute instance-attribute
description: str | None | UnsetType = UNSET
progress class-attribute instance-attribute
progress: float | None | UnsetType = UNSET
start_time class-attribute instance-attribute
start_time: Time | None | UnsetType = Field(
    default=UNSET, alias="startTime"
)
end_time class-attribute instance-attribute
end_time: Time | None | UnsetType = Field(
    default=UNSET, alias="endTime"
)
add_time class-attribute instance-attribute
add_time: Time | None | UnsetType = Field(
    default=UNSET, alias="addTime"
)
error class-attribute instance-attribute
error: str | None | UnsetType = UNSET

JobStatus

Bases: StrEnum

Job status enum from schema/types/job.graphql.

Attributes

READY class-attribute instance-attribute
READY = 'READY'
RUNNING class-attribute instance-attribute
RUNNING = 'RUNNING'
FINISHED class-attribute instance-attribute
FINISHED = 'FINISHED'
STOPPING class-attribute instance-attribute
STOPPING = 'STOPPING'
CANCELLED class-attribute instance-attribute
CANCELLED = 'CANCELLED'
FAILED class-attribute instance-attribute
FAILED = 'FAILED'

Configuration Types

ConfigResult

Bases: FromGraphQLMixin, BaseModel

Result type for all configuration.

Attributes

general class-attribute instance-attribute
general: ConfigGeneralResult | UnsetType = UNSET
interface class-attribute instance-attribute
interface: ConfigInterfaceResult | UnsetType = UNSET
dlna class-attribute instance-attribute
dlna: ConfigDLNAResult | UnsetType = UNSET
scraping class-attribute instance-attribute
scraping: ConfigScrapingResult | UnsetType = UNSET
defaults class-attribute instance-attribute
defaults: ConfigDefaultSettingsResult | UnsetType = UNSET
ui class-attribute instance-attribute
ui: dict[str, Any] | UnsetType = UNSET

StashConfig

Bases: FromGraphQLMixin, BaseModel

Result type for stash configuration.

Attributes

path class-attribute instance-attribute
path: str | UnsetType = UNSET
exclude_video class-attribute instance-attribute
exclude_video: bool | UnsetType = Field(
    default=UNSET, alias="excludeVideo"
)
exclude_image class-attribute instance-attribute
exclude_image: bool | UnsetType = Field(
    default=UNSET, alias="excludeImage"
)

Metadata Types

ScanMetadataInput

Bases: StashInput

Input for metadata scanning from schema/types/metadata.graphql.

Attributes

paths class-attribute instance-attribute
paths: list[str] | UnsetType = UNSET
rescan class-attribute instance-attribute
rescan: bool | None | UnsetType = UNSET
scanGenerateCovers class-attribute instance-attribute
scanGenerateCovers: bool | None | UnsetType = UNSET
scanGeneratePreviews class-attribute instance-attribute
scanGeneratePreviews: bool | None | UnsetType = UNSET
scanGenerateImagePreviews class-attribute instance-attribute
scanGenerateImagePreviews: bool | None | UnsetType = UNSET
scanGenerateSprites class-attribute instance-attribute
scanGenerateSprites: bool | None | UnsetType = UNSET
scanGeneratePhashes class-attribute instance-attribute
scanGeneratePhashes: bool | None | UnsetType = UNSET
scanGenerateThumbnails class-attribute instance-attribute
scanGenerateThumbnails: bool | None | UnsetType = UNSET
scanGenerateClipPreviews class-attribute instance-attribute
scanGenerateClipPreviews: bool | None | UnsetType = UNSET
scanGenerateImagePhashes class-attribute instance-attribute
scanGenerateImagePhashes: bool | None | UnsetType = UNSET
filter class-attribute instance-attribute
filter: ScanMetaDataFilterInput | None | UnsetType = UNSET

GenerateMetadataInput

Bases: StashInput

Input for metadata generation from schema/types/metadata.graphql.

Attributes

covers class-attribute instance-attribute
covers: bool | UnsetType = UNSET
sprites class-attribute instance-attribute
sprites: bool | UnsetType = UNSET
previews class-attribute instance-attribute
previews: bool | UnsetType = UNSET
imagePreviews class-attribute instance-attribute
imagePreviews: bool | UnsetType = UNSET
previewOptions class-attribute instance-attribute
previewOptions: (
    GeneratePreviewOptionsInput | None | UnsetType
) = UNSET
markers class-attribute instance-attribute
markers: bool | UnsetType = UNSET
markerImagePreviews class-attribute instance-attribute
markerImagePreviews: bool | UnsetType = UNSET
markerScreenshots class-attribute instance-attribute
markerScreenshots: bool | UnsetType = UNSET
transcodes class-attribute instance-attribute
transcodes: bool | UnsetType = UNSET
forceTranscodes class-attribute instance-attribute
forceTranscodes: bool | UnsetType = UNSET
phashes class-attribute instance-attribute
phashes: bool | UnsetType = UNSET
interactiveHeatmapsSpeeds class-attribute instance-attribute
interactiveHeatmapsSpeeds: bool | UnsetType = UNSET
imageThumbnails class-attribute instance-attribute
imageThumbnails: bool | UnsetType = UNSET
clipPreviews class-attribute instance-attribute
clipPreviews: bool | UnsetType = UNSET
imagePhashes class-attribute instance-attribute
imagePhashes: bool | UnsetType = UNSET
imageIDs class-attribute instance-attribute
imageIDs: list[str] | None | UnsetType = UNSET
galleryIDs class-attribute instance-attribute
galleryIDs: list[str] | None | UnsetType = UNSET
paths class-attribute instance-attribute
paths: list[str] | None | UnsetType = UNSET
sceneIDs class-attribute instance-attribute
sceneIDs: list[str] | None | UnsetType = UNSET
markerIDs class-attribute instance-attribute
markerIDs: list[str] | None | UnsetType = UNSET
overwrite class-attribute instance-attribute
overwrite: bool | UnsetType = UNSET

AutoTagMetadataInput

Bases: StashInput

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

Attributes

paths class-attribute instance-attribute
paths: list[str] | None | UnsetType = UNSET
performers class-attribute instance-attribute
performers: list[str] | None | UnsetType = UNSET
studios class-attribute instance-attribute
studios: list[str] | None | UnsetType = UNSET
tags class-attribute instance-attribute
tags: list[str] | None | UnsetType = UNSET

Plugin Types

Plugin

Bases: FromGraphQLMixin, BaseModel

Plugin type from schema/types/plugin.graphql.

Attributes

id instance-attribute
id: str
name class-attribute instance-attribute
name: str | UnsetType = UNSET
enabled class-attribute instance-attribute
enabled: bool | UnsetType = UNSET
paths class-attribute instance-attribute
paths: PluginPaths | UnsetType = UNSET
description class-attribute instance-attribute
description: str | None | UnsetType = UNSET
url class-attribute instance-attribute
url: str | None | UnsetType = UNSET
version class-attribute instance-attribute
version: str | None | UnsetType = UNSET
tasks class-attribute instance-attribute
tasks: list[PluginTask] | None | UnsetType = UNSET
hooks class-attribute instance-attribute
hooks: list[PluginHook] | None | UnsetType = UNSET
settings class-attribute instance-attribute
settings: list[PluginSetting] | None | UnsetType = UNSET
requires class-attribute instance-attribute
requires: list[str] | None | UnsetType = UNSET

PluginTask

Bases: FromGraphQLMixin, BaseModel

Plugin task type from schema/types/plugin.graphql.

Attributes

name class-attribute instance-attribute
name: str | UnsetType = UNSET
plugin class-attribute instance-attribute
plugin: Plugin | UnsetType = UNSET
description class-attribute instance-attribute
description: str | None | UnsetType = UNSET

Package Types

Package

Bases: FromGraphQLMixin, BaseModel

Package type from schema/types/package.graphql.

Attributes

package_id class-attribute instance-attribute
package_id: str | UnsetType = UNSET
name class-attribute instance-attribute
name: str | UnsetType = UNSET
version class-attribute instance-attribute
version: str | None | UnsetType = UNSET
date class-attribute instance-attribute
date: Timestamp | None | UnsetType = UNSET
requires class-attribute instance-attribute
requires: list[Package] | UnsetType = UNSET
source_url class-attribute instance-attribute
source_url: str | UnsetType = Field(
    default=UNSET, alias="sourceURL"
)
source_package class-attribute instance-attribute
source_package: Package | None | UnsetType = UNSET
metadata class-attribute instance-attribute
metadata: Map | UnsetType = UNSET

Scraper Types

Scraper

Bases: FromGraphQLMixin, BaseModel

Scraper from schema/types/scraper.graphql.

Attributes

id class-attribute instance-attribute
id: str | None | UnsetType = UNSET
name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
performer class-attribute instance-attribute
performer: ScraperSpec | None | UnsetType = UNSET
scene class-attribute instance-attribute
scene: ScraperSpec | None | UnsetType = UNSET
gallery class-attribute instance-attribute
gallery: ScraperSpec | None | UnsetType = UNSET
image class-attribute instance-attribute
image: ScraperSpec | None | UnsetType = UNSET
group class-attribute instance-attribute
group: ScraperSpec | None | UnsetType = UNSET

ScrapedScene

Bases: FromGraphQLMixin, BaseModel

Scene data from scraper from schema/types/scraper.graphql.

Attributes

title class-attribute instance-attribute
title: str | None | UnsetType = UNSET
code class-attribute instance-attribute
code: str | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
director class-attribute instance-attribute
director: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
date class-attribute instance-attribute
date: str | None | UnsetType = UNSET
image class-attribute instance-attribute
image: str | None | UnsetType = UNSET
file class-attribute instance-attribute
file: SceneFileType | None | UnsetType = UNSET
studio class-attribute instance-attribute
studio: ScrapedStudio | None | UnsetType = UNSET
tags class-attribute instance-attribute
tags: list[ScrapedTag] | None | UnsetType = UNSET
performers class-attribute instance-attribute
performers: list[ScrapedPerformer] | None | UnsetType = (
    UNSET
)
groups class-attribute instance-attribute
groups: list[ScrapedGroup] | None | UnsetType = UNSET
remote_site_id class-attribute instance-attribute
remote_site_id: str | None | UnsetType = UNSET
duration class-attribute instance-attribute
duration: int | None | UnsetType = UNSET
fingerprints class-attribute instance-attribute
fingerprints: (
    list[StashBoxFingerprint] | None | UnsetType
) = UNSET

ScrapedPerformer

Bases: FromGraphQLMixin, BaseModel

A performer from a scraping operation from schema/types/scraped-performer.graphql.

Attributes

stored_id class-attribute instance-attribute
stored_id: str | None | UnsetType = UNSET
name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
disambiguation class-attribute instance-attribute
disambiguation: str | None | UnsetType = UNSET
gender class-attribute instance-attribute
gender: str | None | UnsetType = UNSET
urls class-attribute instance-attribute
urls: list[str] | None | UnsetType = UNSET
birthdate class-attribute instance-attribute
birthdate: str | None | UnsetType = UNSET
ethnicity class-attribute instance-attribute
ethnicity: str | None | UnsetType = UNSET
country class-attribute instance-attribute
country: str | None | UnsetType = UNSET
eye_color class-attribute instance-attribute
eye_color: str | None | UnsetType = UNSET
height class-attribute instance-attribute
height: str | None | UnsetType = UNSET
measurements class-attribute instance-attribute
measurements: str | None | UnsetType = UNSET
fake_tits class-attribute instance-attribute
fake_tits: str | None | UnsetType = UNSET
penis_length class-attribute instance-attribute
penis_length: str | None | UnsetType = UNSET
circumcised class-attribute instance-attribute
circumcised: str | None | UnsetType = UNSET
career_length class-attribute instance-attribute
career_length: str | None | UnsetType = UNSET
career_start class-attribute instance-attribute
career_start: str | None | UnsetType = UNSET
career_end class-attribute instance-attribute
career_end: str | None | UnsetType = UNSET
tattoos class-attribute instance-attribute
tattoos: str | None | UnsetType = UNSET
piercings class-attribute instance-attribute
piercings: str | None | UnsetType = UNSET
aliases class-attribute instance-attribute
aliases: str | None | UnsetType = UNSET
tags class-attribute instance-attribute
tags: list[ScrapedTag] | None | UnsetType = UNSET
images class-attribute instance-attribute
images: list[str] | None | UnsetType = UNSET
details class-attribute instance-attribute
details: str | None | UnsetType = UNSET
death_date class-attribute instance-attribute
death_date: str | None | UnsetType = UNSET
hair_color class-attribute instance-attribute
hair_color: str | None | UnsetType = UNSET
weight class-attribute instance-attribute
weight: str | None | UnsetType = UNSET
remote_site_id class-attribute instance-attribute
remote_site_id: str | None | UnsetType = UNSET

StashBox Types

StashBox

Bases: BaseModel

StashBox configuration from schema/types/stash-box.graphql.

Attributes

endpoint class-attribute instance-attribute
endpoint: str | None | UnsetType = UNSET
api_key class-attribute instance-attribute
api_key: str | None | UnsetType = UNSET
name class-attribute instance-attribute
name: str | None | UnsetType = UNSET
max_requests_per_minute class-attribute instance-attribute
max_requests_per_minute: int | None | UnsetType = UNSET

Logging Types

LogEntry

Bases: BaseModel

Log entry type from schema/types/logging.graphql.

Attributes

time class-attribute instance-attribute
time: Time | None | UnsetType = UNSET
level class-attribute instance-attribute
level: LogLevel | None | UnsetType = UNSET
message class-attribute instance-attribute
message: str | None | UnsetType = UNSET

LogLevel

Bases: StrEnum

Log level enum from schema/types/logging.graphql.

Attributes

TRACE class-attribute instance-attribute
TRACE = 'Trace'
DEBUG class-attribute instance-attribute
DEBUG = 'Debug'
INFO class-attribute instance-attribute
INFO = 'Info'
PROGRESS class-attribute instance-attribute
PROGRESS = 'Progress'
WARNING class-attribute instance-attribute
WARNING = 'Warning'
ERROR class-attribute instance-attribute
ERROR = 'Error'

Version Types

Version

Bases: FromGraphQLMixin, BaseModel

Version information.

Attributes

version class-attribute instance-attribute
version: str | None | UnsetType = UNSET
hash class-attribute instance-attribute
hash: str | UnsetType = UNSET
build_time class-attribute instance-attribute
build_time: str | UnsetType = UNSET

LatestVersion

Bases: FromGraphQLMixin, BaseModel

Latest version information.

Attributes

version class-attribute instance-attribute
version: str | UnsetType = UNSET
shorthash class-attribute instance-attribute
shorthash: str | UnsetType = UNSET
release_date class-attribute instance-attribute
release_date: str | UnsetType = UNSET
url class-attribute instance-attribute
url: str | UnsetType = UNSET