From 1019ea1ed341e3a7769c046aa0be5764789360b6 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 2 Jun 2024 14:38:13 +0200 Subject: Migrate to Rust and Hyper With sanic, downloading a file locally is around ten times slower than with Rust and hyper. Maybe `pypy` could have helped, but I didn’t succeed to set it up quickly with the dependencies. --- src/utils.py | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 src/utils.py (limited to 'src/utils.py') diff --git a/src/utils.py b/src/utils.py deleted file mode 100644 index 151217f..0000000 --- a/src/utils.py +++ /dev/null @@ -1,8 +0,0 @@ -import io - -def sanitize_filename(s: str) -> str: - return '.'.join([sanitize_filename_part(p) for p in s.split('.')]) - -def sanitize_filename_part(s: str) -> str: - alnum_or_space = ''.join([c if c.isalnum() else ' ' for c in s]) - return '-'.join(alnum_or_space.split()) -- cgit v1.2.3