{ "cells": [ { "cell_type": "code", "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2021-08-03T04:52:27.320427Z", "start_time": "2021-08-03T04:52:27.285576Z" } }, "outputs": [ { "ename": "ModuleNotFoundError", "evalue": "No module named '__main__.mechancial'; '__main__' is not a package", "output_type": "error", "traceback": [ "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m\u001b[0m\n\u001b[0;32m 22\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mdataset\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 23\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mpasslib\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mcontext\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 24\u001b[1;33m \u001b[1;32mfrom\u001b[0m \u001b[1;33m.\u001b[0m\u001b[0mmechancial\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mmodels\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 25\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 26\u001b[0m \u001b[1;31m# authorize\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named '__main__.mechancial'; '__main__' is not a package" ] } ], "source": [ "# fastapi\n", "from fastapi import FastAPI, Request, Response, HTTPException, status, Depends\n", "from fastapi import templating\n", "from fastapi.templating import Jinja2Templates\n", "from fastapi.responses import HTMLResponse, RedirectResponse, JSONResponse\n", "from fastapi.middleware.cors import CORSMiddleware\n", "\n", "# static file\n", "from fastapi.staticfiles import StaticFiles\n", "\n", "# fastapi view function parameters\n", "from typing import List, Optional\n", "\n", "# path\n", "import os\n", "\n", "# time\n", "import datetime\n", "from datetime import timedelta\n", "\n", "# db\n", "import dataset\n", "from passlib import context\n", "from .mechancial import models\n", "\n", "# authorize\n", "from passlib.context import CryptContext\n", "pwd_context = CryptContext(schemes=[\"bcrypt\"], deprecated=\"auto\")\n", "from jose import JWTError, jwt\n", "from fastapi_jwt_auth import AuthJWT\n", "from fastapi_jwt_auth.exceptions import AuthJWTException\n", "from fastapi.security import OAuth2AuthorizationCodeBearer, OAuth2PasswordRequestForm" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3.7.3 64-bit", "language": "python", "name": "python37364bit6893c7013b164b1189a865dcaea9fb2f" } }, "nbformat": 4, "nbformat_minor": 4 }