stash_vroom.heresphere module¶
This module provides a convenient way to serve Stash content to HereSphere and easily handle user events and interactions without writing an entire web service.
Example¶
Here’s a basic example of using the HereSphere API:
from stash_vroom.heresphere import on_event
@on_event('play')
def on_play(scene):
print(f"Playing scene: {scene.title}")
@on_event('favorite')
def on_favorite(scene):
print(f"Marking scene as favorite: {scene.title}")
@on_event('un-favorite')
def on_unfavorite(scene):
print(f"Marking scene as not favorite: {scene.title}")
- class stash_vroom.heresphere.HereSphereApp(name: str)[source]¶
Bases:
object
Main class for the HereSphere application.
Similar to Flask’s Flask class, this manages event handlers and provides decorators for registering them.
- class stash_vroom.heresphere.Scene(id: str, title: str, path: str, metadata: Dict[str, Any] | None = None)[source]¶
Bases:
object
Represents a video scene in HereSphere.
This is a simplified representation that will be passed to event handlers.