CardSet
Represents a Flesh and Blood card set. Each card set has the following fields:
Attributes:
Name | Type | Description |
---|---|---|
editions |
list[str]
|
The list of editions the set was printed for. |
identifier |
str
|
The string shorthand identifier of the set. |
name |
str
|
The full name of the set. |
release_date |
Optional[datetime.date]
|
The release date of the card set (if applicable). |
Source code in fab/card_set.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
__getitem__(key)
¶
Allows one to access fields of a card set via dictionary syntax.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
str
|
The |
required |
Returns:
Type | Description |
---|---|
Any
|
The value of the associated |
Source code in fab/card_set.py
45 46 47 48 49 50 51 52 53 54 55 |
|
__hash__()
¶
Returns the hash representation of the card set.
Returns:
Type | Description |
---|---|
Any
|
The hash representation of the card set. |
Source code in fab/card_set.py
57 58 59 60 61 62 63 64 |
|
__str__()
¶
Returns the string representation of the card set.
This is an alias of the CardSet.to_json()
method.
Returns:
Type | Description |
---|---|
str
|
The JSON string representation of the card set. |
Source code in fab/card_set.py
66 67 68 69 70 71 72 73 74 75 |
|
from_datestr_dict(jsondict)
staticmethod
¶
Creates a new card set from a dictionary object containing unparsed date strings.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jsondict |
dict[str, Any]
|
A raw |
required |
Returns:
Type | Description |
---|---|
CardSet
|
A new |
Source code in fab/card_set.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
from_json(jsonstr)
staticmethod
¶
Creates a new card set from the specified JSON string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jsonstr |
str
|
The JSON string representation to parse. |
required |
Returns:
Type | Description |
---|---|
CardSet
|
A new |
Source code in fab/card_set.py
103 104 105 106 107 108 109 110 111 112 113 114 |
|
keys()
¶
Returns the dictionary keys associated with this card set class.
Returns:
Type | Description |
---|---|
list[str]
|
A |
Source code in fab/card_set.py
77 78 79 80 81 82 83 84 |
|
to_datestr_dict()
¶
Converts the card set into a dictionary where the release_date
field
is set to its string representation.
Returns:
Type | Description |
---|---|
dict
|
A raw |
Source code in fab/card_set.py
116 117 118 119 120 121 122 123 124 125 126 127 |
|
to_json()
¶
Converts this card set into a JSON string representation.
Returns:
Type | Description |
---|---|
str
|
The JSON string representation of the set. |
Source code in fab/card_set.py
129 130 131 132 133 134 135 136 |
|