aboutsummaryrefslogtreecommitdiff
path: root/src/utils.py
diff options
context:
space:
mode:
authorJoris2024-06-02 14:38:13 +0200
committerJoris2024-06-02 14:38:22 +0200
commit1019ea1ed341e3a7769c046aa0be5764789360b6 (patch)
tree1a0d8a4f00cff252d661c42fc23ed4c19795da6f /src/utils.py
parente8da9790dc6d55cd2e8883322cdf9a7bf5b4f5b7 (diff)
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.
Diffstat (limited to 'src/utils.py')
-rw-r--r--src/utils.py8
1 files changed, 0 insertions, 8 deletions
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())