Don't use relative imports
This commit is contained in:
parent
b2ab553a31
commit
718f2b24d2
@ -10,15 +10,16 @@ from freqtrade.constants import USERPATH_STRATEGIES
|
||||
from freqtrade.data.history import get_datahandler
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.rpc import RPC
|
||||
from freqtrade.rpc.api_server.api_models import (AvailablePairs, Balances, BlacklistPayload,
|
||||
BlacklistResponse, Count, Daily, DeleteTrade,
|
||||
ForceBuyPayload, ForceSellPayload, Locks, Logs,
|
||||
PairHistory, PerformanceEntry, Ping, PlotConfig,
|
||||
Profit, ResultMsg, Stats, StatusMsg,
|
||||
StrategyListResponse, StrategyResponse, Version,
|
||||
WhitelistResponse)
|
||||
from freqtrade.rpc.api_server.deps import get_config, get_rpc
|
||||
from freqtrade.rpc.rpc import RPCException
|
||||
|
||||
from .api_models import (AvailablePairs, Balances, BlacklistPayload, BlacklistResponse, Count,
|
||||
Daily, DeleteTrade, ForceBuyPayload, ForceSellPayload, Locks, Logs,
|
||||
PairHistory, PerformanceEntry, Ping, PlotConfig, Profit, ResultMsg, Stats,
|
||||
StatusMsg, StrategyListResponse, StrategyResponse, Version,
|
||||
WhitelistResponse)
|
||||
from .deps import get_config, get_rpc
|
||||
|
||||
|
||||
# Public API, requires no auth.
|
||||
router_public = APIRouter()
|
||||
|
@ -7,10 +7,9 @@ from fastapi import Depends, FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from starlette.responses import JSONResponse
|
||||
|
||||
from freqtrade.rpc.api_server.uvicorn_threaded import UvicornServer
|
||||
from freqtrade.rpc.rpc import RPC, RPCException, RPCHandler
|
||||
|
||||
from .uvicorn_threaded import UvicornServer
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -54,9 +53,9 @@ class ApiServer(RPCHandler):
|
||||
)
|
||||
|
||||
def configure_app(self, app: FastAPI, config):
|
||||
from .api_auth import http_basic_or_jwt_token, router_login
|
||||
from .api_v1 import router as api_v1
|
||||
from .api_v1 import router_public as api_v1_public
|
||||
from freqtrade.rpc.api_server.api_auth import http_basic_or_jwt_token, router_login
|
||||
from freqtrade.rpc.api_server.api_v1 import router as api_v1
|
||||
from freqtrade.rpc.api_server.api_v1 import router_public as api_v1_public
|
||||
app.include_router(api_v1_public, prefix="/api/v1")
|
||||
|
||||
app.include_router(api_v1, prefix="/api/v1",
|
||||
|
Loading…
Reference in New Issue
Block a user