Cart
Reachable as client.cart. Stage scenes into the Bhoonidhi cart, list what's
staged, and remove items. All three reach the portal and need a login.
added, failed, srt = client.cart.add("misty-falcon", select=[2, 4])
client.cart.list(filter_by="priced")
client.cart.rm(select=[1])
CartNamespace
The cart commands, reachable as client.cart.
Methods:
| Name | Description |
|---|---|
add |
Add a saved query's scenes to the cart. Mirrors |
list |
List staged scenes — all three carts merged. Mirrors |
rm |
Remove scenes from the cart. Mirrors |
add
add(
slug: str,
select: list[int | str] | None = None,
on_progress: Callable[[str], None] | None = None,
) -> tuple[
list[tuple[dict, CartKind]],
list[tuple[dict, str]],
str | None,
]
Add a saved query's scenes to the cart. Mirrors bhd cart add.
Each scene is routed to the cart its access type selects. select
is a list of 1-based indices and/or scene IDs (e.g. [1, 2, 3]);
omit it to add the whole query.
Returns (added, failed, srt) — scenes added with their cart,
scenes that failed with the reason, and the shared search id.
Raises:
| Type | Description |
|---|---|
BhoonidhiAuthError
|
if the client isn't authenticated. |
BhoonidhiNotFoundError
|
if the slug is unknown. |
list
list(
since: datetime | None = None,
until: datetime | None = None,
last: str | None = None,
filter_by: str | list[str] | None = None,
) -> list[dict]
List staged scenes — all three carts merged. Mirrors bhd cart list.
Cart items are filed by add-date, so with no date option this shows
today only; widen it with since/until or last (e.g.
"1 week"). filter_by limits to states: ready, archived,
onorder, priced.
Raises:
| Type | Description |
|---|---|
BhoonidhiAuthError
|
if the client isn't authenticated. |
BhoonidhiAPIError
|
if a cart request fails. |
rm
rm(
slug: str | None = None,
select: list[int | str] | None = None,
since: datetime | None = None,
until: datetime | None = None,
last: str | None = None,
filter_by: str | list[str] | None = None,
on_progress: Callable[[str], None] | None = None,
) -> tuple[
list[tuple[str, CartKind]], list[tuple[str, str]]
]
Remove scenes from the cart. Mirrors bhd cart rm.
Two ways to address rows: pass slug to index a saved query's
scenes, or omit it and select indexes the merged cart itself
(same numbers as list under the same filters/date window).
Returns (removed, failed) — scene ids removed with their cart,
and ids that failed with the reason.
Raises:
| Type | Description |
|---|---|
BhoonidhiAuthError
|
if the client isn't authenticated. |
BhoonidhiNotFoundError
|
if a slug is given but unknown. |
BhoonidhiAPIError
|
if a cart request fails. |
Cart kinds
add and rm report which of the portal's three carts each scene landed in,
as a CartKind.
CartKind
Bases: builtins.str, enum.Enum
Which of the portal's three carts a scene belongs in.
The portal does not have one cart — it has three, each on its own servlet with its own add/view/delete payload shape.
Attributes:
| Name | Type | Description |
|---|---|---|
DIRECT |
Which of the portal's three carts a scene belongs in. |
|
ORDER |
Which of the portal's three carts a scene belongs in. |
|
PRICED |
Which of the portal's three carts a scene belongs in. |
DIRECT
class-attribute
Which of the portal's three carts a scene belongs in.
The portal does not have one cart — it has three, each on its own servlet with its own add/view/delete payload shape.
ORDER
class-attribute
Which of the portal's three carts a scene belongs in.
The portal does not have one cart — it has three, each on its own servlet with its own add/view/delete payload shape.