-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved serializers performances (#391)
- Loading branch information
1 parent
cb48fd3
commit cde3ff2
Showing
14 changed files
with
388 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from __future__ import annotations | ||
|
||
import enum | ||
|
||
|
||
@enum.unique | ||
class SerializerGroup(enum.StrEnum): | ||
@staticmethod | ||
def _generate_next_value_(name: str, start: int, count: int, last_values: list[str]) -> str: | ||
return name.lower().replace("_", "-") | ||
|
||
JSON_SERIALIZE = enum.auto() | ||
JSON_DESERIALIZE = enum.auto() | ||
|
||
JSON_INCREMENTAL_SERIALIZE = enum.auto() | ||
JSON_INCREMENTAL_DESERIALIZE = enum.auto() | ||
|
||
LINE_SERIALIZE = enum.auto() | ||
LINE_DESERIALIZE = enum.auto() | ||
|
||
LINE_INCREMENTAL_SERIALIZE = enum.auto() | ||
LINE_INCREMENTAL_DESERIALIZE = enum.auto() | ||
|
||
PICKLE_SERIALIZE = enum.auto() | ||
PICKLE_DESERIALIZE = enum.auto() |
Oops, something went wrong.