You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more information see fastavro [schemaless_writer](https://fastavro.readthedocs.io/en/latest/writer.html#fastavro._write_py.schemaless_writer) method.
3008
+
3009
+
**Arguments**:
3010
+
3011
+
- `schema`: The avro schema.
3012
+
- `strict`: If set to True, an error will be raised if records do not contain exactly the same fields that the schema states.
3013
+
Default - `False`
3014
+
- `strict_allow_default`: If set to True, an error will be raised if records do not contain exactly the same fields that the schema states unless it is a missing field that has a default value in the schema.
3015
+
Default - `False`
3016
+
- `disable_tuple_notation`: If set to True, tuples will not be treated as a special case. Therefore, using a tuple to indicate the type of a record will not work.
For more information see fastavro [schemaless_reader](https://fastavro.readthedocs.io/en/latest/reader.html#fastavro._read_py.schemaless_reader) method.
3048
+
3049
+
**Arguments**:
3050
+
3051
+
- `schema`: The Avro schema.
3052
+
- `reader_schema`: If the schema has changed since being written then the new schema can be given to allow for schema migration.
3053
+
Default - `None`
3054
+
- `return_record_name`: If true, when reading a union of records, the result will be a tuple where the first value is the name of the record and the second value is the record itself.
3055
+
Default - `False`
3056
+
- `return_record_name_override`: If true, this will modify the behavior of return_record_name so that the record name is only returned for unions where there is more than one record. For unions that only have one record, this option will make it so that the record is returned by itself, not a tuple with the name.
3057
+
Default - `False`
3058
+
- `return_named_type`: If true, when reading a union of named types, the result will be a tuple where the first value is the name of the type and the second value is the record itself NOTE: Using this option will ignore return_record_name and return_record_name_override.
3059
+
Default - `False`
3060
+
- `return_named_type_override`: If true, this will modify the behavior of return_named_type so that the named type is only returned for unions where there is more than one named type. For unions that only have one named type, this option will make it so that the named type is returned by itself, not a tuple with the name.
3061
+
Default - `False`
3062
+
- `handle_unicode_errors`: Should be set to a valid string that can be used in the errors argument of the string decode() function.
3063
+
Default - `"strict"`
3064
+
2978
3065
<a id="quixstreams.models.serializers"></a>
2979
3066
2980
3067
## quixstreams.models.serializers
@@ -3309,24 +3396,30 @@ Serializes floats to bytes
- `dumps`: a function to serialize objects to json.
3329
3418
Default - :py:func:`quixstreams.utils.json.dumps`
3419
+
- `schema`: A schema used to validate the data using [`jsonschema.Draft202012Validator`](https://python-jsonschema.readthedocs.io/en/stable/api/jsonschema/validators/`jsonschema.validators.Draft202012Validator`).
3420
+
Default - `None`
3421
+
- `validator`: A jsonschema validator used to validate the data. Takes precedences over the schema.
- `schema`: A schema used to validate the data using [`jsonschema.Draft202012Validator`](https://python-jsonschema.readthedocs.io/en/stable/api/jsonschema/validators/`jsonschema.validators.Draft202012Validator`).
3453
+
Default - `None`
3454
+
- `validator`: A jsonschema validator used to validate the data. Takes precedences over the schema.
0 commit comments