Streamline None checking in initialize_search

This commit is contained in:
Saba 2021-11-28 12:05:04 -05:00
parent bf8ae31e6a
commit 5b80b87379
2 changed files with 4 additions and 8 deletions

View file

@ -1,15 +1,13 @@
# Standard Packages
import sys
import json
import sys, json, yaml
from typing import Optional
# External Packages
import uvicorn
from fastapi import FastAPI, Request, Body
from fastapi import FastAPI, Request
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from pydantic import BaseModel, validator
# Internal Packages
from src.search_type import asymmetric, symmetric_ledger, image_search
@ -39,7 +37,8 @@ def config():
@app.post('/config')
async def config(updated_config: FullConfig):
print(updated_config)
to_yaml = yaml.dump(updated_config.json())
print(to_yaml)
return updated_config
@app.get('/search')

View file

@ -1,9 +1,6 @@
# Standard Packages
import json
import time
import gzip
import os
import sys
import re
import argparse
import pathlib