initial commit

This commit is contained in:
2023-02-18 07:39:08 +01:00
commit e63ab7b77e
63 changed files with 7122 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import logging
import typing
from pathlib import Path
logger = logging.getLogger(__name__)
Payload = typing.TypedDict(
"Payload",
{
"gid": str,
"num_files": int,
"path": str,
"files": list[typing.TypedDict("File", {"path": str, "size": int})],
},
)
def main(payload: Payload):
logging.info("got {torrent}", torrent=payload)
path = Path(payload["path"])