Data Models and Wrappers

Data models and wrappers for Simulchip.

This module provides standardized data models for working with cards, packs, and other Netrunner data throughout the library.

class simulchip.models.FilterableItem[source]

Bases: Protocol

Protocol for items that can be filtered and displayed.

get_id()[source]

Get unique identifier for this item.

Return type:

str

matches_filter(filter_text)[source]

Check if this item matches the filter text.

Return type:

bool

Parameters:

filter_text (str)

__init__(*args, **kwargs)
class simulchip.models.PackModel[source]

Bases: object

Model wrapper for pack data with filtering capabilities.

__init__(pack_data)[source]

Initialize with pack data from API.

Parameters:

pack_data (Dict[str, Any]) – Dictionary containing pack information

get_id()[source]

Get unique identifier (pack code).

Return type:

str

matches_filter(filter_text)[source]

Check if pack matches the filter text.

Parameters:

filter_text (str) – Text to search for (case-insensitive)

Return type:

bool

Returns:

True if any searchable field contains the filter text

class simulchip.models.CardModel[source]

Bases: object

Model wrapper for card data with filtering capabilities.

__init__(card_data)[source]

Initialize with card data from API.

Parameters:

card_data (Dict[str, Any]) – Dictionary containing card information

get_id()[source]

Get unique identifier (card code).

Return type:

str

matches_filter(filter_text)[source]

Check if card matches the filter text.

Parameters:

filter_text (str) – Text to search for (case-insensitive)

Return type:

bool

Returns:

True if any searchable field contains the filter text

property is_identity: bool

Check if this card is an identity.

simulchip.models.filter_items(items, filter_text)[source]

Filter a list of items based on filter text.

Parameters:
Return type:

List[FilterableItem]

Returns:

Filtered list of items