From 8cc9ccab92e0de849f344fe895b06c2b7ea6ceac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 10 Dec 2018 05:53:46 +0400 Subject: [PATCH] :art: Update main imports (and exports) --- fastapi/__init__.py | 8 ++++++-- fastapi/openapi/utils.py | 2 +- fastapi/security/__init__.py | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/fastapi/__init__.py b/fastapi/__init__.py index eef220e49..326428564 100644 --- a/fastapi/__init__.py +++ b/fastapi/__init__.py @@ -1,3 +1,7 @@ -"""Fast API framework, high performance, fast to learn, fast to code, fast to production""" +"""FastAPI framework, high performance, easy to learn, fast to code, ready for production""" -__version__ = "0.1.0" +__version__ = "0.1.2" + +from .applications import FastAPI +from .routing import APIRouter +from .params import Body, Path, Query, Header, Cookie, Form, File, Security, Depends diff --git a/fastapi/openapi/utils.py b/fastapi/openapi/utils.py index bb75a024e..3e445d615 100644 --- a/fastapi/openapi/utils.py +++ b/fastapi/openapi/utils.py @@ -124,7 +124,7 @@ def generate_operation_id(*, route: routing.APIRoute, method: str) -> str: def generate_operation_summary(*, route: routing.APIRoute, method: str) -> str: if route.summary: return route.summary - return method.title() + " " + route.name.replace("_", " ").title() + return route.name.replace("_", " ").title() + " " + method.title() def get_openapi_operation_metadata(*, route: routing.APIRoute, method: str) -> Dict: diff --git a/fastapi/security/__init__.py b/fastapi/security/__init__.py index e69de29bb..ba66dd54e 100644 --- a/fastapi/security/__init__.py +++ b/fastapi/security/__init__.py @@ -0,0 +1,4 @@ +from .api_key import APIKeyQuery, APIKeyHeader, APIKeyCookie +from .http import HTTPBasic, HTTPBearer, HTTPDigest +from .oauth2 import OAuth2PasswordRequestForm, OAuth2 +from .open_id_connect_url import OpenIdConnect