New in version 1.1.
Data serialization
Abstract baseclass for serializers
Called when this serializer has been successfully registered in a Registry.
Default implementation does nothing. This is meant to be overridden in subclasses to allow a kind of initialization routine, setting up cls if needed.
| Parameters: |
|
|---|---|
| Return type: | None |
Called when this serializer has been removed from a Registry.
Default implementation does nothing. This is meant to be overridden in subclasses to allow a kind of initialization routine, tearing down cls if needed.
| Parameters: |
|
|---|---|
| Return type: | None |
List of possible directions.
| Returns: | ["read", "write"], ["read"], ["write"] or [] |
|---|---|
| Return type: | list |
| Parameters: |
|
|---|---|
| Returns: | Tuple of (charset, string data) where charset is the name of the actual charset used and might be None if binary or unknown. |
| Return type: | tuple |
Encode an error.
Might return None to indicate that someone else should handle the error encoding.
| Parameters: |
|
|---|---|
| Returns: | Tuple of (charset, string data) where charset is the name of the actual charset used and might be None if binary or unknown. |
| Return type: | tuple |
| Parameters: |
|
|---|---|
| Returns: | Tuple of (list args, dict params) args and params might be None |
| Return type: | tuple |
Represents arbitrary bytes.
Decode data which is a base-64 encoded string.
| Parameters: |
|
|---|---|
| Return type: | data |
Return a base-64 encoded representation of this data.
| Return type: | string |
|---|
Modules