From 7d5f0ff0110cc1d02948b124a6465a2a6c5b96de Mon Sep 17 00:00:00 2001 From: rafsaf Date: Thu, 17 Jun 2021 22:19:37 +0200 Subject: [PATCH 1/2] updated fastapi to 0.65.2 (bug fix), also updated more used libraries. Added isort to the project, which is used to have beautiful sorted imports. updated readme and exported requirements.txt --- .vscode/settings.json | 5 +- README.md | 21 ++-- .../app/api/api.py | 1 - .../app/api/deps.py | 1 - .../app/api/routers/login.py | 1 - .../app/api/routers/users.py | 1 + .../app/core/config.py | 5 +- .../app/crud/base.py | 5 +- .../app/crud/crud_user.py | 5 +- .../app/initial_data.py | 12 +- .../{{cookiecutter.project_name}}/app/main.py | 2 +- .../app/models/user.py | 1 + .../app/schemas/__init__.py | 10 +- .../app/schemas/user.py | 4 +- .../app/tests/api/test_login.py | 8 +- .../app/tests/api/test_users.py | 12 +- .../app/tests/conftest.py | 6 +- .../app/tests/crud/test_user.py | 15 +-- .../app/tests/utils/user.py | 2 +- .../app/tests/utils/utils.py | 6 +- .../{{cookiecutter.project_name}}/poetry.lock | 107 ++++++++++-------- .../pyproject.toml | 3 +- .../requirements.txt | 54 ++++----- poetry.lock | 90 +++++++-------- pyproject.toml | 6 +- requirements.txt | 16 +-- tests/create_test_project.py | 1 + 27 files changed, 199 insertions(+), 201 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d658009..a2bd4a9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,7 @@ { "python.formatting.provider": "black", - "python.analysis.extraPaths": ["./fastapi_plan/template/{{cookiecutter.project_name}}"] + "python.analysis.extraPaths": [ + "./fastapi_plan/template/{{cookiecutter.project_name}}" + ], + "python.pythonPath": ".venv\\Scripts\\python.exe" } \ No newline at end of file diff --git a/README.md b/README.md index 9c1bc7e..56221c3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fastapi-plan) ![tests](https://github.com/rafsaf/fastapi-plan/actions/workflows/tests.yml/badge.svg) -dead simple but powerful template manager for FastAPI applications. +Dead simple but powerful template manager for FastAPI applications. - [About](#about) - [Quickstart](#quickstart) @@ -17,7 +17,8 @@ dead simple but powerful template manager for FastAPI applications. ## About -features: +Features: + - postgresql database with [Tortoise ORM](https://tortoise-orm.readthedocs.io/en/latest/index.html) as ORM - well organised, rock solid project structure (see section [Project structure](#project-structure)) - ready-to-use user model, authentiaction system (JWT), hashing with Bcrypt @@ -29,12 +30,12 @@ features: - poetry or pip - deployment ready docker-compose.prod.yml file with poetry, you will only need own domain -furthermore: +Furthermore: + - full [project structure schema](#project-structure) -- [high level overview](#high-level-overview) how this project is organised and why, questions like where do the settings live or what every variable in `.env` file +- [high level overview](#high-level-overview) how this project is organised and why, questions like where do the settings live or what every variable in `.env` file is used for - step by step explanation [how to add new endpoint](#how-to-add-new-endpoint), from creating new model, adding schemas and routes to migrating database and writting tests (it's always better to have it and optionally adopt it, than wasting time trying to figure out the best dev path) - ## Quickstart NOTE: you will need [docker](https://www.docker.com/get-started) and optional but recommended [poetry](https://python-poetry.org/docs/) installed! @@ -66,7 +67,6 @@ pip install -r requirements.txt ### 1. DEVELOPMENT - since we wanna use uvicorn in development, create only postgres container using docker-compose.yml file like that: ```bash @@ -100,7 +100,6 @@ The diffrence between development approach is that web server automatically runs 2. `FIRST_SUPER_USER_EMAIL` - first account email 3. `DEBUG` - when it's false, the `POSTGRES_SERVER` is set to `localhost` for development, so change it to `DEBUG=true` to use `db` postgres server. - ### 3. PRODUCTION (https, own domain) To make it available from https://your_domain.com on VM run @@ -164,15 +163,15 @@ Plesae also note that to get no-test certificate, you should comment line `"--ce ## High level overview -This project strucutre is mostly based on the [official template](#https://github.com/tiangolo/full-stack-fastapi-postgresql) (but not only) which is really great but unfortunatly does not support Tortoise ORM and is... (too?) complicated. All the security or problematic stuff (`app/core/security.py` with `verify_password` function, login and token routes, JWT token schemas) are just copied from there, so you can be preety sure it will work as expected. +This project strucutre is mostly based on the [official template](#https://github.com/tiangolo/full-stack-fastapi-postgresql) (but not only) which is really great but unfortunatly does not support Tortoise ORM and is... (too?) complicated. All the security or problematic stuff (`app/core/security.py` with `verify_password` function, login and token routes, JWT token schemas) are just copied from there, so you can be pretty sure it will work as expected. The main thougts are: -- There two sorts of settings, first one located in `.env` file for the ENTIRE project, and python-specific settings which lives in `app/core/config.py`, the file is based on pydantic solution (using dotenv lib). Why? Well, that's simple, this is due to [12factor methodology](https://12factor.net/), python-specific settings inherit from `.env` file, so this is the only place where you actually change something. If you have any problems understanding mentioned `config.py` file, just refer to [pydantic - settings management](https://pydantic-docs.helpmanual.io/usage/settings/), it's preety clear. +- There two sorts of settings, first one located in `.env` file for the ENTIRE project, and python-specific settings which lives in `app/core/config.py`, the file is based on pydantic solution (using dotenv lib). Why? Well, that's simple, this is due to [12factor methodology](https://12factor.net/), python-specific settings inherit from `.env` file, so this is the only place where you actually change something. If you have any problems understanding mentioned `config.py` file, just refer to [pydantic - settings management](https://pydantic-docs.helpmanual.io/usage/settings/), it's pretty clear. - Models, crud, schemas, api routes, tests... it might be confusing how to actually ADD SOMETHING NEW here, but after following next section (learn by doing, step by step), it should be pretty easy -- Database-related stuff is very convinient, taken mostly from [Tortoise ORM](https://tortoise-orm.readthedocs.io/en/latest/index.html) docs and just *working*. There is `register_tortoise` function in `main.py`, `TORTOISE_ORM` variable in `app/core/config.py`. Please, be aware that if you don't run `initial_data.py` SOMEHOW (in development- you have to do it yourself, in debug/production it is handled by shell script `initial.sh`, which also runs tests and migrations), you won't be able to connect to database. `initial_data.py` is hearbly based on the same named file in **official template** mentioned earlier. It has two responsibilities, first is running `init` function from Tortoise to initialize connection, and the second - creating first superuser (defined in `.env`) if one doesn't yet exists. +- Database-related stuff is very convinient, taken mostly from [Tortoise ORM](https://tortoise-orm.readthedocs.io/en/latest/index.html) docs and just _working_. There is `register_tortoise` function in `main.py`, `TORTOISE_ORM` variable in `app/core/config.py`. Please, be aware that if you don't run `initial_data.py` SOMEHOW (in development- you have to do it yourself, in debug/production it is handled by shell script `initial.sh`, which also runs tests and migrations), you won't be able to connect to database. `initial_data.py` is hearbly based on the same named file in **official template** mentioned earlier. It has two responsibilities, first is running `init` function from Tortoise to initialize connection, and the second - creating first superuser (defined in `.env`) if one doesn't yet exists. - Migrations are also provided by Tortiose (the tool is aerich), docs can be found [here in aerich repo](https://github.com/tortoise/aerich). The default migration (default user model) file is already included. After changes in models (e.g. new model `Cars`), just run `aerich migrate`, `aerich upgrade` and you are good to go. @@ -287,7 +286,6 @@ dog = CRUDDog(Dog) from .crud_dog import dog # type: ignore ``` - 8. Create `dogs.py` with endpoints in `app/api/routers` folder ```python @@ -494,4 +492,3 @@ def test_remove_all_user_dogs(event_loop: EventLoop, normal_user: models.User): ``` 13. And then `test_dogs.py` for endpoints in `app/tests/api` folder - diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/api.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/api.py index 8516d39..772b3cc 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/api.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/api.py @@ -2,7 +2,6 @@ from app.api.routers import login, users - api_router = APIRouter() api_router.include_router(login.router, prefix="/login", tags=["login"]) api_router.include_router(users.router, prefix="/users", tags=["users"]) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/deps.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/deps.py index 03d7288..a4fb5a4 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/deps.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/deps.py @@ -7,7 +7,6 @@ from app.core import security from app.core.config import settings - reusable_oauth2 = OAuth2PasswordBearer( tokenUrl=f"{settings.API_STR}/login/access-token" ) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/routers/login.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/routers/login.py index 1a07dee..28caff4 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/routers/login.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/routers/login.py @@ -8,7 +8,6 @@ from app.core import security from app.core.config import settings - router = APIRouter() diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/routers/users.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/routers/users.py index 930e11f..f5ba825 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/routers/users.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/api/routers/users.py @@ -1,4 +1,5 @@ from fastapi import APIRouter, Depends, HTTPException, status + from app import crud, models, schemas from app.api import deps diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/core/config.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/core/config.py index 13f9a5c..1564430 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/core/config.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/core/config.py @@ -1,6 +1,7 @@ -from typing import Dict, List, Optional, Union -from pydantic import AnyHttpUrl, BaseSettings, AnyUrl, validator, EmailStr from pathlib import Path +from typing import Dict, List, Optional, Union + +from pydantic import AnyHttpUrl, AnyUrl, BaseSettings, EmailStr, validator PROJECT_DIR = Path(__file__).parent.parent.parent diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/crud/base.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/crud/base.py index 14dd7c6..4dbd976 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/crud/base.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/crud/base.py @@ -1,9 +1,10 @@ from typing import Any, Dict, Generic, Optional, Type, TypeVar, Union -from tortoise.models import Model + from fastapi.encoders import jsonable_encoder from pydantic import BaseModel -from tortoise.queryset import QuerySet from tortoise.exceptions import DoesNotExist +from tortoise.models import Model +from tortoise.queryset import QuerySet ModelType = TypeVar("ModelType", bound=Model) CreateSchemaType = TypeVar("CreateSchemaType", bound=BaseModel) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/crud/crud_user.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/crud/crud_user.py index a5523e2..c5c8dcf 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/crud/crud_user.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/crud/crud_user.py @@ -1,9 +1,10 @@ from typing import Optional +from tortoise.exceptions import DoesNotExist + +from app import models, schemas from app.core.security import get_password_hash, verify_password from app.crud.base import CRUDBase -from app import models, schemas -from tortoise.exceptions import DoesNotExist class CRUDUser(CRUDBase[models.User, schemas.UserCreateMe, schemas.UserUpdateMe]): diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/initial_data.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/initial_data.py index e992c1f..33619ed 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/initial_data.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/initial_data.py @@ -1,20 +1,20 @@ import logging -from tortoise import run_async -from tenacity import retry, after_log, before_log, retry, wait_fixed, stop_after_attempt -from tortoise import Tortoise + +from tenacity import (after_log, before_log, retry, stop_after_attempt, + wait_fixed) +from tortoise import Tortoise, run_async try: import app except ModuleNotFoundError: - import sys import os import pathlib + import sys app = pathlib.Path(os.path.dirname(__file__)).parent sys.path.append(str(app)) from app import crud, schemas - from app.core.config import settings - from app.core.config import TORTOISE_ORM + from app.core.config import TORTOISE_ORM, settings logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/main.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/main.py index ef5153b..8966202 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/main.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/main.py @@ -33,4 +33,4 @@ def create_app() -> FastAPI: db_url=settings.TORTOISE_DATABASE_URI, modules={"models": ["app.models"]}, add_exception_handlers=True, -) \ No newline at end of file +) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/models/user.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/models/user.py index a2131f0..28f370e 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/models/user.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/models/user.py @@ -1,4 +1,5 @@ from typing import Optional + import tortoise.fields.data as fields from tortoise.models import Model diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/__init__.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/__init__.py index 912f6e0..82fd1e5 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/__init__.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/__init__.py @@ -1,9 +1,3 @@ from .token import Token, TokenPayload # noqa -from .user import ( - UserPydantic, - UserPydanticList, - UserCreateMe, - UserCreateBySuperuser, - UserUpdateBySuperuser, - UserUpdateMe, -) +from .user import (UserCreateBySuperuser, UserCreateMe, UserPydantic, + UserPydanticList, UserUpdateBySuperuser, UserUpdateMe) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/user.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/user.py index 4563c93..9200190 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/user.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/user.py @@ -1,9 +1,11 @@ from typing import Optional + +from pydantic import BaseModel, EmailStr from tortoise.contrib.pydantic.creator import ( pydantic_model_creator, pydantic_queryset_creator, ) -from pydantic import BaseModel, EmailStr + from app.models import User UserPydantic = pydantic_model_creator(User) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/api/test_login.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/api/test_login.py index 11e6848..060749e 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/api/test_login.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/api/test_login.py @@ -1,8 +1,10 @@ +from asyncio import AbstractEventLoop as EventLoop from typing import Dict + from fastapi.testclient import TestClient -from app.tests.conftest import default_user, default_superuser -from asyncio import AbstractEventLoop as EventLoop + from app.core.config import settings +from app.tests.conftest import default_superuser, default_user def test_get_access_token( @@ -25,4 +27,4 @@ def test_use_access_token( ) result = r.json() assert r.status_code == 200 - assert "email" in result \ No newline at end of file + assert "email" in result diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/api/test_users.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/api/test_users.py index f13bd33..299c54d 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/api/test_users.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/api/test_users.py @@ -1,11 +1,13 @@ -from app import crud -from typing import Dict -from app.tests.conftest import default_user, default_superuser -from app.core.config import settings from asyncio import AbstractEventLoop as EventLoop +from typing import Dict + from fastapi.testclient import TestClient + +from app import crud +from app.core.config import settings +from app.tests.conftest import default_superuser, default_user +from app.tests.utils.user import get_random_user_by_superuser, get_random_user_me from app.tests.utils.utils import random_lower_string -from app.tests.utils.user import get_random_user_me, get_random_user_by_superuser def test_read_users_superuser( diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/conftest.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/conftest.py index 009eaf0..ee8f68a 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/conftest.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/conftest.py @@ -1,10 +1,12 @@ -import pytest from asyncio import AbstractEventLoop as EventLoop from typing import Generator + +import pytest from fastapi.testclient import TestClient from tortoise.contrib.test import finalizer, initializer + +from app import crud, models, schemas from app.main import create_app -from app import models, schemas, crud from app.tests.utils.utils import user_authentication_headers app = create_app() diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/crud/test_user.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/crud/test_user.py index 5e2e17b..2f9098e 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/crud/test_user.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/crud/test_user.py @@ -1,14 +1,15 @@ -import pytest -from app.schemas.user import UserUpdateBySuperuser, UserUpdateMe +import logging from asyncio import AbstractEventLoop as EventLoop + +import pytest from fastapi.testclient import TestClient -from app.models import User + from app import crud -from app.schemas import UserCreateMe, UserCreateBySuperuser -from app.tests.utils.utils import random_email, random_lower_string from app.core.security import verify_password -import logging - +from app.models import User +from app.schemas import UserCreateBySuperuser, UserCreateMe +from app.schemas.user import UserUpdateBySuperuser, UserUpdateMe +from app.tests.utils.utils import random_email, random_lower_string logger = logging.getLogger(__name__) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/utils/user.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/utils/user.py index a0909a9..14275ec 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/utils/user.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/utils/user.py @@ -1,4 +1,4 @@ -from app.schemas import UserCreateMe, UserCreateBySuperuser +from app.schemas import UserCreateBySuperuser, UserCreateMe from app.tests.utils.utils import random_email, random_lower_string diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/utils/utils.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/utils/utils.py index 3eb9407..fea8994 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/utils/utils.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/tests/utils/utils.py @@ -1,10 +1,12 @@ -from app.core.config import settings import random import string from asyncio import AbstractEventLoop as EventLoop from typing import Dict -from app import crud + from fastapi.testclient import TestClient + +from app import crud +from app.core.config import settings from app.schemas import UserCreateBySuperuser diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/poetry.lock b/fastapi_plan/template/{{cookiecutter.project_name}}/poetry.lock index 51bbf62..caafdc1 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/poetry.lock +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/poetry.lock @@ -97,7 +97,7 @@ typecheck = ["mypy"] [[package]] name = "black" -version = "21.5b1" +version = "21.6b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -113,12 +113,13 @@ toml = ">=0.10.1" [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.6.0)", "aiohttp-cors"] +d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] python2 = ["typed-ast (>=1.4.2)"] +uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "certifi" -version = "2020.12.5" +version = "2021.5.30" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false @@ -220,22 +221,26 @@ trio = ["trio (>=0.14.0)", "sniffio (>=1.1)"] [[package]] name = "ecdsa" -version = "0.14.1" +version = "0.17.0" description = "ECDSA cryptographic signature library (pure python)" category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [package.dependencies] -six = "*" +six = ">=1.9.0" + +[package.extras] +gmpy = ["gmpy"] +gmpy2 = ["gmpy2"] [[package]] name = "email-validator" -version = "1.1.2" +version = "1.1.3" description = "A robust email syntax and deliverability validation library for Python 2.x/3.x." category = "main" optional = false -python-versions = "*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] dnspython = ">=1.15.0" @@ -243,21 +248,21 @@ idna = ">=2.0.0" [[package]] name = "fastapi" -version = "0.63.0" +version = "0.65.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" category = "main" optional = false python-versions = ">=3.6" [package.dependencies] -pydantic = ">=1.0.0,<2.0.0" -starlette = "0.13.6" +pydantic = ">=1.6.2,<1.7 || >1.7,<1.7.1 || >1.7.1,<1.7.2 || >1.7.2,<1.7.3 || >1.7.3,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" +starlette = "0.14.2" [package.extras] -all = ["requests (>=2.24.0,<3.0.0)", "aiofiles (>=0.5.0,<0.6.0)", "jinja2 (>=2.11.2,<3.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "itsdangerous (>=1.1.0,<2.0.0)", "pyyaml (>=5.3.1,<6.0.0)", "graphene (>=2.1.8,<3.0.0)", "ujson (>=3.0.0,<4.0.0)", "orjson (>=3.2.1,<4.0.0)", "email_validator (>=1.1.1,<2.0.0)", "uvicorn[standard] (>=0.12.0,<0.14.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)"] +all = ["requests (>=2.24.0,<3.0.0)", "aiofiles (>=0.5.0,<0.6.0)", "jinja2 (>=2.11.2,<3.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "itsdangerous (>=1.1.0,<2.0.0)", "pyyaml (>=5.3.1,<6.0.0)", "graphene (>=2.1.8,<3.0.0)", "ujson (>=4.0.1,<5.0.0)", "orjson (>=3.2.1,<4.0.0)", "email_validator (>=1.1.1,<2.0.0)", "uvicorn[standard] (>=0.12.0,<0.14.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)"] dev = ["python-jose[cryptography] (>=3.1.0,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "autoflake (>=1.3.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "uvicorn[standard] (>=0.12.0,<0.14.0)", "graphene (>=2.1.8,<3.0.0)"] doc = ["mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=6.1.4,<7.0.0)", "markdown-include (>=0.5.1,<0.6.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.2.0)", "typer-cli (>=0.0.9,<0.0.10)", "pyyaml (>=5.3.1,<6.0.0)"] -test = ["pytest (==5.4.3)", "pytest-cov (==2.10.0)", "pytest-asyncio (>=0.14.0,<0.15.0)", "mypy (==0.790)", "flake8 (>=3.8.3,<4.0.0)", "black (==20.8b1)", "isort (>=5.0.6,<6.0.0)", "requests (>=2.24.0,<3.0.0)", "httpx (>=0.14.0,<0.15.0)", "email_validator (>=1.1.1,<2.0.0)", "sqlalchemy (>=1.3.18,<2.0.0)", "peewee (>=3.13.3,<4.0.0)", "databases[sqlite] (>=0.3.2,<0.4.0)", "orjson (>=3.2.1,<4.0.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "aiofiles (>=0.5.0,<0.6.0)", "flask (>=1.1.2,<2.0.0)"] +test = ["pytest (==5.4.3)", "pytest-cov (==2.10.0)", "pytest-asyncio (>=0.14.0,<0.15.0)", "mypy (==0.812)", "flake8 (>=3.8.3,<4.0.0)", "black (==20.8b1)", "isort (>=5.0.6,<6.0.0)", "requests (>=2.24.0,<3.0.0)", "httpx (>=0.14.0,<0.15.0)", "email_validator (>=1.1.1,<2.0.0)", "sqlalchemy (>=1.3.18,<1.4.0)", "peewee (>=3.13.3,<4.0.0)", "databases[sqlite] (>=0.3.2,<0.4.0)", "orjson (>=3.2.1,<4.0.0)", "ujson (>=4.0.1,<5.0.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "aiofiles (>=0.5.0,<0.6.0)", "flask (>=1.1.2,<2.0.0)"] [[package]] name = "flake8" @@ -304,6 +309,19 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "isort" +version = "5.8.0" +description = "A Python utility / library to sort Python imports." +category = "dev" +optional = false +python-versions = ">=3.6,<4.0" + +[package.extras] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] +colors = ["colorama (>=0.4.3,<0.5.0)"] + [[package]] name = "mccabe" version = "0.6.1" @@ -473,21 +491,20 @@ cli = ["click (>=5.0)"] [[package]] name = "python-jose" -version = "3.2.0" +version = "3.3.0" description = "JOSE implementation in Python" category = "main" optional = false python-versions = "*" [package.dependencies] -cryptography = {version = "*", optional = true, markers = "extra == \"cryptography\""} -ecdsa = "<0.15" +cryptography = {version = ">=3.4.0", optional = true, markers = "extra == \"cryptography\""} +ecdsa = "!=0.15" pyasn1 = "*" rsa = "*" -six = "<2.0" [package.extras] -cryptography = ["cryptography"] +cryptography = ["cryptography (>=3.4.0)"] pycrypto = ["pycrypto (>=2.6.0,<2.7.0)", "pyasn1"] pycryptodome = ["pycryptodome (>=3.3.1,<4.0.0)", "pyasn1"] @@ -557,14 +574,14 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "starlette" -version = "0.13.6" +version = "0.14.2" description = "The little ASGI library that shines." category = "main" optional = false python-versions = ">=3.6" [package.extras] -full = ["aiofiles", "graphene", "itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests", "ujson"] +full = ["aiofiles", "graphene", "itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests"] [[package]] name = "tenacity" @@ -590,7 +607,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tortoise-orm" -version = "0.17.3" +version = "0.17.4" description = "Easy async ORM for python, built with relations in mind" category = "main" optional = false @@ -649,7 +666,7 @@ standard = ["websockets (>=8.0.0,<9.0.0)", "watchgod (>=0.6)", "python-dotenv (> [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "412a6fff867d002b1660490540939afa0b9993b1c741f0456ada1cf46c7f45d6" +content-hash = "8e1f65f9ca4eaa85a071573dee53af654ed1340380e7832d1239ae83046bb544" [metadata.files] aerich = [ @@ -703,12 +720,12 @@ bcrypt = [ {file = "bcrypt-3.2.0.tar.gz", hash = "sha256:5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29"}, ] black = [ - {file = "black-21.5b1-py3-none-any.whl", hash = "sha256:8a60071a0043876a4ae96e6c69bd3a127dad2c1ca7c8083573eb82f92705d008"}, - {file = "black-21.5b1.tar.gz", hash = "sha256:23695358dbcb3deafe7f0a3ad89feee5999a46be5fec21f4f1d108be0bcdb3b1"}, + {file = "black-21.6b0-py3-none-any.whl", hash = "sha256:dfb8c5a069012b2ab1e972e7b908f5fb42b6bbabcba0a788b86dc05067c7d9c7"}, + {file = "black-21.6b0.tar.gz", hash = "sha256:dc132348a88d103016726fe360cb9ede02cecf99b76e3660ce6c596be132ce04"}, ] certifi = [ - {file = "certifi-2020.12.5-py2.py3-none-any.whl", hash = "sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830"}, - {file = "certifi-2020.12.5.tar.gz", hash = "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"}, + {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, + {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, ] cffi = [ {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"}, @@ -727,36 +744,24 @@ cffi = [ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, @@ -800,16 +805,16 @@ dnspython = [ {file = "dnspython-2.1.0.zip", hash = "sha256:e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4"}, ] ecdsa = [ - {file = "ecdsa-0.14.1-py2.py3-none-any.whl", hash = "sha256:e108a5fe92c67639abae3260e43561af914e7fd0d27bae6d2ec1312ae7934dfe"}, - {file = "ecdsa-0.14.1.tar.gz", hash = "sha256:64c613005f13efec6541bb0a33290d0d03c27abab5f15fbab20fb0ee162bdd8e"}, + {file = "ecdsa-0.17.0-py2.py3-none-any.whl", hash = "sha256:5cf31d5b33743abe0dfc28999036c849a69d548f994b535e527ee3cb7f3ef676"}, + {file = "ecdsa-0.17.0.tar.gz", hash = "sha256:b9f500bb439e4153d0330610f5d26baaf18d17b8ced1bc54410d189385ea68aa"}, ] email-validator = [ - {file = "email-validator-1.1.2.tar.gz", hash = "sha256:1a13bd6050d1db4475f13e444e169b6fe872434922d38968c67cea9568cce2f0"}, - {file = "email_validator-1.1.2-py2.py3-none-any.whl", hash = "sha256:094b1d1c60d790649989d38d34f69e1ef07792366277a2cf88684d03495d018f"}, + {file = "email_validator-1.1.3-py2.py3-none-any.whl", hash = "sha256:5675c8ceb7106a37e40e2698a57c056756bf3f272cfa8682a4f87ebd95d8440b"}, + {file = "email_validator-1.1.3.tar.gz", hash = "sha256:aa237a65f6f4da067119b7df3f13e89c25c051327b2b5b66dc075f33d62480d7"}, ] fastapi = [ - {file = "fastapi-0.63.0-py3-none-any.whl", hash = "sha256:98d8ea9591d8512fdadf255d2a8fa56515cdd8624dca4af369da73727409508e"}, - {file = "fastapi-0.63.0.tar.gz", hash = "sha256:63c4592f5ef3edf30afa9a44fa7c6b7ccb20e0d3f68cd9eba07b44d552058dcb"}, + {file = "fastapi-0.65.2-py3-none-any.whl", hash = "sha256:39569a18914075b2f1aaa03bcb9dc96a38e0e5dabaf3972e088c9077dfffa379"}, + {file = "fastapi-0.65.2.tar.gz", hash = "sha256:8359e55d8412a5571c0736013d90af235d6949ec4ce978e9b63500c8f4b6f714"}, ] flake8 = [ {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, @@ -831,6 +836,10 @@ iso8601 = [ {file = "iso8601-0.1.14-py2.py3-none-any.whl", hash = "sha256:e7e1122f064d626e17d47cd5106bed2c620cb38fe464999e0ddae2b6d2de6004"}, {file = "iso8601-0.1.14.tar.gz", hash = "sha256:8aafd56fa0290496c5edbb13c311f78fa3a241f0853540da09d9363eae3ebd79"}, ] +isort = [ + {file = "isort-5.8.0-py3-none-any.whl", hash = "sha256:2bb1680aad211e3c9944dbce1d4ba09a989f04e238296c87fe2139faa26d655d"}, + {file = "isort-5.8.0.tar.gz", hash = "sha256:0a943902919f65c5684ac4e0154b1ad4fac6dcaa5d9f3426b732f1c8b5419be6"}, +] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, @@ -927,8 +936,8 @@ python-dotenv = [ {file = "python_dotenv-0.17.1-py2.py3-none-any.whl", hash = "sha256:00aa34e92d992e9f8383730816359647f358f4a3be1ba45e5a5cefd27ee91544"}, ] python-jose = [ - {file = "python-jose-3.2.0.tar.gz", hash = "sha256:4e4192402e100b5fb09de5a8ea6bcc39c36ad4526341c123d401e2561720335b"}, - {file = "python_jose-3.2.0-py2.py3-none-any.whl", hash = "sha256:67d7dfff599df676b04a996520d9be90d6cdb7e6dd10b4c7cacc0c3e2e92f2be"}, + {file = "python-jose-3.3.0.tar.gz", hash = "sha256:55779b5e6ad599c6336191246e95eb2293a9ddebd555f796a65f838f07e5d78a"}, + {file = "python_jose-3.3.0-py2.py3-none-any.whl", hash = "sha256:9b1376b023f8b298536eedd47ae1089bcdb848f1535ab30555cd92002d78923a"}, ] python-multipart = [ {file = "python-multipart-0.0.5.tar.gz", hash = "sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"}, @@ -993,8 +1002,8 @@ six = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] starlette = [ - {file = "starlette-0.13.6-py3-none-any.whl", hash = "sha256:bd2ffe5e37fb75d014728511f8e68ebf2c80b0fa3d04ca1479f4dc752ae31ac9"}, - {file = "starlette-0.13.6.tar.gz", hash = "sha256:ebe8ee08d9be96a3c9f31b2cb2a24dbdf845247b745664bd8a3f9bd0c977fdbc"}, + {file = "starlette-0.14.2-py3-none-any.whl", hash = "sha256:3c8e48e52736b3161e34c9f0e8153b4f32ec5d8995a3ee1d59410d92f75162ed"}, + {file = "starlette-0.14.2.tar.gz", hash = "sha256:7d49f4a27f8742262ef1470608c59ddbc66baf37c148e938c7038e6bc7a998aa"}, ] tenacity = [ {file = "tenacity-7.0.0-py2.py3-none-any.whl", hash = "sha256:a0ce48587271515db7d3a5e700df9ae69cce98c4b57c23a4886da15243603dd8"}, @@ -1005,8 +1014,8 @@ toml = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tortoise-orm = [ - {file = "tortoise-orm-0.17.3.tar.gz", hash = "sha256:6e5e56694b64118faaada2670343c909d6c9f84c7235f3372b8a398b2e8d6628"}, - {file = "tortoise_orm-0.17.3-py3-none-any.whl", hash = "sha256:99b448a870a81b6edb3ef9d2f0e22b2c83afa2b6348178840d3ccdbf03e206d3"}, + {file = "tortoise-orm-0.17.4.tar.gz", hash = "sha256:8314a9ae63d3f009bac5da3e7d1f7e3f2de8f9bad43ce1efcd3e059209cd3f9d"}, + {file = "tortoise_orm-0.17.4-py3-none-any.whl", hash = "sha256:f052b6089e30748afec88669f1a1cf01a3662cdac81cf5427dfb338839ad6027"}, ] typing-extensions = [ {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/pyproject.toml b/fastapi_plan/template/{{cookiecutter.project_name}}/pyproject.toml index 4dc614d..47b14b7 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/pyproject.toml +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/pyproject.toml @@ -6,7 +6,7 @@ authors = ["Your Name "] [tool.poetry.dependencies] python = "^3.9" -fastapi = "^0.63.0" +fastapi = "^0.65.2" tortoise-orm = {extras = ["asyncpg"], version = "^0.17.2"} python-jose = {extras = ["cryptography"], version = "^3.2.0"} passlib = {extras = ["bcrypt"], version = "^1.7.4"} @@ -23,6 +23,7 @@ pytest = "^6.0" black = "^21.5b0" flake8 = "^3.9.1" asynctest = "^0.13.0" +isort = "^5.8.0" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/requirements.txt b/fastapi_plan/template/{{cookiecutter.project_name}}/requirements.txt index 4466b32..cb669d1 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/requirements.txt +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/requirements.txt @@ -28,9 +28,9 @@ bcrypt==3.2.0; python_version >= "3.6" \ --hash=sha256:a67fb841b35c28a59cebed05fbd3e80eea26e6d75851f0574a9273c80f3e9b55 \ --hash=sha256:81fec756feff5b6818ea7ab031205e1d323d8943d237303baca2c5f9c7846f34 \ --hash=sha256:5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29 -certifi==2020.12.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ - --hash=sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830 \ - --hash=sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c +certifi==2021.5.30; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ + --hash=sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8 \ + --hash=sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee cffi==1.14.5 \ --hash=sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991 \ --hash=sha256:34eff4b97f3d982fb93e2831e6750127d1355a923ebaeeb565407b3d2f8d41a1 \ @@ -48,36 +48,24 @@ cffi==1.14.5 \ --hash=sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058 \ --hash=sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5 \ --hash=sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132 \ - --hash=sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f \ - --hash=sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed \ - --hash=sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55 \ --hash=sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53 \ --hash=sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813 \ --hash=sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73 \ --hash=sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06 \ --hash=sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1 \ --hash=sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49 \ - --hash=sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69 \ - --hash=sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05 \ - --hash=sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc \ --hash=sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62 \ --hash=sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4 \ --hash=sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053 \ --hash=sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0 \ --hash=sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e \ --hash=sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827 \ - --hash=sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373 \ - --hash=sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f \ - --hash=sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76 \ --hash=sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e \ --hash=sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396 \ --hash=sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea \ --hash=sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322 \ --hash=sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c \ --hash=sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee \ - --hash=sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0 \ - --hash=sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333 \ - --hash=sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7 \ --hash=sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396 \ --hash=sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d \ --hash=sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c @@ -109,15 +97,15 @@ dictdiffer==0.8.1; python_version >= "3.7" and python_version < "4.0" \ dnspython==2.1.0; python_full_version >= "3.6.1" and python_version >= "3.6" \ --hash=sha256:95d12f6ef0317118d2a1a6fc49aac65ffec7eb8087474158f42f26a639135216 \ --hash=sha256:e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4 -ecdsa==0.14.1; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" \ - --hash=sha256:e108a5fe92c67639abae3260e43561af914e7fd0d27bae6d2ec1312ae7934dfe \ - --hash=sha256:64c613005f13efec6541bb0a33290d0d03c27abab5f15fbab20fb0ee162bdd8e -email-validator==1.1.2; python_full_version >= "3.6.1" and python_version >= "3.6" \ - --hash=sha256:1a13bd6050d1db4475f13e444e169b6fe872434922d38968c67cea9568cce2f0 \ - --hash=sha256:094b1d1c60d790649989d38d34f69e1ef07792366277a2cf88684d03495d018f -fastapi==0.63.0; python_version >= "3.6" \ - --hash=sha256:98d8ea9591d8512fdadf255d2a8fa56515cdd8624dca4af369da73727409508e \ - --hash=sha256:63c4592f5ef3edf30afa9a44fa7c6b7ccb20e0d3f68cd9eba07b44d552058dcb +ecdsa==0.17.0; python_version >= "2.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" \ + --hash=sha256:5cf31d5b33743abe0dfc28999036c849a69d548f994b535e527ee3cb7f3ef676 \ + --hash=sha256:b9f500bb439e4153d0330610f5d26baaf18d17b8ced1bc54410d189385ea68aa +email-validator==1.1.3; python_full_version >= "3.6.1" and python_version >= "3.6" \ + --hash=sha256:5675c8ceb7106a37e40e2698a57c056756bf3f272cfa8682a4f87ebd95d8440b \ + --hash=sha256:aa237a65f6f4da067119b7df3f13e89c25c051327b2b5b66dc075f33d62480d7 +fastapi==0.65.2; python_version >= "3.6" \ + --hash=sha256:39569a18914075b2f1aaa03bcb9dc96a38e0e5dabaf3972e088c9077dfffa379 \ + --hash=sha256:8359e55d8412a5571c0736013d90af235d6949ec4ce978e9b63500c8f4b6f714 h11==0.12.0; python_version >= "3.6" \ --hash=sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6 \ --hash=sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042 @@ -179,9 +167,9 @@ pypika-tortoise==0.1.1; python_version >= "3.7" and python_version < "4.0" \ python-dotenv==0.17.1 \ --hash=sha256:b1ae5e9643d5ed987fc57cc2583021e38db531946518130777734f9589b3141f \ --hash=sha256:00aa34e92d992e9f8383730816359647f358f4a3be1ba45e5a5cefd27ee91544 -python-jose==3.2.0 \ - --hash=sha256:4e4192402e100b5fb09de5a8ea6bcc39c36ad4526341c123d401e2561720335b \ - --hash=sha256:67d7dfff599df676b04a996520d9be90d6cdb7e6dd10b4c7cacc0c3e2e92f2be +python-jose==3.3.0 \ + --hash=sha256:55779b5e6ad599c6336191246e95eb2293a9ddebd555f796a65f838f07e5d78a \ + --hash=sha256:9b1376b023f8b298536eedd47ae1089bcdb848f1535ab30555cd92002d78923a python-multipart==0.0.5 \ --hash=sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43 pytz==2021.1; python_version >= "3.7" and python_version < "4.0" \ @@ -196,15 +184,15 @@ rsa==4.7.2; python_version >= "3.5" and python_version < "4" \ six==1.16.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_version >= "3.6" and python_full_version >= "3.3.0" \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 -starlette==0.13.6; python_version >= "3.6" \ - --hash=sha256:bd2ffe5e37fb75d014728511f8e68ebf2c80b0fa3d04ca1479f4dc752ae31ac9 \ - --hash=sha256:ebe8ee08d9be96a3c9f31b2cb2a24dbdf845247b745664bd8a3f9bd0c977fdbc +starlette==0.14.2; python_version >= "3.6" \ + --hash=sha256:3c8e48e52736b3161e34c9f0e8153b4f32ec5d8995a3ee1d59410d92f75162ed \ + --hash=sha256:7d49f4a27f8742262ef1470608c59ddbc66baf37c148e938c7038e6bc7a998aa tenacity==7.0.0 \ --hash=sha256:a0ce48587271515db7d3a5e700df9ae69cce98c4b57c23a4886da15243603dd8 \ --hash=sha256:5bd16ef5d3b985647fe28dfa6f695d343aa26479a04e8792b9d3c8f49e361ae1 -tortoise-orm==0.17.3; python_version >= "3.7" and python_version < "4.0" \ - --hash=sha256:6e5e56694b64118faaada2670343c909d6c9f84c7235f3372b8a398b2e8d6628 \ - --hash=sha256:99b448a870a81b6edb3ef9d2f0e22b2c83afa2b6348178840d3ccdbf03e206d3 +tortoise-orm==0.17.4; python_version >= "3.7" and python_version < "4.0" \ + --hash=sha256:8314a9ae63d3f009bac5da3e7d1f7e3f2de8f9bad43ce1efcd3e059209cd3f9d \ + --hash=sha256:f052b6089e30748afec88669f1a1cf01a3662cdac81cf5427dfb338839ad6027 typing-extensions==3.10.0.0; python_full_version >= "3.6.1" and python_version >= "3.7" and python_version < "4.0" \ --hash=sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497 \ --hash=sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84 \ diff --git a/poetry.lock b/poetry.lock index 61974cc..58c55dd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -119,7 +119,7 @@ chardet = ">=3.0.2" [[package]] name = "black" -version = "21.5b1" +version = "21.6b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -135,12 +135,13 @@ toml = ">=0.10.1" [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.6.0)", "aiohttp-cors"] +d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] python2 = ["typed-ast (>=1.4.2)"] +uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "certifi" -version = "2020.12.5" +version = "2021.5.30" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false @@ -260,22 +261,26 @@ trio = ["trio (>=0.14.0)", "sniffio (>=1.1)"] [[package]] name = "ecdsa" -version = "0.14.1" +version = "0.17.0" description = "ECDSA cryptographic signature library (pure python)" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [package.dependencies] -six = "*" +six = ">=1.9.0" + +[package.extras] +gmpy = ["gmpy"] +gmpy2 = ["gmpy2"] [[package]] name = "email-validator" -version = "1.1.2" +version = "1.1.3" description = "A robust email syntax and deliverability validation library for Python 2.x/3.x." category = "dev" optional = false -python-versions = "*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] dnspython = ">=1.15.0" @@ -283,21 +288,21 @@ idna = ">=2.0.0" [[package]] name = "fastapi" -version = "0.63.0" +version = "0.65.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] -pydantic = ">=1.0.0,<2.0.0" -starlette = "0.13.6" +pydantic = ">=1.6.2,<1.7 || >1.7,<1.7.1 || >1.7.1,<1.7.2 || >1.7.2,<1.7.3 || >1.7.3,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0" +starlette = "0.14.2" [package.extras] -all = ["requests (>=2.24.0,<3.0.0)", "aiofiles (>=0.5.0,<0.6.0)", "jinja2 (>=2.11.2,<3.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "itsdangerous (>=1.1.0,<2.0.0)", "pyyaml (>=5.3.1,<6.0.0)", "graphene (>=2.1.8,<3.0.0)", "ujson (>=3.0.0,<4.0.0)", "orjson (>=3.2.1,<4.0.0)", "email_validator (>=1.1.1,<2.0.0)", "uvicorn[standard] (>=0.12.0,<0.14.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)"] +all = ["requests (>=2.24.0,<3.0.0)", "aiofiles (>=0.5.0,<0.6.0)", "jinja2 (>=2.11.2,<3.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "itsdangerous (>=1.1.0,<2.0.0)", "pyyaml (>=5.3.1,<6.0.0)", "graphene (>=2.1.8,<3.0.0)", "ujson (>=4.0.1,<5.0.0)", "orjson (>=3.2.1,<4.0.0)", "email_validator (>=1.1.1,<2.0.0)", "uvicorn[standard] (>=0.12.0,<0.14.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)"] dev = ["python-jose[cryptography] (>=3.1.0,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "autoflake (>=1.3.1,<2.0.0)", "flake8 (>=3.8.3,<4.0.0)", "uvicorn[standard] (>=0.12.0,<0.14.0)", "graphene (>=2.1.8,<3.0.0)"] doc = ["mkdocs (>=1.1.2,<2.0.0)", "mkdocs-material (>=6.1.4,<7.0.0)", "markdown-include (>=0.5.1,<0.6.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.2.0)", "typer-cli (>=0.0.9,<0.0.10)", "pyyaml (>=5.3.1,<6.0.0)"] -test = ["pytest (==5.4.3)", "pytest-cov (==2.10.0)", "pytest-asyncio (>=0.14.0,<0.15.0)", "mypy (==0.790)", "flake8 (>=3.8.3,<4.0.0)", "black (==20.8b1)", "isort (>=5.0.6,<6.0.0)", "requests (>=2.24.0,<3.0.0)", "httpx (>=0.14.0,<0.15.0)", "email_validator (>=1.1.1,<2.0.0)", "sqlalchemy (>=1.3.18,<2.0.0)", "peewee (>=3.13.3,<4.0.0)", "databases[sqlite] (>=0.3.2,<0.4.0)", "orjson (>=3.2.1,<4.0.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "aiofiles (>=0.5.0,<0.6.0)", "flask (>=1.1.2,<2.0.0)"] +test = ["pytest (==5.4.3)", "pytest-cov (==2.10.0)", "pytest-asyncio (>=0.14.0,<0.15.0)", "mypy (==0.812)", "flake8 (>=3.8.3,<4.0.0)", "black (==20.8b1)", "isort (>=5.0.6,<6.0.0)", "requests (>=2.24.0,<3.0.0)", "httpx (>=0.14.0,<0.15.0)", "email_validator (>=1.1.1,<2.0.0)", "sqlalchemy (>=1.3.18,<1.4.0)", "peewee (>=3.13.3,<4.0.0)", "databases[sqlite] (>=0.3.2,<0.4.0)", "orjson (>=3.2.1,<4.0.0)", "ujson (>=4.0.1,<5.0.0)", "async_exit_stack (>=1.0.1,<2.0.0)", "async_generator (>=1.10,<2.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "aiofiles (>=0.5.0,<0.6.0)", "flask (>=1.1.2,<2.0.0)"] [[package]] name = "flake8" @@ -578,21 +583,20 @@ cli = ["click (>=5.0)"] [[package]] name = "python-jose" -version = "3.2.0" +version = "3.3.0" description = "JOSE implementation in Python" category = "dev" optional = false python-versions = "*" [package.dependencies] -cryptography = {version = "*", optional = true, markers = "extra == \"cryptography\""} -ecdsa = "<0.15" +cryptography = {version = ">=3.4.0", optional = true, markers = "extra == \"cryptography\""} +ecdsa = "!=0.15" pyasn1 = "*" rsa = "*" -six = "<2.0" [package.extras] -cryptography = ["cryptography"] +cryptography = ["cryptography (>=3.4.0)"] pycrypto = ["pycrypto (>=2.6.0,<2.7.0)", "pyasn1"] pycryptodome = ["pycryptodome (>=3.3.1,<4.0.0)", "pyasn1"] @@ -676,14 +680,14 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "starlette" -version = "0.13.6" +version = "0.14.2" description = "The little ASGI library that shines." category = "dev" optional = false python-versions = ">=3.6" [package.extras] -full = ["aiofiles", "graphene", "itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests", "ujson"] +full = ["aiofiles", "graphene", "itsdangerous", "jinja2", "python-multipart", "pyyaml", "requests"] [[package]] name = "tenacity" @@ -717,7 +721,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tortoise-orm" -version = "0.17.3" +version = "0.17.4" description = "Easy async ORM for python, built with relations in mind" category = "dev" optional = false @@ -776,7 +780,7 @@ standard = ["websockets (>=8.0.0,<9.0.0)", "watchgod (>=0.6)", "python-dotenv (> [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "ea1e8939b34c710a155d4eedcdbbc0f637e0aa4c64481373045dd789614f28e7" +content-hash = "586134125652ffe254ab7d52ec62b6c811fc8fdb6a7aca8b76b223ddf51ec245" [metadata.files] aerich = [ @@ -838,12 +842,12 @@ binaryornot = [ {file = "binaryornot-0.4.4.tar.gz", hash = "sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061"}, ] black = [ - {file = "black-21.5b1-py3-none-any.whl", hash = "sha256:8a60071a0043876a4ae96e6c69bd3a127dad2c1ca7c8083573eb82f92705d008"}, - {file = "black-21.5b1.tar.gz", hash = "sha256:23695358dbcb3deafe7f0a3ad89feee5999a46be5fec21f4f1d108be0bcdb3b1"}, + {file = "black-21.6b0-py3-none-any.whl", hash = "sha256:dfb8c5a069012b2ab1e972e7b908f5fb42b6bbabcba0a788b86dc05067c7d9c7"}, + {file = "black-21.6b0.tar.gz", hash = "sha256:dc132348a88d103016726fe360cb9ede02cecf99b76e3660ce6c596be132ce04"}, ] certifi = [ - {file = "certifi-2020.12.5-py2.py3-none-any.whl", hash = "sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830"}, - {file = "certifi-2020.12.5.tar.gz", hash = "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"}, + {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, + {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, ] cffi = [ {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"}, @@ -862,36 +866,24 @@ cffi = [ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, @@ -939,16 +931,16 @@ dnspython = [ {file = "dnspython-2.1.0.zip", hash = "sha256:e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4"}, ] ecdsa = [ - {file = "ecdsa-0.14.1-py2.py3-none-any.whl", hash = "sha256:e108a5fe92c67639abae3260e43561af914e7fd0d27bae6d2ec1312ae7934dfe"}, - {file = "ecdsa-0.14.1.tar.gz", hash = "sha256:64c613005f13efec6541bb0a33290d0d03c27abab5f15fbab20fb0ee162bdd8e"}, + {file = "ecdsa-0.17.0-py2.py3-none-any.whl", hash = "sha256:5cf31d5b33743abe0dfc28999036c849a69d548f994b535e527ee3cb7f3ef676"}, + {file = "ecdsa-0.17.0.tar.gz", hash = "sha256:b9f500bb439e4153d0330610f5d26baaf18d17b8ced1bc54410d189385ea68aa"}, ] email-validator = [ - {file = "email-validator-1.1.2.tar.gz", hash = "sha256:1a13bd6050d1db4475f13e444e169b6fe872434922d38968c67cea9568cce2f0"}, - {file = "email_validator-1.1.2-py2.py3-none-any.whl", hash = "sha256:094b1d1c60d790649989d38d34f69e1ef07792366277a2cf88684d03495d018f"}, + {file = "email_validator-1.1.3-py2.py3-none-any.whl", hash = "sha256:5675c8ceb7106a37e40e2698a57c056756bf3f272cfa8682a4f87ebd95d8440b"}, + {file = "email_validator-1.1.3.tar.gz", hash = "sha256:aa237a65f6f4da067119b7df3f13e89c25c051327b2b5b66dc075f33d62480d7"}, ] fastapi = [ - {file = "fastapi-0.63.0-py3-none-any.whl", hash = "sha256:98d8ea9591d8512fdadf255d2a8fa56515cdd8624dca4af369da73727409508e"}, - {file = "fastapi-0.63.0.tar.gz", hash = "sha256:63c4592f5ef3edf30afa9a44fa7c6b7ccb20e0d3f68cd9eba07b44d552058dcb"}, + {file = "fastapi-0.65.2-py3-none-any.whl", hash = "sha256:39569a18914075b2f1aaa03bcb9dc96a38e0e5dabaf3972e088c9077dfffa379"}, + {file = "fastapi-0.65.2.tar.gz", hash = "sha256:8359e55d8412a5571c0736013d90af235d6949ec4ce978e9b63500c8f4b6f714"}, ] flake8 = [ {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, @@ -1122,8 +1114,8 @@ python-dotenv = [ {file = "python_dotenv-0.17.1-py2.py3-none-any.whl", hash = "sha256:00aa34e92d992e9f8383730816359647f358f4a3be1ba45e5a5cefd27ee91544"}, ] python-jose = [ - {file = "python-jose-3.2.0.tar.gz", hash = "sha256:4e4192402e100b5fb09de5a8ea6bcc39c36ad4526341c123d401e2561720335b"}, - {file = "python_jose-3.2.0-py2.py3-none-any.whl", hash = "sha256:67d7dfff599df676b04a996520d9be90d6cdb7e6dd10b4c7cacc0c3e2e92f2be"}, + {file = "python-jose-3.3.0.tar.gz", hash = "sha256:55779b5e6ad599c6336191246e95eb2293a9ddebd555f796a65f838f07e5d78a"}, + {file = "python_jose-3.3.0-py2.py3-none-any.whl", hash = "sha256:9b1376b023f8b298536eedd47ae1089bcdb848f1535ab30555cd92002d78923a"}, ] python-multipart = [ {file = "python-multipart-0.0.5.tar.gz", hash = "sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"}, @@ -1192,8 +1184,8 @@ six = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] starlette = [ - {file = "starlette-0.13.6-py3-none-any.whl", hash = "sha256:bd2ffe5e37fb75d014728511f8e68ebf2c80b0fa3d04ca1479f4dc752ae31ac9"}, - {file = "starlette-0.13.6.tar.gz", hash = "sha256:ebe8ee08d9be96a3c9f31b2cb2a24dbdf845247b745664bd8a3f9bd0c977fdbc"}, + {file = "starlette-0.14.2-py3-none-any.whl", hash = "sha256:3c8e48e52736b3161e34c9f0e8153b4f32ec5d8995a3ee1d59410d92f75162ed"}, + {file = "starlette-0.14.2.tar.gz", hash = "sha256:7d49f4a27f8742262ef1470608c59ddbc66baf37c148e938c7038e6bc7a998aa"}, ] tenacity = [ {file = "tenacity-7.0.0-py2.py3-none-any.whl", hash = "sha256:a0ce48587271515db7d3a5e700df9ae69cce98c4b57c23a4886da15243603dd8"}, @@ -1208,8 +1200,8 @@ toml = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tortoise-orm = [ - {file = "tortoise-orm-0.17.3.tar.gz", hash = "sha256:6e5e56694b64118faaada2670343c909d6c9f84c7235f3372b8a398b2e8d6628"}, - {file = "tortoise_orm-0.17.3-py3-none-any.whl", hash = "sha256:99b448a870a81b6edb3ef9d2f0e22b2c83afa2b6348178840d3ccdbf03e206d3"}, + {file = "tortoise-orm-0.17.4.tar.gz", hash = "sha256:8314a9ae63d3f009bac5da3e7d1f7e3f2de8f9bad43ce1efcd3e059209cd3f9d"}, + {file = "tortoise_orm-0.17.4-py3-none-any.whl", hash = "sha256:f052b6089e30748afec88669f1a1cf01a3662cdac81cf5427dfb338839ad6027"}, ] typing-extensions = [ {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, diff --git a/pyproject.toml b/pyproject.toml index 459b925..7970371 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] name = "fastapi-plan" -version = "0.3.1" +version = "0.3.2" description = "Dead simple template manager for FastAPI applications" license = "MIT" readme = "README.md" repository = "https://github.com/rafsaf/fastapi-template" -authors = ["rafsaf "] +authors = ["rafsaf "] keywords = ["Python", "FastAPI",] include = [ "LICENSE", @@ -18,7 +18,7 @@ cookiecutter = "^1.7.2" fastapi-plan = "fastapi_plan:main" [tool.poetry.dev-dependencies] -fastapi = "^0.63.0" +fastapi = "^0.65.2" tortoise-orm = {extras = ["asyncpg"], version = "^0.17.2"} python-jose = {extras = ["cryptography"], version = "^3.2.0"} passlib = {extras = ["bcrypt"], version = "^1.7.4"} diff --git a/requirements.txt b/requirements.txt index 0350d1c..e3e1227 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ -arrow==0.13.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ - --hash=sha256:002f2315cf4c8404de737c42860441732d339bbc57fee584e2027520e055ecc1 \ - --hash=sha256:82dd5e13b733787d4eb0fef42d1ee1a99136dc1d65178f70373b3678b3181bfc +arrow==1.1.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" \ + --hash=sha256:8cbe6a629b1c54ae11b52d6d9e70890089241958f63bc59467e277e34b7a5378 \ + --hash=sha256:b8fe13abf3517abab315e09350c903902d1447bd311afbc17547ba1cb3ff5bd8 binaryornot==0.4.4; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ --hash=sha256:b8b71173c917bddcd2c16070412e369c3ed7f0528926f70cac18a6c97fd563e4 \ --hash=sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061 -certifi==2020.12.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ - --hash=sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830 \ - --hash=sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c +certifi==2021.5.30; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ + --hash=sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8 \ + --hash=sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee chardet==4.0.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ --hash=sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5 \ --hash=sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa @@ -63,7 +63,7 @@ markupsafe==2.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or poyo==0.5.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ --hash=sha256:3e2ca8e33fdc3c411cd101ca395668395dd5dc7ac775b8e809e3def9f9fe041a \ --hash=sha256:e26956aa780c45f011ca9886f044590e2d8fd8b61db7b1c1cf4e0869f48ed4dd -python-dateutil==2.8.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ +python-dateutil==2.8.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" \ --hash=sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c \ --hash=sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a python-slugify==5.0.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" \ @@ -72,7 +72,7 @@ python-slugify==5.0.2; python_version >= "3.6" and python_full_version < "3.0.0" requests==2.25.1; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0") \ --hash=sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e \ --hash=sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804 -six==1.16.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ +six==1.16.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 text-unidecode==1.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6" \ diff --git a/tests/create_test_project.py b/tests/create_test_project.py index 4ca92f0..73e9220 100644 --- a/tests/create_test_project.py +++ b/tests/create_test_project.py @@ -2,6 +2,7 @@ Creates template project in current folder with default values """ from pathlib import Path + from cookiecutter.main import cookiecutter ROOT_FOLDER = Path(__file__).parent.parent From e3ca2938bf3597b0c660f11f6dd575f90d3cfe34 Mon Sep 17 00:00:00 2001 From: rafsaf Date: Thu, 17 Jun 2021 22:36:20 +0200 Subject: [PATCH 2/2] fixed isort weird import syntax in 2 files (black is better) --- .../{{cookiecutter.project_name}}/app/initial_data.py | 3 +-- .../app/schemas/__init__.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/initial_data.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/initial_data.py index 33619ed..b554693 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/initial_data.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/initial_data.py @@ -1,7 +1,6 @@ import logging -from tenacity import (after_log, before_log, retry, stop_after_attempt, - wait_fixed) +from tenacity import after_log, before_log, retry, stop_after_attempt, wait_fixed from tortoise import Tortoise, run_async try: diff --git a/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/__init__.py b/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/__init__.py index 82fd1e5..3238e09 100644 --- a/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/__init__.py +++ b/fastapi_plan/template/{{cookiecutter.project_name}}/app/schemas/__init__.py @@ -1,3 +1,9 @@ from .token import Token, TokenPayload # noqa -from .user import (UserCreateBySuperuser, UserCreateMe, UserPydantic, - UserPydanticList, UserUpdateBySuperuser, UserUpdateMe) +from .user import ( + UserCreateBySuperuser, + UserCreateMe, + UserPydantic, + UserPydanticList, + UserUpdateBySuperuser, + UserUpdateMe, +)