mtgdeck.base package¶
Submodules¶
mtgdeck.base.decoder module¶
Abstract base decoder classes.
-
class
mtgdeck.base.decoder.Decoder[source]¶ Bases:
objectAbstract base class for decoders.
Decoders are expected to implement a single method,
_decode().
-
class
mtgdeck.base.decoder.TextDecoder[source]¶ Bases:
mtgdeck.base.decoder.DecoderAbstract base class for text-based decoders.
Decoders are expected to set the
deckproperty, and override thedecode_entrymethod.-
deck¶ Pyparsing parser that should consume the full input string.
A
OneOrMore-wrapped pyparsing parser capable of consuming the full input string.
-
-
class
mtgdeck.base.decoder.XMLDecoder[source]¶ Bases:
mtgdeck.base.decoder.DecoderAbstract base class for XML-based decoders.
Decoders are expected to set the
root,sectionandcountproperties.-
count¶ Quantity (ie: qty, number) tag for the XML decoding format.
-
root¶ Root (top-level) tag for the XML decoding format.
-
section¶ Section (ie: sideboard) tag for the XML decoding format.
-
mtgdeck.base.encoder module¶
Abstract base encoder classes.
-
class
mtgdeck.base.encoder.Encoder[source]¶ Bases:
objectAbstract base class for encoders.
Encoders are expected to implement a single method,
_encode().
-
class
mtgdeck.base.encoder.TextEncoder[source]¶ Bases:
mtgdeck.base.encoder.EncoderAbstract base class for text-based encoders.
Encoders are expected to override the
encode_entrymethod.
-
class
mtgdeck.base.encoder.XMLEncoder[source]¶ Bases:
mtgdeck.base.encoder.EncoderAbstract base class for XML-based encoders.
Encoders are expected to set the
root,section,section_nameandcountproperties, and theset_contentmethod.-
count¶ Quantity (ie: qty, number) tag for the XML encoding format.
-
root¶ Root (top-level) tag for the XML encoding format.
-
section¶ Section (ie: sideboard, etc) tag for the XML encoding format.
-
section_name¶ Section name(ie: sideboard) tag for the XML encoding format.
-
Module contents¶
Abstract base classes.