comicbox.readinglists.schema ¶
The comicbox reading-list model: key constants and schemas.
A reading list is a header plus entries, and an entry is a comic reference in comicbox’s own vocabulary: its series, volume, issue, date and identifiers are the comicbox sub-schemas, so an entry is a valid fragment of a comicbox comic.
The value passed around the API is the inner mapping, the one under reading_list. Only serialized documents carry the root key.
EntryDateSchema ¶
Bases: _EntryDateFieldsSchema
An entry’s dates: comicbox’s, but whole or not at all.
Source code in comicbox/readinglists/schema.py
178 179 180 181 182 | |
EntrySchema ¶
Bases: IdentifiedSchema
One issue in a reading list.
Source code in comicbox/readinglists/schema.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | |
EntryTypeField ¶
Bases: VocabularyField
An entry’s role in the list: prologue, core, tie-in, epilogue…
Source code in comicbox/readinglists/schema.py
139 140 141 142 | |
FullDateField ¶
Bases: DateField
A whole date, read as a comic’s date is: 2006-07-15, July 15, 2006.
A string that names no day is not one: _partial_dates reads its year and month before the field sees it, and a reading list never guesses a day. It is always written as ISO YYYY-MM-DD.
Source code in comicbox/readinglists/schema.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
JsonEntryDateSchema ¶
Bases: _EntryDateFieldsSchema
An entry’s dates, written as strings for JSON.
Source code in comicbox/readinglists/schema.py
185 186 187 188 189 | |
JsonEntrySchema ¶
Bases: EntrySchema
An entry with its dates serialized as strings for JSON.
Source code in comicbox/readinglists/schema.py
250 251 252 253 | |
ListRefSchema ¶
Bases: BaseSubSchema
A reference to another list, such as the one before this in an order.
Source code in comicbox/readinglists/schema.py
212 213 214 215 216 217 218 219 | |
ListTypeField ¶
Bases: VocabularyField
A list’s type: event, story, characters, teams, master, creator…
Source code in comicbox/readinglists/schema.py
132 133 134 135 136 | |
ReadingListJsonSchema ¶
Bases: JsonSchema
A reading list serialized as JSON.
Source code in comicbox/readinglists/schema.py
314 315 316 317 318 319 320 321 322 | |
ReadingListJsonSubSchema ¶
Bases: ReadingListSubSchema
The list, with entry dates serialized as strings for JSON.
Source code in comicbox/readinglists/schema.py
292 293 294 295 | |
ReadingListSubSchema ¶
Bases: BaseSubSchema
The list: a header, then its entries in reading order.
Source code in comicbox/readinglists/schema.py
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | |
ReadingListYamlSchema ¶
Bases: YamlSchema
A reading list serialized as YAML. Also the in-memory model.
Source code in comicbox/readinglists/schema.py
298 299 300 301 302 303 304 305 306 307 308 309 310 311 | |
SourceKind ¶
Bases: StrEnum
Where a list came from: the vocabulary of a source’s kind.
A source with a key and no revision is a pointer: the list is known to exist there and was not fetched from it.
Source code in comicbox/readinglists/schema.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
SourceSchema ¶
Bases: BaseSubSchema
One place a list came from.
Source code in comicbox/readinglists/schema.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
VocabularyField ¶
Bases: StringField
A free string from a loose vocabulary.
Lowercased, with runs of spaces and underscores made single hyphens, then known synonyms mapped to one spelling. Unknown values pass through: Metron, mokkari and json-cbl disagree on these vocabularies, so none of them can be a closed enum.
Source code in comicbox/readinglists/schema.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |