chore: various tweaks

This commit is contained in:
Eneko Illarramendi
2020-04-16 20:58:16 +02:00
parent 490e166f75
commit dd23b20090
25 changed files with 156 additions and 99 deletions
+5
View File
@@ -1,5 +1,6 @@
import json
import os
import shortuuid
import sqlite3
from typing import List, NamedTuple, Optional
@@ -52,6 +53,10 @@ class Status:
INTERNAL_SERVER_ERROR = 500
def urlsafe_short_hash() -> str:
return shortuuid.uuid()
class MegaEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, sqlite3.Row):