Bases: titus.datatype.Type
Base class for types of all PFA/Avro values.
Thin wrapper around a avro.schema.Schema, providing a different Python class for each Avro kind.
Perform type resolution: would PFA objects of type other be accepted where a PFA object of type self is expected?
If x.accepts(y) and y.accepts(x), then x and y are equal. In general, acceptability is not symmetric.
The memo and checkRecord parameters are only used to avoid infinite recursion.
Parameters: |
|
---|---|
Return type: | boolean |
Returns: | True if other is an acceptable substitute for self (or is exactly the same); False if incompatible |
Convert the type to a Python-encoded Avro type.
Return “name” of this type, which is used as a key in tagged unions.
Return the avro.schema.Schema object.
Convert the type to a JSON-encoded string, suitable for an AVSC file.