From 4a6f8e43eff3e1d6b15e54ae7120697f7be440c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Fri, 18 Mar 2022 18:24:09 +0000 Subject: [PATCH] imports --- api/kiwi_vpn_api/config.py | 5 ++--- api/kiwi_vpn_api/db/connection.py | 3 ++- api/kiwi_vpn_api/main.py | 2 +- api/kiwi_vpn_api/routers/admin.py | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/api/kiwi_vpn_api/config.py b/api/kiwi_vpn_api/config.py index ca39caf..42ca7ae 100644 --- a/api/kiwi_vpn_api/config.py +++ b/api/kiwi_vpn_api/config.py @@ -1,12 +1,11 @@ -from enum import Enum import json +from enum import Enum from jose.constants import ALGORITHMS from passlib.context import CryptContext from pydantic import BaseModel, Field - -from sqlalchemy.engine import Engine from sqlalchemy import create_engine +from sqlalchemy.engine import Engine CONFIG_FILE = "tmp/config.json" diff --git a/api/kiwi_vpn_api/db/connection.py b/api/kiwi_vpn_api/db/connection.py index 991896e..6c45fd8 100644 --- a/api/kiwi_vpn_api/db/connection.py +++ b/api/kiwi_vpn_api/db/connection.py @@ -1,6 +1,7 @@ from typing import Generator + from sqlalchemy.engine import Engine -from sqlalchemy.orm import sessionmaker, Session +from sqlalchemy.orm import Session, sessionmaker from .models import ORMBaseModel diff --git a/api/kiwi_vpn_api/main.py b/api/kiwi_vpn_api/main.py index ea4a53e..2fa873a 100755 --- a/api/kiwi_vpn_api/main.py +++ b/api/kiwi_vpn_api/main.py @@ -4,8 +4,8 @@ import uvicorn from fastapi import FastAPI from . import config -from .routers import admin from .db import connection +from .routers import admin PRODUCTION_MODE = False diff --git a/api/kiwi_vpn_api/routers/admin.py b/api/kiwi_vpn_api/routers/admin.py index a9c72a0..8cca719 100644 --- a/api/kiwi_vpn_api/routers/admin.py +++ b/api/kiwi_vpn_api/routers/admin.py @@ -4,8 +4,7 @@ from fastapi import APIRouter, Depends, HTTPException, status from sqlalchemy.orm import Session from .. import config - -from ..db import crud, schemas, connection +from ..db import connection, crud, schemas router = APIRouter(prefix="/admin")