-
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.
- Loading branch information
Showing
8 changed files
with
149 additions
and
5 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
1.0.4 (2023-11-16) | ||
----------------- | ||
------------------ | ||
|
||
- Changing requirement of guillotina | ||
|
||
|
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,30 @@ | ||
import json | ||
import datetime | ||
|
||
from pydantic import BaseModel, field_serializer | ||
from enum import Enum | ||
from typing import Optional | ||
from datetime import date | ||
|
||
from datetime import timezone | ||
|
||
|
||
class Action(str, Enum): | ||
modified = "modified" | ||
added = "added" | ||
removed = "removed" | ||
moved = "moved" | ||
duplicated = "duplicated" | ||
|
||
class Document(BaseModel): | ||
action: Action | ||
path: Optional[str] = None | ||
uuid: Optional[str] = None | ||
payload: Optional[dict] = None | ||
creator: Optional[str] = None | ||
creation_date: date = datetime.datetime.now(timezone.utc) | ||
type_name: str | ||
|
||
@field_serializer('payload') | ||
def serialize_payload(self, payload: dict, _info): | ||
return json.dumps(payload) |
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