SYMBOL INDEX (1592 symbols across 100 files) FILE: examples/blog/app/apis.py class PostAPI (line 19) | class PostAPI(ListAPI, CreateAPI): method get_query (line 27) | async def get_query(self, request: Request, **kwargs): class PostDetailAPI (line 32) | class PostDetailAPI(UpdateAPI, RetrieveAPI, DeleteAPI): method get_instance (line 36) | async def get_instance(self, request: Request, **kwargs) -> Model: class CommentAPI (line 40) | class CommentAPI(GenericAPI): method post (line 44) | async def post(self, request: Request, post_id: str): FILE: examples/blog/app/models.py class Post (line 4) | class Post(Model): class Comment (line 9) | class Comment(Model): FILE: examples/blog/app/serializers.py class PostSerializer (line 8) | class PostSerializer(ModelSerializer): class Config (line 9) | class Config: class PostOutputSerializer (line 14) | class PostOutputSerializer(ModelSerializer): class Config (line 15) | class Config: class PostDetailOutputSerializer (line 20) | class PostDetailOutputSerializer(ModelSerializer): class Config (line 21) | class Config: method to_response (line 25) | async def to_response(self, instance: Any, data: dict) -> dict: class CommentSerializer (line 30) | class CommentSerializer(ModelSerializer): class Config (line 31) | class Config: FILE: examples/blog/user/apis.py class RegisterAPI (line 12) | class RegisterAPI(GenericAPI): method post (line 16) | async def post(self, request: Request, **kwargs): class LoginAPI (line 27) | class LoginAPI(GenericAPI): method post (line 30) | async def post(self, request: Request): FILE: examples/blog/user/serializers.py class UserSerializer (line 5) | class UserSerializer(ModelSerializer): class Config (line 6) | class Config: class UserOutputSerializer (line 11) | class UserOutputSerializer(ModelSerializer): class Config (line 12) | class Config: FILE: examples/broadcast_websocket.py class User (line 8) | class User(Model): class BroadcastWebsocket (line 20) | class BroadcastWebsocket(GenericWebsocket): method connect (line 21) | async def connect(self, **kwargs): method receive (line 25) | async def receive(self, data: str | bytes): class MainPage (line 31) | class MainPage(GenericAPI): method get (line 32) | def get(self): FILE: examples/file_upload_example.py class Document (line 29) | class Document(Model): class Profile (line 36) | class Profile(Model): class DocumentUploadSerializer (line 43) | class DocumentUploadSerializer(ModelSerializer): class Config (line 44) | class Config: class ProfileUploadSerializer (line 50) | class ProfileUploadSerializer(ModelSerializer): class Config (line 51) | class Config: function upload_document (line 59) | async def upload_document(request: Request): function upload_profile_image (line 108) | async def upload_profile_image(request: Request): function list_documents (line 142) | async def list_documents(request: Request): function get_document (line 164) | async def get_document(document_id: str): FILE: examples/streaming_response.py class MainPage (line 10) | class MainPage(GenericAPI): method generator (line 11) | def generator(self): method get (line 17) | def get(self): class ProgressStream (line 21) | class ProgressStream(GenericAPI): method generator (line 22) | def generator(self): method get (line 37) | def get(self): class LogStream (line 41) | class LogStream(GenericAPI): method generator (line 42) | def generator(self): method get (line 64) | def get(self): class ChatStream (line 68) | class ChatStream(GenericAPI): method generator (line 69) | def generator(self): method get (line 90) | def get(self): class ErrorHandlingStream (line 94) | class ErrorHandlingStream(GenericAPI): method generator (line 95) | def generator(self): method get (line 110) | def get(self): FILE: panther/__init__.py function version (line 6) | def version(): FILE: panther/_load_configs.py function load_configs_module (line 48) | def load_configs_module(module_name: str, /) -> dict: function load_redis (line 60) | def load_redis(_configs: dict, /) -> None: function load_timezone (line 75) | def load_timezone(_configs: dict, /) -> None: function load_templates_dir (line 80) | def load_templates_dir(_configs: dict, /) -> None: function load_database (line 98) | def load_database(_configs: dict, /) -> None: function load_secret_key (line 122) | def load_secret_key(_configs: dict, /) -> None: function load_throttling (line 127) | def load_throttling(_configs: dict, /) -> None: function load_user_model (line 132) | def load_user_model(_configs: dict, /) -> None: function load_log_queries (line 138) | def load_log_queries(_configs: dict, /) -> None: function load_middlewares (line 143) | def load_middlewares(_configs: dict, /) -> None: function load_auto_reformat (line 206) | def load_auto_reformat(_configs: dict, /) -> None: function load_background_tasks (line 211) | def load_background_tasks(_configs: dict, /) -> None: function load_other_configs (line 217) | def load_other_configs(_configs: dict, /) -> None: function load_urls (line 224) | def load_urls(_configs: dict, /, urls: dict | None) -> None: function load_authentication_class (line 257) | def load_authentication_class(_configs: dict, /) -> None: function load_jwt_config (line 268) | def load_jwt_config(_configs: dict, /) -> None: function load_websocket_connections (line 290) | def load_websocket_connections(): function check_endpoints_inheritance (line 304) | def check_endpoints_inheritance(): function _exception_handler (line 316) | def _exception_handler(field: str, error: str | Exception) -> PantherError: function _deprecated_warning (line 320) | def _deprecated_warning(field: str, message: str): FILE: panther/_utils.py function import_class (line 26) | def import_class(dotted_path: str, /) -> type[Any]: function read_multipart_form_data (line 51) | def read_multipart_form_data(boundary: str, body: bytes) -> dict: function is_function_async (line 95) | def is_function_async(func: Callable) -> bool: function traceback_message (line 103) | def traceback_message(exception: Exception) -> str: function reformat_code (line 108) | def reformat_code(base_dir): function check_function_type_endpoint (line 116) | def check_function_type_endpoint(endpoint: types.FunctionType): function check_class_type_endpoint (line 124) | def check_class_type_endpoint(endpoint: Callable): function async_next (line 135) | def async_next(iterator: Iterator): function to_async_generator (line 148) | async def to_async_generator(generator: Generator) -> AsyncGenerator: function validate_api_auth (line 156) | def validate_api_auth(auth): function validate_api_permissions (line 197) | def validate_api_permissions(permissions): function check_api_deprecations (line 238) | def check_api_deprecations(cache, **kwargs): function detect_mime_type (line 337) | def detect_mime_type(file_path: str | Path) -> str: FILE: panther/app.py class API (line 40) | class API: method __init__ (line 58) | def __init__( method __call__ (line 88) | def __call__(self, func): method handle_endpoint (line 116) | async def handle_endpoint(self, request: Request) -> Response: class GenericAPI (line 174) | class GenericAPI: method __init_subclass__ (line 190) | def __init_subclass__(cls, **kwargs): method get (line 205) | async def get(self, *args, **kwargs): method post (line 208) | async def post(self, *args, **kwargs): method put (line 211) | async def put(self, *args, **kwargs): method patch (line 214) | async def patch(self, *args, **kwargs): method delete (line 217) | async def delete(self, *args, **kwargs): method call_method (line 220) | async def call_method(self, request: Request): FILE: panther/authentications.py class BaseAuthentication (line 28) | class BaseAuthentication: method __call__ (line 30) | async def __call__(self, request: Request | Websocket): method exception (line 36) | def exception(cls, message: str | Exception, /) -> type[Authentication... class JWTAuthentication (line 41) | class JWTAuthentication(BaseAuthentication): method __call__ (line 53) | async def __call__(self, request: Request | Websocket) -> Model | None: method get_authorization_header (line 70) | def get_authorization_header(cls, request: Request | Websocket) -> lis... method get_token (line 77) | def get_token(cls, auth_header): method decode_jwt (line 96) | async def decode_jwt(cls, token: str) -> dict: method get_user (line 108) | async def get_user(cls, payload: dict) -> Model: method encode_jwt (line 122) | def encode_jwt(cls, user_id: str, token_type: Literal['access', 'refre... method login (line 143) | async def login(cls, user) -> dict: method logout (line 151) | async def logout(cls, user) -> None: method refresh (line 157) | async def refresh(cls, user): method revoke_token_in_cache (line 174) | async def revoke_token_in_cache(cls, token: str, exp: int) -> None: method is_token_revoked (line 184) | async def is_token_revoked(cls, token: str) -> bool: class QueryParamJWTAuthentication (line 190) | class QueryParamJWTAuthentication(JWTAuthentication): method get_authorization_header (line 198) | def get_authorization_header(cls, request: Request | Websocket) -> str... method get_token (line 204) | def get_token(cls, auth_header) -> str: class CookieJWTAuthentication (line 208) | class CookieJWTAuthentication(JWTAuthentication): method __call__ (line 215) | async def __call__(self, request: Request | Websocket) -> Model: method get_authorization_header (line 223) | def get_authorization_header(cls, request: Request | Websocket) -> str... method get_token (line 229) | def get_token(cls, auth_header) -> str: FILE: panther/background_tasks.py function register_application_event_loop (line 38) | def register_application_event_loop(loop: asyncio.AbstractEventLoop | No... function get_application_event_loop (line 43) | def get_application_event_loop() -> asyncio.AbstractEventLoop | None: class WeekDay (line 55) | class WeekDay(Enum): class BackgroundTask (line 65) | class BackgroundTask: method __init__ (line 73) | def __init__(self, func: 'Callable', *args: Any, **kwargs: Any): method interval (line 84) | def interval(self, interval: int, /) -> Self: method every_seconds (line 89) | def every_seconds(self, seconds: int = 1, /) -> Self: method every_minutes (line 95) | def every_minutes(self, minutes: int = 1, /) -> Self: method every_hours (line 101) | def every_hours(self, hours: int = 1, /) -> Self: method every_days (line 107) | def every_days(self, days: int = 1, /) -> Self: method every_weeks (line 113) | def every_weeks(self, weeks: int = 1, /) -> Self: method on (line 119) | def on(self, day_of_week: WeekDay, /) -> Self: method at (line 126) | def at(self, _time: datetime.time, /) -> Self: method _should_wait (line 138) | def _should_wait(self) -> bool: method __call__ (line 165) | def __call__(self) -> bool: method submit (line 195) | def submit(self) -> Self: class BackgroundTasks (line 201) | class BackgroundTasks(Singleton): method __init__ (line 204) | def __init__(self): method add_task (line 208) | def add_task(self, task: BackgroundTask): method initialize (line 219) | def initialize(self): method _run_task (line 225) | def _run_task(self, task: BackgroundTask): method _run_tasks (line 232) | def _run_tasks(self): method _is_instance_of_task (line 241) | def _is_instance_of_task(cls, task: Any, /) -> bool: FILE: panther/base_request.py class Headers (line 11) | class Headers: method __init__ (line 33) | def __init__(self, headers: list): method __getattr__ (line 37) | def __getattr__(self, item: str): method __getitem__ (line 42) | def __getitem__(self, item: str): method __str__ (line 47) | def __str__(self): method __contains__ (line 51) | def __contains__(self, item): method __dict__ (line 57) | def __dict__(self): method get_cookies (line 60) | def get_cookies(self) -> dict: class Address (line 78) | class Address: method __init__ (line 79) | def __init__(self, ip, port): method __str__ (line 83) | def __str__(self): class BaseRequest (line 87) | class BaseRequest: method __init__ (line 88) | def __init__(self, scope: dict, receive: Callable, send: Callable): method headers (line 98) | def headers(self) -> Headers: method query_params (line 104) | def query_params(self) -> dict: method path (line 110) | def path(self) -> str: method server (line 114) | def server(self) -> Address: method client (line 118) | def client(self) -> Address: method http_version (line 122) | def http_version(self) -> str: method scheme (line 126) | def scheme(self) -> str: method collect_path_variables (line 129) | def collect_path_variables(self, found_path: str): method clean_parameters (line 136) | def clean_parameters(self, function_annotations: dict) -> dict: FILE: panther/base_websocket.py class PubSub (line 25) | class PubSub: method __init__ (line 26) | def __init__(self, manager: SyncManager): method subscribe (line 30) | def subscribe(self): method publish (line 35) | def publish(self, msg): class WebsocketConnections (line 40) | class WebsocketConnections(Singleton): method __init__ (line 41) | def __init__(self, pubsub_connection: Redis | SyncManager): method __call__ (line 49) | async def __call__(self): method _handle_received_message (line 85) | async def _handle_received_message(self, received_message): method publish (line 105) | async def publish(self, connection_id: str, action: Literal['send', 'c... method listen (line 113) | async def listen(self, connection: Websocket): method listen_connection (line 146) | async def listen_connection(self, connection: Websocket): method connection_accepted (line 162) | async def connection_accepted(self, connection: Websocket) -> None: method connection_closed (line 170) | async def connection_closed(self, connection: Websocket, from_server: ... method start (line 180) | async def start(self): method handle_authentication (line 196) | async def handle_authentication(cls, connection: Websocket): method handle_permissions (line 207) | async def handle_permissions(cls, connection: Websocket): class Websocket (line 221) | class Websocket(BaseRequest): method __init_subclass__ (line 228) | def __init_subclass__(cls, **kwargs): method connect (line 232) | async def connect(self, **kwargs) -> None: method receive (line 235) | async def receive(self, data: str | bytes) -> None: method accept (line 238) | async def accept(self, subprotocol: str | None = None, headers: dict |... method send (line 242) | async def send(self, data: any = None) -> None: method send_text (line 251) | async def send_text(self, text_data: str) -> None: method send_bytes (line 254) | async def send_bytes(self, bytes_data: bytes) -> None: method close (line 257) | async def close(self, code: int = status.WS_1000_NORMAL_CLOSURE, reaso... method connection_id (line 262) | def connection_id(self) -> str: method is_connected (line 268) | def is_connected(self) -> bool: method is_rejected (line 272) | def is_rejected(self) -> bool: method change_state (line 275) | def change_state(self, state: Literal['Accepted', 'Closed', 'Rejected'... FILE: panther/caching.py function api_cache_key (line 18) | def api_cache_key(request: Request, duration: timedelta | None = None) -... function get_response_from_cache (line 30) | async def get_response_from_cache(*, request: Request, duration: timedel... function set_response_in_cache (line 48) | async def set_response_in_cache(*, request: Request, response: Response,... FILE: panther/cli/create_project_command.py class CreateProject (line 27) | class CreateProject: method __init__ (line 33) | def __init__(self): method create (line 84) | def create(self, args: list) -> None: method _create_file (line 124) | def _create_file(self, *, path: str, data: str): method collect_creation_data (line 155) | def collect_creation_data(self): method ask (line 178) | def ask( method progress (line 197) | def progress(self, step: int, /, extra_rows: int = 0): method _to_boolean (line 208) | def _to_boolean(cls, _input: str) -> bool: method _is_boolean (line 212) | def _is_boolean(cls, _input: str) -> bool: method _to_str (line 216) | def _to_str(cls, _input: bool) -> str: method _check_all_directories (line 220) | def _check_all_directories(cls, base_directory: str, return_error: boo... FILE: panther/cli/create_user_command.py function get_password (line 15) | def get_password(prompt: str) -> str: function get_username (line 72) | def get_username(prompt: str, user_model: BaseUser, username_field: str): function load_application_file (line 81) | def load_application_file(file_location: str): function create_user (line 92) | def create_user(args) -> None: FILE: panther/cli/main.py function shell (line 14) | def shell(args) -> None: function version (line 33) | def version() -> None: function start (line 37) | def start() -> None: FILE: panther/cli/monitor_command.py class Monitoring (line 26) | class Monitoring: method __init__ (line 27) | def __init__(self): method monitor (line 31) | def monitor(self) -> None: method initialize (line 62) | def initialize(self) -> str: method generate_table (line 84) | def generate_table(self) -> Panel: method update_rows (line 106) | def update_rows(self, *args, **kwargs): method _clean_response_time (line 113) | def _clean_response_time(cls, response_time: str) -> str: FILE: panther/cli/run_command.py function run (line 9) | def run(args: list[str]) -> None: FILE: panther/cli/utils.py function import_error (line 82) | def import_error(message: str | Exception, package: str | None = None) -... function cli_error (line 89) | def cli_error(message: str | Exception) -> None: function cli_warning (line 94) | def cli_warning(message: str | Exception, hint: str = None) -> None: function cli_info (line 100) | def cli_info(message: str) -> None: function print_help_message (line 105) | def print_help_message(): function print_info (line 109) | def print_info(config: Config): FILE: panther/configs.py class JWTConfig (line 11) | class JWTConfig: method __init__ (line 12) | def __init__( method __eq__ (line 31) | def __eq__(self, other): class QueryObservable (line 40) | class QueryObservable: method observe (line 44) | def observe(cls, observer): method update (line 48) | def update(cls): class Config (line 54) | class Config: method refresh (line 79) | def refresh(self): method vars (line 97) | def vars(self) -> dict[str, typing.Any]: method __setattr__ (line 101) | def __setattr__(self, key, value): method __getattr__ (line 106) | def __getattr__(self, item: str): method __setitem__ (line 112) | def __setitem__(self, key, value): method __getitem__ (line 115) | def __getitem__(self, item): FILE: panther/db/connections.py class BaseDatabaseConnection (line 24) | class BaseDatabaseConnection: method __init__ (line 25) | def __init__(self, *args, **kwargs): method init (line 30) | def init(self, *args, **kwargs): method session (line 35) | def session(self): class MongoDBConnection (line 39) | class MongoDBConnection(BaseDatabaseConnection): method init (line 40) | def init( method session (line 73) | def session(self): method client (line 77) | def client(self): class PantherDBConnection (line 81) | class PantherDBConnection(BaseDatabaseConnection): method init (line 82) | def init(self, path: str | None = None, encryption: bool = False): method session (line 94) | def session(self): method client (line 98) | def client(self): class DatabaseConnection (line 102) | class DatabaseConnection(Singleton): method session (line 104) | def session(self): method is_defined (line 108) | def is_defined(self): method client (line 112) | def client(self): class RedisConnection (line 116) | class RedisConnection(Singleton, _Redis): method __init__ (line 119) | def __init__( method sync_ping (line 137) | def sync_ping(self): method execute_command (line 142) | async def execute_command(self, *args, **options): method create_connection_for_websocket (line 148) | def create_connection_for_websocket(self) -> _Redis: FILE: panther/db/cursor.py class Cursor (line 23) | class Cursor(_Cursor): method __init__ (line 26) | def __init__(self, collection, *args, cls=None, **kwargs): method __aiter__ (line 36) | def __aiter__(self) -> Self: method __iter__ (line 39) | def __iter__(self) -> Self: method next (line 42) | async def next(self) -> Self: method __anext__ (line 45) | async def __anext__(self) -> Self: method __next__ (line 51) | def __next__(self) -> Self: method __getitem__ (line 57) | def __getitem__(self, index: int | slice) -> Cursor[Self] | Self: FILE: panther/db/models.py function validate_object_id (line 26) | def validate_object_id(value, handler): class Model (line 43) | class Model(PydanticBaseModel, Query): method __init_subclass__ (line 44) | def __init_subclass__(cls, **kwargs): method _id (line 52) | def _id(self): class BaseUser (line 63) | class BaseUser(Model): method insert_one (line 72) | def insert_one(cls, _document: dict | None = None, /, **kwargs) -> Self: method login (line 76) | async def login(self) -> dict: method refresh_tokens (line 81) | async def refresh_tokens(self) -> dict: method logout (line 85) | async def logout(self) -> dict: method set_password (line 88) | async def set_password(self, password: str): method check_password (line 101) | def check_password(self, password: str) -> bool: FILE: panther/db/queries/base_queries.py class BaseQuery (line 31) | class BaseQuery: method _merge (line 33) | def _merge(cls, *args, is_mongo: bool = False) -> dict: method _clean_error_message (line 38) | def _clean_error_message(cls, validation_error: ValidationError, is_up... method _validate_data (line 47) | def _validate_data(cls, *, data: dict, is_updating: bool = False): method _get_annotation_type (line 56) | def _get_annotation_type(cls, annotation: Any) -> type | None: method _create_list (line 86) | async def _create_list(cls, field_type: type, value: Any) -> Any: method _create_field (line 119) | async def _create_field(cls, model: type, field_name: str, value: Any)... method _create_model_instance (line 181) | async def _create_model_instance(cls, document: dict, is_updating: boo... method _clean_value (line 197) | async def _clean_value(cls, value: Any) -> dict[str, Any] | list[Any]: method _extract_type (line 223) | async def _extract_type(cls, field_name: str) -> Any: method _process_document (line 240) | async def _process_document(cls, document): method find_one (line 264) | async def find_one(cls, *args, **kwargs) -> Self | None: method find (line 269) | async def find(cls, *args, **kwargs) -> list[Self] | Cursor: method first (line 274) | async def first(cls, *args, **kwargs) -> Self | None: method last (line 279) | async def last(cls, *args, **kwargs): method aggregate (line 284) | async def aggregate(cls, *args, **kwargs) -> Iterator[dict]: method count (line 290) | async def count(cls, *args, **kwargs) -> int: method insert_one (line 296) | async def insert_one(cls, *args, **kwargs) -> Self: method insert_many (line 301) | async def insert_many(cls, *args, **kwargs) -> list[Self]: method delete (line 306) | async def delete(self) -> None: method delete_one (line 311) | async def delete_one(cls, *args, **kwargs) -> bool: method delete_many (line 316) | async def delete_many(cls, *args, **kwargs) -> int: method update (line 321) | async def update(self, *args, **kwargs) -> None: method update_one (line 326) | async def update_one(cls, *args, **kwargs) -> bool: method update_many (line 331) | async def update_many(cls, *args, **kwargs) -> int: FILE: panther/db/queries/mongodb_queries.py class BaseMongoDBQuery (line 33) | class BaseMongoDBQuery(BaseQuery): method _merge (line 35) | def _merge(cls, *args, is_mongo: bool = True) -> dict: method find_one (line 45) | async def find_one(cls, _filter: dict | None = None, /, **kwargs) -> S... method find (line 51) | async def find(cls, _filter: dict | None = None, /, **kwargs) -> Cursor: method first (line 55) | async def first(cls, _filter: dict | None = None, /, **kwargs) -> Self... method last (line 62) | async def last(cls, _filter: dict | None = None, /, **kwargs) -> Self ... method aggregate (line 69) | async def aggregate(cls, pipeline: Sequence[dict]) -> Iterable[dict]: method count (line 74) | async def count(cls, _filter: dict | None = None, /, **kwargs) -> int: method insert_one (line 79) | async def insert_one(cls, document: dict) -> Self: method insert_many (line 84) | async def insert_many(cls, documents: Iterable[dict]) -> list[Self]: method delete_one (line 99) | async def delete_one(cls, _filter: dict | None = None, /, **kwargs) ->... method delete_many (line 104) | async def delete_many(cls, _filter: dict | None = None, /, **kwargs) -... method update_one (line 110) | async def update_one(cls, _filter: dict, _update: dict | None = None, ... method update_many (line 144) | async def update_many(cls, _filter: dict, _update: dict | None = None,... FILE: panther/db/queries/pantherdb_queries.py class BasePantherDBQuery (line 22) | class BasePantherDBQuery(BaseQuery): method _merge (line 24) | def _merge(cls, *args, is_mongo: bool = False) -> dict: method find_one (line 29) | async def find_one(cls, _filter: dict | None = None, /, **kwargs) -> S... method find (line 35) | async def find(cls, _filter: dict | None = None, /, **kwargs) -> Cursor: method first (line 42) | async def first(cls, _filter: dict | None = None, /, **kwargs) -> Self... method last (line 48) | async def last(cls, _filter: dict | None = None, /, **kwargs) -> Self ... method aggregate (line 54) | async def aggregate(cls, *args, **kwargs): method count (line 60) | async def count(cls, _filter: dict | None = None, /, **kwargs) -> int: method insert_one (line 65) | async def insert_one(cls, document: dict) -> Self: method insert_many (line 70) | async def insert_many(cls, documents: Iterable[dict]) -> list[Self]: method delete_one (line 75) | async def delete_one(cls, _filter: dict | None = None, /, **kwargs) ->... method delete_many (line 79) | async def delete_many(cls, _filter: dict | None = None, /, **kwargs) -... method update_one (line 84) | async def update_one(cls, _filter: dict, _update: dict | None = None, ... method update_many (line 107) | async def update_many(cls, _filter: dict, _update: dict | None = None,... FILE: panther/db/queries/queries.py function _is_duplicate_key_error (line 27) | def _is_duplicate_key_error(error: Exception) -> bool: class Query (line 35) | class Query(BaseQuery): method __init_subclass__ (line 36) | def __init_subclass__(cls, **kwargs): method _reload_bases (line 40) | def _reload_bases(cls, parent): method find_one (line 56) | async def find_one(cls, _filter: dict | None = None, /, **kwargs) -> S... method find (line 76) | async def find(cls, _filter: dict | None = None, /, **kwargs) -> Panth... method first (line 96) | async def first(cls, _filter: dict | None = None, /, **kwargs) -> Self... method last (line 116) | async def last(cls, _filter: dict | None = None, /, **kwargs) -> Self ... method aggregate (line 136) | async def aggregate(cls, pipeline: Sequence[dict]) -> Iterable[dict]: method count (line 162) | async def count(cls, _filter: dict | None = None, /, **kwargs) -> int: method insert_one (line 183) | async def insert_one(cls, _document: dict | None = None, /, **kwargs) ... method insert_many (line 225) | async def insert_many(cls, documents: Iterable[dict]) -> list[Self]: method delete (line 246) | async def delete(self) -> None: method delete_one (line 264) | async def delete_one(cls, _filter: dict | None = None, /, **kwargs) ->... method delete_many (line 284) | async def delete_many(cls, _filter: dict | None = None, /, **kwargs) -... method update (line 304) | async def update(self, _update: dict | None = None, /, **kwargs) -> None: method update_one (line 327) | async def update_one(cls, _filter: dict, _update: dict | None = None, ... method update_many (line 347) | async def update_many(cls, _filter: dict, _update: dict | None = None,... method all (line 366) | async def all(cls) -> list[Self] | Cursor: method find_one_or_insert (line 380) | async def find_one_or_insert(cls, _filter: dict | None = None, /, **kw... method find_one_or_raise (line 410) | async def find_one_or_raise(cls, _filter: dict | None = None, /, **kwa... method exists (line 429) | async def exists(cls, _filter: dict | None = None, /, **kwargs) -> bool: method save (line 446) | async def save(self) -> None: method reload (line 472) | async def reload(self): FILE: panther/db/utils.py function log_query (line 15) | def log_query(func): function check_connection (line 29) | def check_connection(func): function prepare_id_for_query (line 42) | def prepare_id_for_query(*args, is_mongo: bool = False): function _convert_to_object_id (line 54) | def _convert_to_object_id(_id): FILE: panther/events.py class Event (line 11) | class Event(Singleton): method startup (line 16) | def startup(cls, func): method shutdown (line 25) | def shutdown(cls, func): method run_startups (line 34) | async def run_startups(cls): method run_shutdowns (line 45) | def run_shutdowns(cls): method clear (line 63) | def clear(cls): FILE: panther/exceptions.py class PantherError (line 4) | class PantherError(Exception): class DatabaseError (line 8) | class DatabaseError(Exception): class BaseError (line 12) | class BaseError(Exception): method __init__ (line 16) | def __init__(self, detail: str | dict | list = None, status_code: int ... class APIError (line 22) | class APIError(BaseError): class WebsocketError (line 27) | class WebsocketError(BaseError): class RedirectAPIError (line 32) | class RedirectAPIError(APIError): method __init__ (line 33) | def __init__(self, url: str, status_code: int = status.HTTP_302_FOUND): class BadRequestAPIError (line 37) | class BadRequestAPIError(APIError): class AuthenticationAPIError (line 42) | class AuthenticationAPIError(APIError): class AuthorizationAPIError (line 47) | class AuthorizationAPIError(APIError): class NotFoundAPIError (line 52) | class NotFoundAPIError(APIError): class MethodNotAllowedAPIError (line 57) | class MethodNotAllowedAPIError(APIError): class UnprocessableEntityError (line 62) | class UnprocessableEntityError(APIError): class UpgradeRequiredError (line 67) | class UpgradeRequiredError(APIError): class ThrottlingAPIError (line 72) | class ThrottlingAPIError(APIError): class InvalidPathVariableAPIError (line 77) | class InvalidPathVariableAPIError(APIError): method __init__ (line 78) | def __init__(self, value: str, variable_type: type): FILE: panther/file_handler.py class File (line 12) | class File(BaseModel): method __init__ (line 19) | def __init__(self, **data): method __enter__ (line 27) | def __enter__(self): method __exit__ (line 33) | def __exit__(self, exc_type, exc_value, traceback): method read (line 38) | def read(self, size: int = -1) -> bytes: method seek (line 42) | def seek(self, offset: int, whence: int = 0): method tell (line 46) | def tell(self) -> int: method write (line 50) | def write(self, data: bytes): method save (line 58) | def save(self, path: str | None = None, overwrite: bool = False) -> str: method size (line 100) | def size(self) -> int: method _ensure_buffer (line 107) | def _ensure_buffer(self): method __repr__ (line 116) | def __repr__(self) -> str: class Image (line 122) | class Image(File): method validate_content_type (line 125) | def validate_content_type(cls, content_type: str) -> str: FILE: panther/generics.py class RetrieveAPI (line 28) | class RetrieveAPI(GenericAPI): method get_instance (line 30) | async def get_instance(self, request: Request, **kwargs) -> Model: method get (line 37) | async def get(self, request: Request, **kwargs): class ListAPI (line 42) | class ListAPI(GenericAPI): method get_query (line 49) | async def get_query(self, request: Request, **kwargs): method get (line 56) | async def get(self, request: Request, **kwargs): method prepare_cursor (line 60) | async def prepare_cursor(self, request: Request, **kwargs) -> tuple[Cu... method process_filters (line 81) | def process_filters(self, query_params: dict, cursor: Cursor | Panther... method process_search (line 90) | def process_search(self, query_params: dict) -> dict: method process_sort (line 100) | def process_sort(self, query_params: dict) -> list: method process_pagination (line 111) | def process_pagination(self, query_params: dict, cursor: Cursor | Pant... class CreateAPI (line 116) | class CreateAPI(GenericAPI): method post (line 117) | async def post(self, request: Request, **kwargs): class UpdateAPI (line 122) | class UpdateAPI(GenericAPI): method get_instance (line 124) | async def get_instance(self, request: Request, **kwargs) -> Model: method put (line 131) | async def put(self, request: Request, **kwargs): method patch (line 136) | async def patch(self, request: Request, **kwargs): class DeleteAPI (line 142) | class DeleteAPI(GenericAPI): method get_instance (line 144) | async def get_instance(self, request: Request, **kwargs) -> Model: method pre_delete (line 151) | async def pre_delete(self, instance, request: Request, **kwargs): method post_delete (line 155) | async def post_delete(self, instance, request: Request, **kwargs): method delete (line 159) | async def delete(self, request: Request, **kwargs): FILE: panther/logging.py class FileHandler (line 9) | class FileHandler(logging.FileHandler): method __init__ (line 10) | def __init__(self, filename, mode='a', encoding=None, delay=False, err... FILE: panther/main.py class Panther (line 35) | class Panther: method __init__ (line 36) | def __init__(self, name: str, configs: str | None = None, urls: dict |... method load_configs (line 64) | def load_configs(self) -> None: method __call__ (line 86) | async def __call__(self, scope: dict, receive: Callable, send: Callabl... method handle_ws_endpoint (line 104) | async def handle_ws_endpoint(connection: Websocket): method handle_ws (line 127) | async def handle_ws(cls, scope: dict, receive: Callable, send: Callabl... method handle_http_endpoint (line 147) | async def handle_http_endpoint(request: Request) -> Response: method handle_http (line 165) | async def handle_http(cls, scope: dict, receive: Callable, send: Calla... method __del__ (line 200) | def __del__(self): FILE: panther/middlewares/base.py class HTTPMiddleware (line 9) | class HTTPMiddleware: method __init__ (line 12) | def __init__(self, dispatch: typing.Callable): method __call__ (line 15) | async def __call__(self, request: Request) -> Response: class WebsocketMiddleware (line 19) | class WebsocketMiddleware: method __init__ (line 22) | def __init__(self, dispatch: typing.Callable): method __call__ (line 25) | async def __call__(self, connection: Websocket) -> GenericWebsocket: FILE: panther/middlewares/cors.py class CORSMiddleware (line 7) | class CORSMiddleware(HTTPMiddleware): method __call__ (line 36) | async def __call__(self, request: Request) -> Response: FILE: panther/middlewares/monitoring.py class MonitoringMiddleware (line 11) | class MonitoringMiddleware(HTTPMiddleware): method __call__ (line 17) | async def __call__(self, request: Request): class WebsocketMonitoringMiddleware (line 28) | class WebsocketMonitoringMiddleware(WebsocketMiddleware): method __call__ (line 36) | async def __call__(self, connection: Websocket): FILE: panther/openapi/schemas.py class OutputSchema (line 6) | class OutputSchema: method __init__ (line 21) | def __init__( FILE: panther/openapi/utils.py class EndpointParser (line 23) | class EndpointParser: method __init__ (line 31) | def __init__(self, endpoint: Any, http_method: str): method _parse_ast (line 42) | def _parse_ast(self) -> None: method _parse_class_methods (line 65) | def _parse_class_methods(self, class_body: list[ast.stmt]) -> None: method _parse_function_body (line 81) | def _parse_function_body(self, function_body: list[ast.stmt]) -> None: method _extract_dict_data (line 98) | def _extract_dict_data(self, keys: list[ast.expr], values: list[ast.ex... method _extract_variable_data (line 110) | def _extract_variable_data(self, function_body: list[ast.stmt], variab... method _parse_call (line 142) | def _parse_call(self, function_body: list[ast.stmt], args: list[ast.ex... method _parse_response_call (line 165) | def _parse_response_call( method _parse_status_code_argument (line 183) | def _parse_status_code_argument(self, function_body: list[ast.stmt], v... method _parse_data_argument (line 205) | def _parse_data_argument(self, function_body: list[ast.stmt], value: a... method _extract_status_code_from_value (line 224) | def _extract_status_code_from_value(self, value: ast.expr) -> None: method _find_variable_assignments (line 235) | def _find_variable_assignments(self, function_body: list[ast.stmt], va... class OpenAPIGenerator (line 247) | class OpenAPIGenerator: method get_model_name (line 259) | def get_model_name(cls, model: type[BaseModel]) -> str: method extract_path_parameters (line 266) | def extract_path_parameters(cls, endpoint: Any, endpoint_name: str, ht... method _get_function_signature (line 299) | def _get_function_signature(cls, endpoint: Any, http_method: str): method _create_parameter_schema (line 308) | def _create_parameter_schema(cls, param_name: str, param_info: inspect... method parse_docstring (line 323) | def parse_docstring(cls, docstring: str) -> tuple[str, str]: method extract_field_constraints (line 335) | def extract_field_constraints(cls, field: Any) -> dict[str, Any]: method enrich_schema_with_constraints (line 348) | def enrich_schema_with_constraints(cls, schema: dict[str, Any], model:... method generate_operation_content (line 361) | def generate_operation_content(cls, endpoint: Any, http_method: str, s... method _extract_operation_tags (line 408) | def _extract_operation_tags(cls, endpoint: Any, response_parser: Endpo... method _extract_endpoint_metadata (line 415) | def _extract_endpoint_metadata(cls, endpoint: Any, description: str) -... method _build_response_schema (line 456) | def _build_response_schema( method _build_error_responses (line 490) | def _build_error_responses(cls, endpoint: Any) -> dict[int, dict[str, ... method _build_request_body (line 505) | def _build_request_body(cls, endpoint: Any, http_method: str, schemas:... method generate_openapi_spec (line 527) | def generate_openapi_spec(cls) -> dict[str, Any]: FILE: panther/openapi/views.py class ScalarOpenAPI (line 7) | class ScalarOpenAPI(GenericAPI): method get (line 10) | def get(self): class SwaggerOpenAPI (line 14) | class SwaggerOpenAPI(GenericAPI): method get (line 17) | def get(self): class RedocOpenAPI (line 21) | class RedocOpenAPI(GenericAPI): method get (line 24) | def get(self): class RapiDocOpenAPI (line 28) | class RapiDocOpenAPI(GenericAPI): method get (line 31) | def get(self): class SpotlightOpenAPI (line 35) | class SpotlightOpenAPI(GenericAPI): method get (line 38) | def get(self): FILE: panther/pagination.py class Pagination (line 6) | class Pagination: method __init__ (line 22) | def __init__(self, query_params: dict, cursor: Cursor | PantherDBCursor): method get_limit (line 27) | def get_limit(self, query_params: dict) -> int: method get_skip (line 30) | def get_skip(self, query_params: dict) -> int: method build_next_params (line 33) | def build_next_params(self): method build_previous_params (line 37) | def build_previous_params(self): method paginate (line 41) | def paginate(self): method template (line 44) | async def template(self, response: list): FILE: panther/panel/authentications.py class AdminCookieJWTAuthentication (line 6) | class AdminCookieJWTAuthentication(CookieJWTAuthentication): method __call__ (line 7) | async def __call__(self, request: Request): FILE: panther/panel/middlewares.py class RedirectToSlashMiddleware (line 6) | class RedirectToSlashMiddleware(HTTPMiddleware): method __call__ (line 7) | async def __call__(self, request: Request): FILE: panther/panel/permissions.py class IsAuthenticated (line 6) | class IsAuthenticated(BasePermission): method __call__ (line 7) | async def __call__(self, request: Request): FILE: panther/panel/templates/create.js function toggleObjectVisibility (line 2) | function toggleObjectVisibility(checkbox, contentId) { function createObjectInputs (line 13) | function createObjectInputs(objectSchema, container, prefix = "") { function toggleArrayVisibility (line 49) | function toggleArrayVisibility(checkbox, contentId) { function createSimpleArrayField (line 62) | function createSimpleArrayField(fieldName, container, fullFieldName, fie... function addSimpleArrayRow (line 112) | function addSimpleArrayRow(arrayName, containerId) { function reindexArrayItems (line 141) | function reindexArrayItems(containerId) { function createNestedObjectField (line 155) | function createNestedObjectField( function createObjectInputs (line 237) | function createObjectInputs(objectSchema, container, prefix = "") { function createBasicInput (line 276) | function createBasicInput(fieldName, field, container, fullFieldName) { function createArrayField (line 350) | function createArrayField(fieldName, itemType, container, fullFieldName) { function addArrayRow (line 377) | function addArrayRow(arrayName, itemType, containerId) { function reindexComplexArrayItems (line 406) | function reindexComplexArrayItems(containerId) { function openObjectModal (line 420) | function openObjectModal(fieldName, objectType) { function populateFormWithExistingData (line 463) | function populateFormWithExistingData(data) { function populateNestedData (line 505) | function populateNestedData(data, prefix = "") { function populateItemField (line 585) | function populateItemField(container, fieldPath, value) { function determineItemType (line 596) | function determineItemType(item) { function showToast (line 750) | function showToast(title, message, type) { function createToastContainer (line 769) | function createToastContainer() { function createLogContainer (line 826) | function createLogContainer() { function captureFormState (line 876) | function captureFormState() { function logMessage (line 947) | function logMessage(title, data, type = "info") { function escapeHtml (line 1009) | function escapeHtml(str) { function attachFormMonitors (line 1019) | function attachFormMonitors() { function initFormLogger (line 1208) | function initFormLogger() { FILE: panther/panel/templates/home.js function getCurrentTableIndex (line 1) | function getCurrentTableIndex() { function selectTable (line 7) | function selectTable(element) { function setActiveTableFromUrl (line 13) | function setActiveTableFromUrl() { FILE: panther/panel/templates/table.js function pythonToJSON (line 9) | function pythonToJSON(str) { function goToCreatePage (line 31) | function goToCreatePage() { function getDataType (line 38) | function getDataType(value) { function initializeRecords (line 45) | function initializeRecords() { function formatValue (line 65) | function formatValue(value, type) { function toggleDropdown (line 133) | function toggleDropdown(button) { function renderTable (line 162) | function renderTable() { function renderPaginationControls (line 247) | function renderPaginationControls(totalRows) { function changePage (line 269) | function changePage(direction) { function getCurrentTableIndex (line 281) | function getCurrentTableIndex() { function selectTable (line 287) | function selectTable(element, event) { function setActiveTableFromUrl (line 308) | function setActiveTableFromUrl() { FILE: panther/panel/utils.py function _ref_name (line 11) | def _ref_name(ref: str) -> str: function clean_model_schema (line 16) | def clean_model_schema(schema: dict) -> dict: function get_models (line 98) | def get_models(): function serialize_models (line 109) | def serialize_models(data: Any): FILE: panther/panel/views.py class LoginView (line 17) | class LoginView(GenericAPI): method get (line 20) | def get(self, request: Request): method post (line 23) | async def post(self, request: Request): class HomeView (line 52) | class HomeView(GenericAPI): method get (line 56) | def get(self): class TableView (line 60) | class TableView(GenericAPI): method get (line 65) | async def get(self, request: Request, index: int): class CreateView (line 82) | class CreateView(GenericAPI): method get (line 87) | async def get(self, request: Request, index: int): method post (line 97) | async def post(self, request: Request, index: int): class DetailView (line 106) | class DetailView(GenericAPI): method get (line 111) | async def get(self, index: int, document_id: str): method put (line 119) | async def put(self, request: Request, index: int, document_id: str): method delete (line 125) | async def delete(self, index: int, document_id: str): FILE: panther/permissions.py class BasePermission (line 7) | class BasePermission: method __call__ (line 9) | async def __call__(self, request: Request | Websocket) -> bool: class IsAuthenticated (line 13) | class IsAuthenticated(BasePermission): method __call__ (line 14) | async def __call__(self, request: Request) -> bool: class IsAuthenticatedOrReadonly (line 18) | class IsAuthenticatedOrReadonly(BasePermission): method __call__ (line 19) | async def __call__(self, request: Request) -> bool: FILE: panther/request.py class Request (line 17) | class Request(BaseRequest): method __init__ (line 18) | def __init__(self, scope: dict, receive: Callable, send: Callable): method method (line 24) | def method(self) -> Literal['GET', 'POST', 'PUT', 'PATCH', 'DELETE']: method data (line 28) | def data(self) -> dict | bytes: method read_body (line 44) | async def read_body(self) -> None: method validate_data (line 53) | def validate_data(self, model): FILE: panther/response.py class Cookie (line 41) | class Cookie: class Response (line 68) | class Response: method __init__ (line 80) | def __init__( method __str__ (line 120) | def __str__(self): method body (line 128) | def body(self) -> bytes: method bytes_headers (line 145) | def bytes_headers(self) -> list[tuple[bytes, bytes]]: method send (line 152) | async def send(self, send, receive): method serialize_output (line 156) | async def serialize_output(self, output_model: type[BaseModel]): class StreamingResponse (line 185) | class StreamingResponse(Response): method __init__ (line 202) | def __init__(self, *args, **kwargs): method listen_to_disconnection (line 206) | async def listen_to_disconnection(self, receive): method bytes_headers (line 212) | def bytes_headers(self) -> list[tuple[bytes, bytes]]: method body (line 219) | async def body(self) -> AsyncGenerator: method send (line 234) | async def send(self, send, receive): class HTMLResponse (line 247) | class HTMLResponse(Response): method body (line 260) | def body(self) -> bytes: class PlainTextResponse (line 266) | class PlainTextResponse(Response): method body (line 278) | def body(self) -> bytes: class FileResponse (line 284) | class FileResponse(Response): method __init__ (line 293) | def __init__(self, file_path: str, headers: dict | NoneType = None, st... class TemplateResponse (line 307) | class TemplateResponse(HTMLResponse): method __init__ (line 324) | def __init__( class RedirectResponse (line 363) | class RedirectResponse(Response): method __init__ (line 372) | def __init__( FILE: panther/routings.py function flatten_urls (line 12) | def flatten_urls(urls: dict) -> dict: function _flattening_urls (line 16) | def _flattening_urls(data: dict | Callable, url: str = ''): function _is_url_endpoint_valid (line 38) | def _is_url_endpoint_valid(url: str, endpoint: Callable): function finalize_urls (line 49) | def finalize_urls(urls: dict) -> dict: function check_urls_path_variables (line 70) | def check_urls_path_variables(urls: dict, path: str = '') -> None: function _merge (line 92) | def _merge(destination: MutableMapping, *sources) -> MutableMapping: function _simplify_urls (line 96) | def _simplify_urls(urls): function _deepmerge (line 112) | def _deepmerge(dst, src): function _is_recursive_merge (line 125) | def _is_recursive_merge(a, b): function find_endpoint (line 134) | def find_endpoint(path: str) -> tuple[Callable | None, str]: FILE: panther/serializer.py class MetaModelSerializer (line 14) | class MetaModelSerializer: method __new__ (line 17) | def __new__(cls, cls_name: str, bases: tuple[type[typing.Any], ...], n... method check_config (line 45) | def check_config(cls, cls_name: str, namespace: dict) -> None: method collect_fields (line 143) | def collect_fields(cls, config: typing.Callable, namespace: dict) -> d... method collect_model_config (line 200) | def collect_model_config(cls, config: typing.Callable, namespace: dict... method convert_str_to_model (line 212) | def convert_str_to_model(cls, model_cls): class ModelSerializer (line 221) | class ModelSerializer(metaclass=MetaModelSerializer): method to_response (line 253) | async def to_response(self, instance: Any, data: dict) -> dict: FILE: panther/status.py function is_informational (line 101) | def is_informational(status_code: int): function is_success (line 105) | def is_success(status_code: int): function is_redirect (line 109) | def is_redirect(status_code: int): function is_client_error (line 113) | def is_client_error(status_code: int): function is_server_error (line 117) | def is_server_error(status_code: int): FILE: panther/test.py class RequestClient (line 12) | class RequestClient: method __init__ (line 13) | def __init__(self, app: Callable): method send (line 17) | async def send(self, data: dict): method receive (line 23) | async def receive(self): method request (line 30) | async def request( class APIClient (line 82) | class APIClient: method __init__ (line 83) | def __init__(self, app: Callable): method _send_request (line 86) | async def _send_request( method options (line 103) | async def options( method get (line 117) | async def get( method post (line 131) | async def post( method put (line 148) | async def put( method patch (line 165) | async def patch( method delete (line 182) | async def delete( class WebsocketClient (line 197) | class WebsocketClient: method __init__ (line 198) | def __init__(self, app: Callable): method send (line 202) | async def send(self, data: dict): method receive (line 205) | async def receive(self): method connect (line 208) | def connect( FILE: panther/throttling.py class Throttle (line 15) | class Throttle: method time_window (line 20) | def time_window(self) -> datetime: method build_cache_key (line 23) | def build_cache_key(self, request: Request) -> str: method get_request_count (line 31) | async def get_request_count(self, request: Request) -> int: method increment_request_count (line 43) | async def increment_request_count(self, request: Request) -> None: method check_and_increment (line 57) | async def check_and_increment(self, request: Request) -> None: FILE: panther/utils.py class Singleton (line 20) | class Singleton(object): method __new__ (line 23) | def __new__(cls, *args, **kwargs): function load_env (line 29) | def load_env(env_file: str | Path, /) -> dict[str, str]: function generate_secret_key (line 52) | def generate_secret_key() -> str: function round_datetime (line 56) | def round_datetime(dt: datetime, delta: timedelta) -> datetime: function generate_hash_value_from_string (line 75) | def generate_hash_value_from_string(string_value: str, /) -> str: function scrypt (line 81) | def scrypt(password: str, salt: bytes, digest: bool = False) -> str | by... function timezone_now (line 102) | def timezone_now(): function run_coroutine (line 106) | def run_coroutine(coroutine): FILE: panther/websocket.py class GenericWebsocket (line 11) | class GenericWebsocket(Websocket): method __init__ (line 16) | def __init__(self, parent): method connect (line 19) | async def connect(self, **kwargs): method receive (line 24) | async def receive(self, data: str | bytes): method send (line 30) | async def send(self, data: any = None): method close (line 37) | async def close(self, code: int = status.WS_1000_NORMAL_CLOSURE, reaso... function send_message_to_websocket (line 44) | async def send_message_to_websocket(connection_id: str, data: any): function close_websocket_connection (line 48) | async def close_websocket_connection(connection_id: str, code: int = sta... FILE: profiler.py function hello_world (line 28) | async def hello_world(): function main (line 32) | def main(): FILE: setup.py function panther_version (line 7) | def panther_version() -> str: FILE: tests/__main__.py function run_test_file (line 13) | def run_test_file(path, flags: list) -> int: function main (line 18) | def main(): FILE: tests/sample_project/app/apis.py function first_api (line 5) | def first_api(): function second_api (line 10) | def second_api(): FILE: tests/sample_project/app/models.py class User (line 4) | class User(BaseUser): FILE: tests/sample_project/core/events.py function startup (line 5) | async def startup(): function shutdown (line 10) | async def shutdown(): FILE: tests/test_api_kwargs.py function request_api (line 11) | async def request_api(request: Request): function req_api (line 17) | async def req_api(req: Request): function integer_path_api (line 23) | async def integer_path_api(age: int): function boolean_path_api (line 29) | async def boolean_path_api(is_alive: bool): function string_path_api (line 35) | async def string_path_api(name: str): function unknown_path_api (line 41) | async def unknown_path_api(subject): function all_kwargs_api (line 47) | async def all_kwargs_api(request: Request, is_alive: bool, age: int, nam... function unordered_kwargs_api (line 57) | async def unordered_kwargs_api(subject, is_alive: bool, name: str, reque... class AllKwargsAPI (line 66) | class AllKwargsAPI(GenericAPI): method get (line 67) | async def get(self, request: Request, is_alive: bool, age: int, name: ... class TestKwargs (line 89) | class TestKwargs(IsolatedAsyncioTestCase): method setUpClass (line 91) | def setUpClass(cls) -> None: method tearDownClass (line 96) | def tearDownClass(cls): method test_request (line 99) | async def test_request(self): method test_req (line 103) | async def test_req(self): method test_integer (line 108) | async def test_integer(self): method test_invalid_integer (line 113) | async def test_invalid_integer(self): method test_boolean_true (line 118) | async def test_boolean_true(self): method test_boolean_false (line 131) | async def test_boolean_false(self): method test_invalid_boolean (line 148) | async def test_invalid_boolean(self): method test_string (line 153) | async def test_string(self): method test_unknown (line 158) | async def test_unknown(self): method test_all (line 163) | async def test_all(self): method test_unordered (line 168) | async def test_unordered(self): method test_class_based (line 173) | async def test_class_based(self): FILE: tests/test_authentication.py class CustomAuth (line 13) | class CustomAuth: method __call__ (line 14) | async def __call__(self, request: Request): function auth_required_api (line 19) | async def auth_required_api(request: Request): function refresh_token_api (line 24) | async def refresh_token_api(request: Request): function logout_api (line 29) | async def logout_api(request: Request): function custom_auth_api (line 34) | async def custom_auth_api(request: Request): function custom_auth (line 38) | async def custom_auth(req): function custom_auth_function_api (line 43) | async def custom_auth_function_api(request: Request): class User (line 56) | class User(BaseUser): class TestJWTAuthentication (line 73) | class TestJWTAuthentication(IsolatedAsyncioTestCase): method setUp (line 88) | def setUp(self) -> None: method tearDown (line 92) | def tearDown(self) -> None: method tearDownClass (line 97) | def tearDownClass(cls): method test_user_auth_required_without_auth_class (line 100) | async def test_user_auth_required_without_auth_class(self): method test_user_auth_required_without_token (line 109) | async def test_user_auth_required_without_token(self): method test_user_auth_required_with_bad_token_1 (line 116) | async def test_user_auth_required_with_bad_token_1(self): method test_user_auth_required_with_bad_token2 (line 125) | async def test_user_auth_required_with_bad_token2(self): method test_user_auth_required_with_bad_token3 (line 136) | async def test_user_auth_required_with_bad_token3(self): method test_user_auth_required_with_bad_token4 (line 148) | async def test_user_auth_required_with_bad_token4(self): method test_user_auth_required_with_invalid_token_signature (line 157) | async def test_user_auth_required_with_invalid_token_signature(self): method test_user_auth_required_with_token_without_user_id (line 166) | async def test_user_auth_required_with_token_without_user_id(self): method test_user_auth_required_with_token_user_not_found (line 175) | async def test_user_auth_required_with_token_user_not_found(self): method test_user_auth_required_with_token (line 184) | async def test_user_auth_required_with_token(self): method test_invalid_refresh_token (line 201) | async def test_invalid_refresh_token(self): method test_refresh_token (line 216) | async def test_refresh_token(self): method test_cookie_authentication_without_token (line 229) | async def test_cookie_authentication_without_token(self): method test_cookie_authentication_invalid_token (line 244) | async def test_cookie_authentication_invalid_token(self): method test_cookie_authentication (line 261) | async def test_cookie_authentication(self): method test_cookie_invalid_refresh_token (line 283) | async def test_cookie_invalid_refresh_token(self): method test_cookie_refresh_token (line 303) | async def test_cookie_refresh_token(self): method test_query_param_authentication_without_token (line 323) | async def test_query_param_authentication_without_token(self): method test_query_param_authentication (line 335) | async def test_query_param_authentication(self): method test_query_param_invalid_refresh_token (line 357) | async def test_query_param_invalid_refresh_token(self): method test_query_param_refresh_token (line 377) | async def test_query_param_refresh_token(self): method test_custom_auth_class (line 394) | async def test_custom_auth_class(self): method test_custom_auth_function (line 401) | async def test_custom_auth_function(self): method test_invalid_custom_auth_class (line 408) | async def test_invalid_custom_auth_class(self): method test_no_param_custom_auth_class (line 423) | async def test_no_param_custom_auth_class(self): method test_invalid_custom_auth_function (line 438) | async def test_invalid_custom_auth_function(self): method test_no_param_custom_auth_function (line 452) | async def test_no_param_custom_auth_function(self): method test_class_based_api_invalid_auth_type (line 466) | async def test_class_based_api_invalid_auth_type(self): method test_class_based_api_sync_function_auth (line 482) | async def test_class_based_api_sync_function_auth(self): method test_class_based_api_no_param_function_auth (line 495) | async def test_class_based_api_no_param_function_auth(self): method test_class_based_api_sync_class_auth (line 508) | async def test_class_based_api_sync_class_auth(self): method test_class_based_api_no_param_class_auth (line 522) | async def test_class_based_api_no_param_class_auth(self): method test_class_based_api_class_without_call (line 536) | async def test_class_based_api_class_without_call(self): method test_class_based_api_class_with_initiated_auth (line 549) | async def test_class_based_api_class_with_initiated_auth(self): method test_logout (line 565) | async def test_logout(self): FILE: tests/test_background_task_event_loop_isolation.py function _set_application_loop (line 9) | def _set_application_loop(loop: asyncio.AbstractEventLoop | None) -> None: function _create_loop_bound_future (line 16) | async def _create_loop_bound_future(loop: asyncio.AbstractEventLoop) -> ... class TestBackgroundTaskEventLoopIsolation (line 20) | class TestBackgroundTaskEventLoopIsolation(TestCase): method test_async_background_task_avoids_event_loop_mismatch (line 21) | def test_async_background_task_avoids_event_loop_mismatch(self): FILE: tests/test_background_tasks.py class TestBackgroundTasks (line 13) | class TestBackgroundTasks(TestCase): method setUp (line 14) | def setUp(self): method tearDown (line 18) | def tearDown(self): method tearDownClass (line 23) | def tearDownClass(cls): method test_background_tasks_singleton (line 26) | def test_background_tasks_singleton(self): method test_initialization (line 30) | def test_initialization(self): method test_add_single_task (line 38) | def test_add_single_task(self): method test_add_wrong_task (line 47) | def test_add_wrong_task(self): method test_add_task_with_false_background_task (line 64) | def test_add_task_with_false_background_task(self): method test_add_task_with_args (line 77) | def test_add_task_with_args(self): method test_add_task_with_kwargs (line 90) | def test_add_task_with_kwargs(self): method test_add_task_with_custom_interval (line 103) | def test_add_task_with_custom_interval(self): method test_add_task_with_custom_interval_default_timedelta (line 116) | def test_add_task_with_custom_interval_default_timedelta(self): method test_add_multiple_tasks (line 130) | def test_add_multiple_tasks(self): method test_concurrent_tasks (line 149) | def test_concurrent_tasks(self): method test_add_task_with_custom_every_3_seconds (line 167) | def test_add_task_with_custom_every_3_seconds(self): method test_submit_single_task (line 182) | def test_submit_single_task(self): method test_task_at_3second_later (line 195) | def test_task_at_3second_later(self): method test_task_on_specific_weekday (line 210) | def test_task_on_specific_weekday(self): FILE: tests/test_caching.py function without_cache_api (line 16) | async def without_cache_api(): function expired_cache_api (line 22) | async def expired_cache_api(): function expired_cache_html_response (line 28) | async def expired_cache_html_response(): class TestInMemoryCaching (line 40) | class TestInMemoryCaching(IsolatedAsyncioTestCase): method setUpClass (line 42) | def setUpClass(cls) -> None: method tearDownClass (line 47) | def tearDownClass(cls): method test_without_cache (line 50) | async def test_without_cache(self): method test_with_cache_5second_exp_time (line 59) | async def test_with_cache_5second_exp_time(self): method test_with_cache_content_type (line 85) | async def test_with_cache_content_type(self): FILE: tests/test_cli.py function interactive_cli_1_mock_responses (line 28) | def interactive_cli_1_mock_responses(index=None): function interactive_cli_2_mock_responses (line 38) | def interactive_cli_2_mock_responses(index=None): class TestCLI (line 48) | class TestCLI(IsolatedAsyncioTestCase): method setUpClass (line 50) | def setUpClass(cls) -> None: method tearDown (line 53) | def tearDown(self) -> None: method tearDownClass (line 58) | def tearDownClass(cls) -> None: method test_print_info (line 63) | async def test_print_info(self): method test_create_normal_template_with_interactive_cli (line 92) | async def test_create_normal_template_with_interactive_cli(self): method test_create_single_file_template_with_interactive_cli (line 107) | async def test_create_single_file_template_with_interactive_cli(self): method test_create_on_existence_directory (line 121) | async def test_create_on_existence_directory(self): method test_create_project (line 143) | async def test_create_project(self): method test_create_user_success (line 161) | async def test_create_user_success(self, mock_load_application_file, m... method test_create_user_duplicate (line 184) | async def test_create_user_duplicate(self, mock_load_application_file,... method test_create_user_keyboard_interrupt (line 204) | async def test_create_user_keyboard_interrupt( FILE: tests/test_config.py class User (line 22) | class User(Model): class Book (line 26) | class Book(Model): class Author (line 30) | class Author(Model): class DummyAPI (line 34) | class DummyAPI(GenericAPI): class DummyWS (line 38) | class DummyWS(GenericWebsocket): function my_startup1 (line 43) | def my_startup1(): function my_startup2 (line 48) | def my_startup2(): function my_shutdown1 (line 53) | def my_shutdown1(): function my_shutdown2 (line 58) | def my_shutdown2(): class TestConfig (line 62) | class TestConfig(TestCase): method test_loading_known_configs (line 63) | def test_loading_known_configs(self): method test_loading_unknown_configs (line 193) | def test_loading_unknown_configs(self): method test_loading_unknown_configs_invalid_name (line 206) | def test_loading_unknown_configs_invalid_name(self): method test_refresh_configs (line 219) | def test_refresh_configs(self): method test_loading_unknown_config_types (line 296) | def test_loading_unknown_config_types(self): FILE: tests/test_cors.py function simple_api (line 10) | async def simple_api(): class TestCORSMiddlewares (line 25) | class TestCORSMiddlewares(IsolatedAsyncioTestCase): method setUpClass (line 27) | def setUpClass(cls) -> None: method tearDownClass (line 32) | def tearDownClass(cls) -> None: method test_default_cors_headers (line 35) | async def test_default_cors_headers(self): method test_preflight_options (line 55) | async def test_preflight_options(self): method test_custom_origins (line 63) | async def test_custom_origins(self): method test_credentials (line 72) | async def test_credentials(self): method test_expose_headers (line 79) | async def test_expose_headers(self): FILE: tests/test_database.py class Book (line 19) | class Book(Model): class Viewer (line 25) | class Viewer(BaseModel): class Library (line 29) | class Library(Model): class _BaseDatabaseTestCase (line 35) | class _BaseDatabaseTestCase: method test_insert_one (line 37) | async def test_insert_one(self): method test_insert_many_with_insert_one (line 48) | async def test_insert_many_with_insert_one(self): method test_insert_many (line 52) | async def test_insert_many(self): method test_find_one_not_found (line 67) | async def test_find_one_not_found(self): method test_find_one_in_many_when_its_last (line 76) | async def test_find_one_in_many_when_its_last(self): method test_find_one_in_many_when_its_middle (line 96) | async def test_find_one_in_many_when_its_middle(self): method test_first (line 118) | async def test_first(self): method test_first_not_found (line 136) | async def test_first_not_found(self): method test_last (line 145) | async def test_last(self): method test_last_not_found (line 164) | async def test_last_not_found(self): method test_find (line 173) | async def test_find(self): method test_find_not_found (line 194) | async def test_find_not_found(self): method test_find_without_filter (line 208) | async def test_find_without_filter(self): method test_all (line 224) | async def test_all(self): method test_aggregation (line 241) | async def test_aggregation(self): method test_count_all (line 257) | async def test_count_all(self): method test_count_with_filter (line 267) | async def test_count_with_filter(self): method test_count_not_found (line 281) | async def test_count_not_found(self): method test_delete_one (line 292) | async def test_delete_one(self): method test_delete_self (line 309) | async def test_delete_self(self): method test_delete_one_not_found (line 322) | async def test_delete_one_not_found(self): method test_delete_many (line 336) | async def test_delete_many(self): method test_delete_many_not_found (line 354) | async def test_delete_many_not_found(self): method test_update_one (line 370) | async def test_update_one(self): method test_update_self (line 396) | async def test_update_self(self): method test_update_one_not_found (line 423) | async def test_update_one_not_found(self): method test_update_many (line 441) | async def test_update_many(self): method test_update_many_not_found (line 473) | async def test_update_many_not_found(self): method test_save_update (line 490) | async def test_save_update(self): method test_save_insert (line 514) | async def test_save_insert(self): method test_save_nested_models (line 526) | async def test_save_nested_models(self): method _insert_many (line 538) | async def _insert_many(cls) -> int: method _insert_many_with_specific_params (line 547) | async def _insert_many_with_specific_params( class TestPantherDB (line 561) | class TestPantherDB(_BaseDatabaseTestCase, IsolatedAsyncioTestCase): method setUpClass (line 565) | def setUpClass(cls) -> None: method tearDown (line 570) | def tearDown(self) -> None: method tearDownClass (line 574) | def tearDownClass(cls): method test_aggregation (line 578) | async def test_aggregation(self): class TestMongoDB (line 583) | class TestMongoDB(_BaseDatabaseTestCase, IsolatedAsyncioTestCase): method setUpClass (line 587) | def setUpClass(cls) -> None: method setUp (line 596) | def setUp(self): method tearDown (line 599) | def tearDown(self) -> None: method tearDownClass (line 603) | def tearDownClass(cls): FILE: tests/test_database_advance.py class Book (line 24) | class Book(Model): class BookDetail (line 28) | class BookDetail(BaseModel): class Viewer (line 34) | class Viewer(BaseModel): class Library (line 38) | class Library(Model): class TestBook (line 44) | class TestBook(Model): class Author (line 50) | class Author(Model): class InvalidModel (line 60) | class InvalidModel(Model): class Publisher (line 64) | class Publisher(Model): class _BaseDatabaseTestCase (line 70) | class _BaseDatabaseTestCase: method test_insert_one (line 71) | async def test_insert_one(self): method test_insert_one_with_model_obj (line 118) | async def test_insert_one_with_model_obj(self): method test_insert_one_with_model_dump (line 167) | async def test_insert_one_with_model_dump(self): method test_insert_many (line 215) | async def test_insert_many(self): method test_find_one (line 276) | async def test_find_one(self): method test_find (line 324) | async def test_find(self): method test_insert_one_invalid_model (line 375) | async def test_insert_one_invalid_model(self): method test_find_one_or_insert_existing (line 386) | async def test_find_one_or_insert_existing(self): method test_find_one_or_insert_new (line 396) | async def test_find_one_or_insert_new(self): method test_find_one_or_raise_found (line 405) | async def test_find_one_or_raise_found(self): method test_find_one_or_raise_not_found (line 414) | async def test_find_one_or_raise_not_found(self): method test_exists_true (line 422) | async def test_exists_true(self): method test_exists_false (line 430) | async def test_exists_false(self): method test_cursor_operations (line 436) | async def test_cursor_operations(self): method test_cursor_sort (line 454) | async def test_cursor_sort(self): method test_update_with_complex_data (line 481) | async def test_update_with_complex_data(self): method test_bulk_operations (line 512) | async def test_bulk_operations(self): method test_empty_collection_operations (line 532) | async def test_empty_collection_operations(self): method test_model_validation_errors (line 554) | async def test_model_validation_errors(self): method test_complex_nested_queries (line 563) | async def test_complex_nested_queries(self): method test_save_operations (line 593) | async def test_save_operations(self): method test_concurrent_operations (line 616) | async def test_concurrent_operations(self): method test_large_dataset_operations (line 633) | async def test_large_dataset_operations(self): method test_edge_cases (line 654) | async def test_edge_cases(self): method test_relationship_integrity (line 670) | async def test_relationship_integrity(self): method test_error_handling_edge_cases (line 691) | async def test_error_handling_edge_cases(self): method test_performance_optimizations (line 707) | async def test_performance_optimizations(self): method test_data_consistency (line 721) | async def test_data_consistency(self): method test_partial_update (line 742) | async def test_partial_update(self): method test_first (line 760) | async def test_first(self): method test_last (line 769) | async def test_last(self): method test_save_nested_models (line 778) | async def test_save_nested_models(self): class TestPantherDB (line 791) | class TestPantherDB(_BaseDatabaseTestCase, IsolatedAsyncioTestCase): method setUpClass (line 795) | def setUpClass(cls) -> None: method tearDown (line 802) | def tearDown(self) -> None: method tearDownClass (line 810) | def tearDownClass(cls): class TestMongoDB (line 816) | class TestMongoDB(_BaseDatabaseTestCase, IsolatedAsyncioTestCase): method setUpClass (line 820) | def setUpClass(cls) -> None: method setUp (line 829) | def setUp(self): method tearDown (line 832) | def tearDown(self) -> None: method tearDownClass (line 840) | def tearDownClass(cls) -> None: method test_insert_one_raw_document (line 843) | async def test_insert_one_raw_document(self): method test_aggregation_pipeline (line 908) | async def test_aggregation_pipeline(self): method test_mongodb_specific_features (line 932) | async def test_mongodb_specific_features(self): method test_mongodb_complex_queries (line 950) | async def test_mongodb_complex_queries(self): method test_mongodb_bulk_operations (line 972) | async def test_mongodb_bulk_operations(self): method test_mongodb_data_types (line 988) | async def test_mongodb_data_types(self): method test_mongodb_error_handling (line 1015) | async def test_mongodb_error_handling(self): FILE: tests/test_events.py class TestEvents (line 10) | class TestEvents(IsolatedAsyncioTestCase): method setUp (line 11) | def setUp(self): method tearDownClass (line 15) | def tearDownClass(cls): method test_async_startup (line 18) | async def test_async_startup(self): method test_sync_startup (line 35) | async def test_sync_startup(self): method test_startup (line 52) | async def test_startup(self): method test_sync_shutdown (line 75) | async def test_sync_shutdown(self): method shutdown_event (line 92) | async def shutdown_event(self): method test_async_shutdown (line 95) | def test_async_shutdown(self): method test_shutdown (line 109) | def test_shutdown(self): method test_singleton_pattern (line 129) | def test_singleton_pattern(self): FILE: tests/test_file.py class TestFile (line 10) | class TestFile(unittest.TestCase): method test_file_init_with_bytes (line 11) | def test_file_init_with_bytes(self): method test_file_init_with_path (line 19) | def test_file_init_with_path(self): method test_file_read_and_seek (line 28) | def test_file_read_and_seek(self): method test_file_write_in_memory (line 39) | def test_file_write_in_memory(self): method test_file_write_on_disk_raises (line 45) | def test_file_write_on_disk_raises(self): method test_file_save_overwrite (line 57) | def test_file_save_overwrite(self): method test_file_save_no_overwrite (line 69) | def test_file_save_no_overwrite(self): method test_file_save_idempotent (line 81) | def test_file_save_idempotent(self): method test_file_save_idempotent_with_different_paths (line 102) | def test_file_save_idempotent_with_different_paths(self): method test_file_save_directory_path (line 118) | def test_file_save_directory_path(self): method test_file_save_nested_directory_path (line 131) | def test_file_save_nested_directory_path(self): method test_file_save_directory_path_with_custom_filename (line 144) | def test_file_save_directory_path_with_custom_filename(self): method test_file_save_directory_creation (line 157) | def test_file_save_directory_creation(self): method test_file_save_directory_path_idempotent (line 170) | def test_file_save_directory_path_idempotent(self): method test_file_save_without_path_uses_filename (line 186) | def test_file_save_without_path_uses_filename(self): method test_file_repr_and_str (line 207) | def test_file_repr_and_str(self): method test_file_ensure_buffer_error (line 213) | def test_file_ensure_buffer_error(self): class TestDetectMimeType (line 225) | class TestDetectMimeType(unittest.TestCase): method test_extension_based_detection (line 226) | def test_extension_based_detection(self): method test_png_magic_number (line 232) | def test_png_magic_number(self): method test_pdf_magic_number (line 238) | def test_pdf_magic_number(self): method test_zip_magic_number (line 244) | def test_zip_magic_number(self): method test_jpeg_magic_number (line 253) | def test_jpeg_magic_number(self): method test_gif_magic_number (line 259) | def test_gif_magic_number(self): method test_bmp_magic_number (line 265) | def test_bmp_magic_number(self): method test_ico_magic_number (line 271) | def test_ico_magic_number(self): method test_tiff_magic_number (line 277) | def test_tiff_magic_number(self): method test_mp4_magic_number (line 283) | def test_mp4_magic_number(self): method test_fallback_octet_stream (line 289) | def test_fallback_octet_stream(self): FILE: tests/test_find_one_or_insert_race.py class RaceBook (line 13) | class RaceBook(Model): class TestFindOneOrInsertRaceMongoDB (line 18) | class TestFindOneOrInsertRaceMongoDB(IsolatedAsyncioTestCase): method setUpClass (line 22) | def setUpClass(cls) -> None: method setUp (line 31) | def setUp(self): method tearDown (line 34) | def tearDown(self) -> None: method tearDownClass (line 38) | def tearDownClass(cls) -> None: method test_find_one_or_insert_with_unique_index_returns_single_record_under_concurrency (line 41) | async def test_find_one_or_insert_with_unique_index_returns_single_rec... FILE: tests/test_generics.py class User (line 17) | class User(Model): class Person (line 21) | class Person(User): class RetrieveAPITest (line 25) | class RetrieveAPITest(RetrieveAPI): method get_instance (line 26) | async def get_instance(self, request: Request, **kwargs) -> Model: class ListAPITest (line 30) | class ListAPITest(ListAPI): method get_query (line 31) | async def get_query(self, request: Request, **kwargs): class FullListAPITest (line 35) | class FullListAPITest(ListAPI): method get_query (line 41) | async def get_query(self, request: Request, **kwargs): class UserSerializer (line 45) | class UserSerializer(ModelSerializer): class Config (line 46) | class Config: class UpdateAPITest (line 51) | class UpdateAPITest(UpdateAPI): method get_instance (line 54) | async def get_instance(self, request: Request, **kwargs) -> Model: class CreateAPITest (line 58) | class CreateAPITest(CreateAPI): class DeleteAPITest (line 62) | class DeleteAPITest(DeleteAPI): method get_instance (line 63) | async def get_instance(self, request: Request, **kwargs) -> Model: class _BaseGenericTestCases (line 77) | class _BaseGenericTestCases: method test_retrieve (line 78) | async def test_retrieve(self): method test_list (line 84) | async def test_list(self): method test_list_features (line 90) | async def test_list_features(self): method test_update (line 195) | async def test_update(self): method test_create (line 205) | async def test_create(self): method test_delete (line 214) | async def test_delete(self): class TestPantherDBGeneric (line 223) | class TestPantherDBGeneric(_BaseGenericTestCases, IsolatedAsyncioTestCase): method setUpClass (line 227) | def setUpClass(cls) -> None: method tearDown (line 235) | def tearDown(self) -> None: method tearDownClass (line 240) | def tearDownClass(cls): class TestMongoDBGeneric (line 246) | class TestMongoDBGeneric(_BaseGenericTestCases, IsolatedAsyncioTestCase): method setUpClass (line 250) | def setUpClass(cls) -> None: method setUp (line 259) | def setUp(self): method tearDown (line 263) | def tearDown(self) -> None: method tearDownClass (line 268) | def tearDownClass(cls): FILE: tests/test_generics_search_regex_escape.py function _run_regex_search (line 13) | def _run_regex_search(pattern: str, text: str, repeats: int, done: mp.Qu... class ListAPISearchTest (line 20) | class ListAPISearchTest(ListAPI): method get_query (line 23) | async def get_query(self, request: Request, **kwargs): class TestListAPISearchRegexEscape (line 27) | class TestListAPISearchRegexEscape(TestCase): method setUp (line 33) | def setUp(self): method tearDown (line 37) | def tearDown(self): method test_mongodb_search_pattern_escapes_user_input (line 40) | def test_mongodb_search_pattern_escapes_user_input(self): method test_raw_regex_stalls_on_near_miss_payload_but_escaped_pattern_completes (line 47) | def test_raw_regex_stalls_on_near_miss_payload_but_escaped_pattern_com... method _extract_mongodb_search_pattern (line 66) | def _extract_mongodb_search_pattern(self, user_input: str) -> str: method _find_redos_trigger_length (line 70) | def _find_redos_trigger_length(self, *, raw_pattern: str, escaped_patt... method _run_with_deadline (line 104) | def _run_with_deadline( FILE: tests/test_middlewares.py class MyMiddleware (line 13) | class MyMiddleware(HTTPMiddleware): method __call__ (line 14) | async def __call__(self, request: Request): class BeforeMiddleware1 (line 21) | class BeforeMiddleware1(HTTPMiddleware): method __call__ (line 22) | async def __call__(self, request: Request): class BeforeMiddleware2 (line 27) | class BeforeMiddleware2(HTTPMiddleware): method __call__ (line 28) | async def __call__(self, request: Request): class AfterMiddleware1 (line 33) | class AfterMiddleware1(HTTPMiddleware): method __call__ (line 34) | async def __call__(self, request: Request): class AfterMiddleware2 (line 40) | class AfterMiddleware2(HTTPMiddleware): method __call__ (line 41) | async def __call__(self, request: Request): class AfterMiddleware3 (line 47) | class AfterMiddleware3(HTTPMiddleware): method __call__ (line 48) | async def __call__(self, request: Request): class MyWSMiddleware1 (line 54) | class MyWSMiddleware1(WebsocketMiddleware): method __call__ (line 55) | async def __call__(self, connection: Websocket): class MyWSMiddleware2 (line 60) | class MyWSMiddleware2(WebsocketMiddleware): method __call__ (line 61) | async def __call__(self, connection: Websocket): class PrivateMiddleware1 (line 66) | class PrivateMiddleware1(HTTPMiddleware): method __call__ (line 67) | async def __call__(self, request: Request): class PrivateMiddleware2 (line 74) | class PrivateMiddleware2(HTTPMiddleware): method __call__ (line 75) | async def __call__(self, request: Request): function handle_middlewares (line 83) | async def handle_middlewares(request: Request): function handle_private_empty_middlewares (line 91) | async def handle_private_empty_middlewares(request: Request): function handle_private_middlewares (line 99) | async def handle_private_middlewares(request: Request): class WebsocketHandleMiddlewares (line 106) | class WebsocketHandleMiddlewares(GenericWebsocket): method connect (line 107) | async def connect(self): class TestMiddleware (line 124) | class TestMiddleware(IsolatedAsyncioTestCase): method tearDown (line 125) | def tearDown(self): method test_before_base_middleware (line 128) | async def test_before_base_middleware(self): method test_after_base_middleware (line 138) | async def test_after_base_middleware(self): method test_a_normal_middleware (line 148) | async def test_a_normal_middleware(self): method test_websocket_middleware_in_http (line 157) | async def test_websocket_middleware_in_http(self): method test_private_empty_middleware (line 176) | async def test_private_empty_middleware(self): method test_private_middleware (line 183) | async def test_private_middleware(self): method test_middlewares_order (line 196) | async def test_middlewares_order(self): class TestWebsocketMiddleware (line 230) | class TestWebsocketMiddleware(TestCase): method tearDownClass (line 232) | def tearDownClass(cls): method setUp (line 235) | def setUp(self): method tearDown (line 238) | def tearDown(self): method test_websocket_middleware (line 241) | def test_websocket_middleware(self): method test_http_middleware_in_websocket (line 259) | def test_http_middleware_in_websocket(self): method test_base_middleware (line 278) | def test_base_middleware(self): FILE: tests/test_multipart.py function flat_multipart_api (line 11) | async def flat_multipart_api(request: Request): function single_file_multipart_api (line 16) | async def single_file_multipart_api(request: Request): function several_file_multipart_api (line 25) | async def several_file_multipart_api(request: Request): function complex_multipart_api (line 41) | async def complex_multipart_api(request: Request): function multipart_api (line 59) | async def multipart_api(request: Request): class TestMultipart (line 72) | class TestMultipart(IsolatedAsyncioTestCase): method setUpClass (line 133) | def setUpClass(cls) -> None: method tearDownClass (line 138) | def tearDownClass(cls): method test_flat_multipart (line 141) | async def test_flat_multipart(self): method test_single_file_multipart (line 150) | async def test_single_file_multipart(self): method test_several_file_multipart (line 164) | async def test_several_file_multipart(self): method test_complex_multipart (line 185) | async def test_complex_multipart(self): method test_multiline_multipart (line 208) | async def test_multiline_multipart(self): FILE: tests/test_openapi.py function my_api1 (line 16) | def my_api1(): function my_api2 (line 21) | def my_api2(): function my_api3 (line 27) | def my_api3(): function my_api4 (line 33) | async def my_api4(): function my_api5 (line 38) | async def my_api5(): function my_api6 (line 43) | async def my_api6(): function my_api7 (line 48) | def my_api7(): function my_api8 (line 54) | def my_api8(): function my_api9 (line 60) | def my_api9(): function my_api10 (line 65) | def my_api10(): function my_api11 (line 71) | def my_api11(): function my_api12 (line 77) | def my_api12(): function my_api13 (line 83) | def my_api13(): function my_api14 (line 90) | def my_api14(): function my_api15 (line 97) | def my_api15(): function my_api16 (line 104) | def my_api16(): function my_api17 (line 110) | def my_api17(): class API18 (line 114) | class API18(GenericAPI): method get (line 115) | def get(self, *args, **kwargs): method post (line 118) | def post(self, *args, **kwargs): method put (line 122) | async def put(self, *args, **kwargs): method patch (line 126) | def patch(self, *args, **kwargs): method delete (line 130) | def delete(self, *args, **kwargs): function my_api19 (line 135) | def my_api19(): function my_api20 (line 141) | def my_api20(): function my_api21 (line 147) | def my_api21(): function my_api22 (line 153) | def my_api22(): function my_api23 (line 159) | def my_api23(): class CustomBaseModel (line 164) | class CustomBaseModel(BaseModel): function my_api24 (line 170) | def my_api24(): class CustomModel (line 175) | class CustomModel(Model): function my_api25 (line 180) | def my_api25(): function my_api26 (line 186) | def my_api26(): function my_api27 (line 191) | def my_api27(): class TestOpenAPI (line 195) | class TestOpenAPI(IsolatedAsyncioTestCase): method setUpClass (line 197) | def setUpClass(cls) -> None: method tearDownClass (line 202) | def tearDownClass(cls) -> None: method test_swagger (line 207) | async def test_swagger(self): method test_scalar (line 227) | async def test_scalar(self): method test_redoc (line 250) | async def test_redoc(self): method test_rapidoc (line 275) | async def test_rapidoc(self): method test_spotlight (line 301) | async def test_spotlight(self): method test_my_api1 (line 330) | async def test_my_api1(self): method test_my_api2 (line 335) | async def test_my_api2(self): method test_my_api3 (line 340) | async def test_my_api3(self): method test_my_api4 (line 345) | async def test_my_api4(self): method test_my_api5 (line 350) | async def test_my_api5(self): method test_my_api6 (line 355) | async def test_my_api6(self): method test_my_api7 (line 360) | async def test_my_api7(self): method test_my_api8 (line 365) | async def test_my_api8(self): method test_my_api9 (line 370) | async def test_my_api9(self): method test_my_api10 (line 375) | async def test_my_api10(self): method test_my_api11 (line 380) | async def test_my_api11(self): method test_my_api12 (line 385) | async def test_my_api12(self): method test_my_api13 (line 390) | async def test_my_api13(self): method test_my_api14 (line 395) | async def test_my_api14(self): method test_my_api15 (line 400) | async def test_my_api15(self): method test_my_api16 (line 405) | async def test_my_api16(self): method test_my_api17 (line 410) | async def test_my_api17(self): method test_my_api18_get (line 415) | async def test_my_api18_get(self): method test_my_api18_post (line 420) | async def test_my_api18_post(self): method test_my_api18_put (line 425) | async def test_my_api18_put(self): method test_my_api18_patch (line 430) | async def test_my_api18_patch(self): method test_my_api18_delete (line 435) | async def test_my_api18_delete(self): method test_my_api19 (line 440) | async def test_my_api19(self): method test_my_api20 (line 445) | async def test_my_api20(self): method test_my_api21 (line 450) | async def test_my_api21(self): method test_my_api22 (line 455) | async def test_my_api22(self): method test_my_api23 (line 460) | async def test_my_api23(self): method test_my_api24 (line 465) | async def test_my_api24(self): method test_my_api25 (line 470) | async def test_my_api25(self): method test_my_api26 (line 475) | async def test_my_api26(self): method test_my_api27 (line 480) | async def test_my_api27(self): FILE: tests/test_panel.py class CustomUser (line 13) | class CustomUser(BaseUser): class CustomModel (line 18) | class CustomModel(Model): class TestPanel (line 37) | class TestPanel(IsolatedAsyncioTestCase): method setUpClass (line 39) | def setUpClass(cls) -> None: method tearDown (line 43) | def tearDown(self) -> None: method tearDownClass (line 48) | def tearDownClass(cls): method check_in_cookies (line 53) | def check_in_cookies(cls, *args, cookies): method test_login_view_get (line 62) | async def test_login_view_get(self): method test_login_view_post_success (line 68) | async def test_login_view_post_success(self): method test_login_view_post_user_not_found (line 82) | async def test_login_view_post_user_not_found(self): method test_login_view_post_wrong_password (line 92) | async def test_login_view_post_wrong_password(self): method test_login_view_post_with_redirect (line 107) | async def test_login_view_post_with_redirect(self): method test_home_view_without_auth (line 123) | async def test_home_view_without_auth(self): method test_home_view_with_auth (line 128) | async def test_home_view_with_auth(self): method test_table_view_without_auth (line 141) | async def test_table_view_without_auth(self): method test_table_view_with_auth_empty_data (line 146) | async def test_table_view_with_auth_empty_data(self): method test_table_view_with_auth_with_data (line 159) | async def test_table_view_with_auth_with_data(self): method test_create_view_get_without_auth (line 179) | async def test_create_view_get_without_auth(self): method test_create_view_get_with_auth (line 184) | async def test_create_view_get_with_auth(self): method test_create_view_post_without_auth (line 197) | async def test_create_view_post_without_auth(self): method test_create_view_post_with_auth_user_model (line 202) | async def test_create_view_post_with_auth_user_model(self): method test_create_view_post_with_auth_regular_model (line 221) | async def test_create_view_post_with_auth_regular_model(self): method test_detail_view_get_without_auth (line 240) | async def test_detail_view_get_without_auth(self): method test_detail_view_get_with_auth (line 245) | async def test_detail_view_get_with_auth(self): method test_detail_view_put_without_auth (line 263) | async def test_detail_view_put_without_auth(self): method test_detail_view_put_with_auth (line 268) | async def test_detail_view_put_with_auth(self): method test_detail_view_delete_without_auth (line 289) | async def test_detail_view_delete_without_auth(self): method test_detail_view_delete_with_auth (line 294) | async def test_detail_view_delete_with_auth(self): method test_invalid_model_index (line 315) | async def test_invalid_model_index(self): method test_invalid_document_id (line 327) | async def test_invalid_document_id(self): method test_middleware_redirect_to_slash (line 339) | async def test_middleware_redirect_to_slash(self): method test_cookie_authentication_invalid_token (line 350) | async def test_cookie_authentication_invalid_token(self): method test_cookie_authentication_expired_token (line 356) | async def test_cookie_authentication_expired_token(self): FILE: tests/test_permission.py class AlwaysDeniedPermission (line 12) | class AlwaysDeniedPermission(BasePermission): method __call__ (line 13) | async def __call__(self, request: Request) -> bool: class NotInheritedPermission (line 17) | class NotInheritedPermission: method __call__ (line 18) | async def __call__(self, request: Request) -> bool: class SyncPermission (line 22) | class SyncPermission(BasePermission): method __call__ (line 23) | def __call__(self, request: Request) -> bool: class WithoutParamPermission (line 27) | class WithoutParamPermission: method __call__ (line 28) | def __call__(self) -> bool: function without_param_permission (line 32) | def without_param_permission(): class WithoutCallPermission (line 36) | class WithoutCallPermission: function sync_permission (line 40) | def sync_permission(req): function accept_permission (line 44) | async def accept_permission(req): function deny_permission (line 48) | async def deny_permission(req): function without_permission_api (line 53) | async def without_permission_api(request: Request): function denied_permission_api (line 58) | async def denied_permission_api(request: Request): function single_denied_permission_api (line 63) | async def single_denied_permission_api(request: Request): function not_inherited_permission_api (line 68) | async def not_inherited_permission_api(request: Request): function multiple_permissions_api (line 73) | async def multiple_permissions_api(request: Request): class TestPermission (line 86) | class TestPermission(IsolatedAsyncioTestCase): method setUp (line 87) | def setUp(self) -> None: method tearDownClass (line 92) | def tearDownClass(cls): method test_without_permission (line 95) | async def test_without_permission(self): method test_denied_permission (line 100) | async def test_denied_permission(self): method test_single_denied_permission (line 106) | async def test_single_denied_permission(self): method test_not_inherited_permission (line 112) | async def test_not_inherited_permission(self): method test_multiple_permission (line 118) | async def test_multiple_permission(self): method test_sync_permission (line 124) | async def test_sync_permission(self): method test_sync_permission_classbased (line 135) | async def test_sync_permission_classbased(self): method test_without_call_permission (line 145) | async def test_without_call_permission(self): method test_without_call_permission_classbased (line 156) | async def test_without_call_permission_classbased(self): method test_sync_function_permission (line 166) | async def test_sync_function_permission(self): method test_sync_function_permission_classbased (line 177) | async def test_sync_function_permission_classbased(self): method test_class_without_param_permission (line 187) | async def test_class_without_param_permission(self): method test_class_without_param_permission_classbased (line 198) | async def test_class_without_param_permission_classbased(self): method test_function_without_param_permission (line 208) | async def test_function_without_param_permission(self): method test_function_without_param_permission_classbased (line 219) | async def test_function_without_param_permission_classbased(self): FILE: tests/test_request.py function request_path (line 14) | async def request_path(request: Request): function request_client (line 19) | async def request_client(request: Request): function request_query_params (line 24) | async def request_query_params(request: Request): function request_data (line 29) | async def request_data(request: Request): function request_path_variables (line 34) | async def request_path_variables(name: str, age: int, is_alive: bool): function request_header (line 39) | async def request_header(request: Request): function request_header_str (line 44) | async def request_header_str(request: Request): function request_header_contains (line 49) | async def request_header_contains(request: Request, header: str): function request_header_by_attr (line 54) | async def request_header_by_attr(request: Request): function request_header_by_item (line 59) | async def request_header_by_item(request: Request): class AllMethods (line 64) | class AllMethods(GenericAPI): method get (line 65) | def get(self, *args, **kwargs): method post (line 68) | def post(self, *args, **kwargs): method put (line 71) | def put(self, *args, **kwargs): method patch (line 74) | def patch(self, *args, **kwargs): method delete (line 77) | def delete(self, *args, **kwargs): function all_methods (line 82) | async def all_methods(): class GetMethod (line 86) | class GetMethod(GenericAPI): method get (line 87) | def get(self, *args, **kwargs): function get_method (line 92) | async def get_method(): class PostMethod (line 96) | class PostMethod(GenericAPI): method post (line 97) | def post(self, *args, **kwargs): function post_method (line 102) | async def post_method(): class PutMethod (line 106) | class PutMethod(GenericAPI): method put (line 107) | def put(self, *args, **kwargs): function put_method (line 112) | async def put_method(): class PatchMethod (line 116) | class PatchMethod(GenericAPI): method patch (line 117) | def patch(self, *args, **kwargs): function patch_method (line 122) | async def patch_method(): class DeleteMethod (line 126) | class DeleteMethod(GenericAPI): method delete (line 127) | def delete(self, *args, **kwargs): function delete_method (line 132) | async def delete_method(): class GetPostPatchMethods (line 136) | class GetPostPatchMethods(GenericAPI): method get (line 137) | def get(self, *args, **kwargs): method post (line 140) | def post(self, *args, **kwargs): method patch (line 143) | def patch(self, *args, **kwargs): function get_post_patch_methods (line 148) | async def get_post_patch_methods(): class TestRequest (line 180) | class TestRequest(IsolatedAsyncioTestCase): method setUpClass (line 182) | def setUpClass(cls) -> None: method tearDownClass (line 187) | def tearDownClass(cls) -> None: method test_path (line 190) | async def test_path(self): method test_client (line 195) | async def test_client(self): method test_query_params (line 200) | async def test_query_params(self): method test_data (line 208) | async def test_data(self): method test_path_variables (line 214) | async def test_path_variables(self): method test_headers_none (line 221) | async def test_headers_none(self): method test_headers_content_type (line 226) | async def test_headers_content_type(self): method test_headers_full_items (line 231) | async def test_headers_full_items(self): method test_headers_unknown_items (line 254) | async def test_headers_unknown_items(self): method test_headers_authorization_by_getattr (line 267) | async def test_headers_authorization_by_getattr(self): method test_headers_authorization_by_getitem (line 274) | async def test_headers_authorization_by_getitem(self): method test_headers_str (line 281) | async def test_headers_str(self): method test_headers_contains (line 285) | async def test_headers_contains(self): method test_method_all (line 292) | async def test_method_all(self): method test_method_get (line 318) | async def test_method_get(self): method test_method_post (line 344) | async def test_method_post(self): method test_method_put (line 370) | async def test_method_put(self): method test_method_patch (line 396) | async def test_method_patch(self): method test_method_delete (line 422) | async def test_method_delete(self): method test_method_get_post_patch (line 448) | async def test_method_get_post_patch(self): FILE: tests/test_request_isolation.py class RequestIsolationRaceAuth (line 12) | class RequestIsolationRaceAuth: method reset (line 17) | def reset(cls) -> None: method __call__ (line 21) | async def __call__(self, request: Request) -> str: function function_api_race_endpoint (line 36) | async def function_api_race_endpoint(name: str, request: Request): class ClassBasedRaceEndpoint (line 40) | class ClassBasedRaceEndpoint(GenericAPI): method get (line 43) | async def get(self, name: str, request: Request): class TestAPIRequestIsolation (line 53) | class TestAPIRequestIsolation(IsolatedAsyncioTestCase): method setUpClass (line 55) | def setUpClass(cls) -> None: method tearDownClass (line 60) | def tearDownClass(cls) -> None: method test_function_api_keeps_request_isolation_under_concurrency (line 63) | async def test_function_api_keeps_request_isolation_under_concurrency(... method test_class_based_apis_keep_request_isolation (line 75) | async def test_class_based_apis_keep_request_isolation(self): FILE: tests/test_response.py function return_nothing (line 23) | async def return_nothing(): class ReturnNothing (line 27) | class ReturnNothing(GenericAPI): method get (line 28) | def get(self): function return_none (line 33) | async def return_none(): class ReturnNone (line 37) | class ReturnNone(GenericAPI): method get (line 38) | def get(self): function return_string (line 43) | async def return_string(): class ReturnString (line 47) | class ReturnString(GenericAPI): method get (line 48) | def get(self): function return_dict (line 53) | async def return_dict(): class ReturnDict (line 57) | class ReturnDict(GenericAPI): method get (line 58) | def get(self): function return_list (line 63) | async def return_list(): class ReturnList (line 67) | class ReturnList(GenericAPI): method get (line 68) | def get(self): function return_tuple (line 73) | async def return_tuple(): class ReturnTuple (line 77) | class ReturnTuple(GenericAPI): method get (line 78) | def get(self): function return_response_none (line 83) | async def return_response_none(): class ReturnResponseNone (line 87) | class ReturnResponseNone(GenericAPI): method get (line 88) | def get(self): function return_response_dict (line 93) | async def return_response_dict(): class ReturnResponseDict (line 97) | class ReturnResponseDict(GenericAPI): method get (line 98) | def get(self): function return_response_list (line 103) | async def return_response_list(): class ReturnResponseList (line 107) | class ReturnResponseList(GenericAPI): method get (line 108) | def get(self): function return_response_tuple (line 113) | async def return_response_tuple(): class ReturnResponseTuple (line 117) | class ReturnResponseTuple(GenericAPI): method get (line 118) | def get(self): class CustomUser (line 122) | class CustomUser(BaseModel): class CustomBook (line 128) | class CustomBook(BaseModel): class ReturnResponseBaseModel (line 134) | class ReturnResponseBaseModel(GenericAPI): method get (line 135) | def get(self): class ReturnResponseNestedBaseModel (line 139) | class ReturnResponseNestedBaseModel(GenericAPI): method get (line 140) | def get(self): class CustomProduct (line 161) | class CustomProduct(Model): class ReturnResponseModel (line 165) | class ReturnResponseModel(GenericAPI): method get (line 166) | def get(self): function return_html_response (line 171) | async def return_html_response(): class ReturnHTMLResponse (line 175) | class ReturnHTMLResponse(GenericAPI): method get (line 176) | def get(self): function return_template_response (line 181) | async def return_template_response() -> TemplateResponse: class ReturnTemplateResponse (line 185) | class ReturnTemplateResponse(GenericAPI): method get (line 186) | def get(self) -> TemplateResponse: function return_file_not_found_response (line 194) | async def return_file_not_found_response(): function return_file_response (line 199) | async def return_file_response(): function return_plain_response (line 204) | async def return_plain_response(): class ReturnPlainResponse (line 208) | class ReturnPlainResponse(GenericAPI): method get (line 209) | def get(self): class ReturnStreamingResponse (line 213) | class ReturnStreamingResponse(GenericAPI): method get (line 214) | def get(self): class ReturnAsyncStreamingResponse (line 221) | class ReturnAsyncStreamingResponse(GenericAPI): method get (line 222) | async def get(self): function full_cookie_api (line 231) | def full_cookie_api(): function multiple_cookies_api (line 247) | def multiple_cookies_api(): function default_cookies_api (line 275) | def default_cookies_api(): class TestResponses (line 319) | class TestResponses(IsolatedAsyncioTestCase): method setUpClass (line 321) | def setUpClass(cls) -> None: method tearDownClass (line 326) | def tearDownClass(cls): method test_nothing (line 329) | async def test_nothing(self): method test_nothing_cls (line 338) | async def test_nothing_cls(self): method test_none (line 347) | async def test_none(self): method test_none_cls (line 356) | async def test_none_cls(self): method test_dict (line 365) | async def test_dict(self): method test_dict_cls (line 374) | async def test_dict_cls(self): method test_string (line 383) | async def test_string(self): method test_string_cls (line 392) | async def test_string_cls(self): method test_list (line 401) | async def test_list(self): method test_list_cls (line 410) | async def test_list_cls(self): method test_tuple (line 419) | async def test_tuple(self): method test_tuple_cls (line 428) | async def test_tuple_cls(self): method test_basemodel (line 437) | async def test_basemodel(self): method test_nested_basemodel (line 446) | async def test_nested_basemodel(self): method test_model (line 476) | async def test_model(self): method test_response_none (line 485) | async def test_response_none(self): method test_response_none_cls (line 494) | async def test_response_none_cls(self): method test_response_dict (line 503) | async def test_response_dict(self): method test_response_dict_cls (line 512) | async def test_response_dict_cls(self): method test_response_list (line 521) | async def test_response_list(self): method test_response_list_cls (line 530) | async def test_response_list_cls(self): method test_response_tuple (line 539) | async def test_response_tuple(self): method test_response_tuple_cls (line 548) | async def test_response_tuple_cls(self): method test_response_html (line 557) | async def test_response_html(self): method test_response_html_cls (line 566) | async def test_response_html_cls(self): method test_response_template (line 575) | async def test_response_template(self) -> None: method test_response_template_cls (line 584) | async def test_response_template_cls(self) -> None: method test_response_file_not_found (line 593) | async def test_response_file_not_found(self): method test_response_file (line 602) | async def test_response_file(self): method test_response_plain (line 615) | async def test_response_plain(self): method test_response_plain_cls (line 624) | async def test_response_plain_cls(self): method test_streaming_response (line 633) | async def test_streaming_response(self): method test_async_streaming_response (line 640) | async def test_async_streaming_response(self): method test_full_cookie (line 647) | async def test_full_cookie(self): method test_multiple_cookies (line 667) | async def test_multiple_cookies(self): method test_default_cookie (line 684) | async def test_default_cookie(self): FILE: tests/test_response_output_model.py class OutputModelWithAlias (line 15) | class OutputModelWithAlias(BaseModel): class OutputModelWithPrepare (line 20) | class OutputModelWithPrepare(BaseModel): method to_response (line 23) | async def to_response(self, instance, data): class User (line 28) | class User(Model): class UserOutputSerializer (line 33) | class UserOutputSerializer(BaseModel): class OutputModelWithInstanceCheck (line 38) | class OutputModelWithInstanceCheck(BaseModel): method to_response (line 42) | async def to_response(self, instance, data): class OutputModelWithInstanceCheckIterable (line 48) | class OutputModelWithInstanceCheckIterable(BaseModel): method to_response (line 52) | async def to_response(self, instance, data): class TestResponsesOutputModel (line 57) | class TestResponsesOutputModel(IsolatedAsyncioTestCase): method setUpClass (line 61) | def setUpClass(cls) -> None: method tearDown (line 68) | def tearDown(self) -> None: method tearDownClass (line 72) | def tearDownClass(cls): method test_dict (line 76) | async def test_dict(self): method test_iterable (line 81) | async def test_iterable(self): method test_to_response (line 86) | async def test_to_response(self): method test_iterable_to_response (line 91) | async def test_iterable_to_response(self): method test_type_error (line 96) | async def test_type_error(self): method test_model (line 101) | async def test_model(self): method test_to_response_instance_argument (line 107) | async def test_to_response_instance_argument(self): method test_iterable_to_response_instance_argument (line 116) | async def test_iterable_to_response_instance_argument(self): method test_model_instance_to_response_argument (line 132) | async def test_model_instance_to_response_argument(self): FILE: tests/test_routing.py class TestRoutingFunctions (line 15) | class TestRoutingFunctions(TestCase): method tearDown (line 16) | def tearDown(self) -> None: method tearDownClass (line 20) | def tearDownClass(cls): method test_flatten_urls_ellipsis_endpoints (line 24) | def test_flatten_urls_ellipsis_endpoints(self): method test_flatten_urls_none_endpoints (line 50) | def test_flatten_urls_none_endpoints(self): method test_flatten_urls_invalid_url (line 76) | def test_flatten_urls_invalid_url(self): method test_flatten_urls_empty_url (line 105) | def test_flatten_urls_empty_url(self): method test_flatten_urls_nested_empty_urls (line 120) | def test_flatten_urls_nested_empty_urls(self): method test_flatten_urls_slash_url (line 149) | def test_flatten_urls_slash_url(self): method test_flatten_urls_nested_slash_urls (line 164) | def test_flatten_urls_nested_slash_urls(self): method test_flatten_urls_simple_urls (line 193) | def test_flatten_urls_simple_urls(self): method test_flatten_urls_simple_nested_urls (line 212) | def test_flatten_urls_simple_nested_urls(self): method test_flatten_urls_simple_nested_urls_without_slash_at_end (line 233) | def test_flatten_urls_simple_nested_urls_without_slash_at_end(self): method test_flatten_urls_complex_nested_urls (line 254) | def test_flatten_urls_complex_nested_urls(self): method test_finalize_empty_url (line 303) | def test_finalize_empty_url(self): method test_finalize_empty_url_nested (line 319) | def test_finalize_empty_url_nested(self): method test_finalize_root_url (line 351) | def test_finalize_root_url(self): method test_finalize_root_url_nested (line 367) | def test_finalize_root_url_nested(self): method test_finalize_root_and_empty_url_nested (line 399) | def test_finalize_root_and_empty_url_nested(self): method test_finalize_empty_and_root_url_nested (line 431) | def test_finalize_empty_and_root_url_nested(self): method test_finalize_urls (line 463) | def test_finalize_urls(self): method test_finalize_urls_same_pre_path_variable (line 531) | def test_finalize_urls_same_pre_path_variable(self): method test_finalize_urls_with_same_level_path_variables (line 552) | def test_finalize_urls_with_same_level_path_variables(self): method test_find_endpoint_root_url (line 595) | def test_find_endpoint_root_url(self): method test_find_endpoint_success (line 608) | def test_find_endpoint_success(self): method test_find_endpoint_success_path (line 679) | def test_find_endpoint_success_path(self): method test_find_endpoint_not_found (line 761) | def test_find_endpoint_not_found(self): method test_find_endpoint_not_found_path (line 788) | def test_find_endpoint_not_found_path(self): method test_find_endpoint_not_found_last_is_path_variable (line 815) | def test_find_endpoint_not_found_last_is_path_variable(self): method test_find_endpoint_not_found_path_last_is_path_variable (line 842) | def test_find_endpoint_not_found_path_last_is_path_variable(self): method test_find_endpoint_not_found_too_many (line 869) | def test_find_endpoint_not_found_too_many(self): method test_find_endpoint_not_found_not_enough (line 883) | def test_find_endpoint_not_found_not_enough(self): method test_find_endpoint_same_pre_path_variable (line 897) | def test_find_endpoint_same_pre_path_variable(self): method test_find_endpoint_same_pre_path_variable_path (line 924) | def test_find_endpoint_same_pre_path_variable_path(self): method test_find_endpoint_same_pre_key (line 951) | def test_find_endpoint_same_pre_key(self): method test_find_endpoint_same_pre_key_path (line 979) | def test_find_endpoint_same_pre_key_path(self): method test_find_endpoint_with_params (line 1007) | def test_find_endpoint_with_params(self): method test_collect_path_variables (line 1025) | def test_collect_path_variables(self): method test_find_endpoint_complete (line 1059) | def test_find_endpoint_complete(self): FILE: tests/test_run.py class TestRun (line 11) | class TestRun(TestCase): method setUpClass (line 13) | def setUpClass(cls) -> None: method tearDownClass (line 17) | def tearDownClass(cls) -> None: method tearDown (line 21) | def tearDown(self) -> None: method test_init (line 24) | def test_init(self): method test_load_configs (line 28) | def test_load_configs(self): FILE: tests/test_serializer.py class Book (line 21) | class Book(Model): class Author (line 27) | class Author(Model): class NotRequiredFieldsSerializer (line 32) | class NotRequiredFieldsSerializer(ModelSerializer): class Config (line 33) | class Config: class RequiredFieldsSerializer (line 38) | class RequiredFieldsSerializer(ModelSerializer): class Config (line 39) | class Config: class OnlyRequiredFieldsSerializer (line 44) | class OnlyRequiredFieldsSerializer(ModelSerializer): class Config (line 45) | class Config: class WithValidatorsSerializer (line 51) | class WithValidatorsSerializer(ModelSerializer): class Config (line 52) | class Config: method validate_other (line 58) | def validate_other(cls, field): method validate_pages_count (line 62) | def validate_pages_count(cls, field): class WithClassFieldsSerializer (line 66) | class WithClassFieldsSerializer(ModelSerializer): class Config (line 69) | class Config: class WithForeignKeySerializer (line 75) | class WithForeignKeySerializer(ModelSerializer): class Config (line 76) | class Config: function not_required (line 82) | async def not_required(request: Request): function required (line 87) | async def required(request: Request): function only_required (line 92) | async def only_required(request: Request): function with_validators (line 97) | async def with_validators(request: Request): function with_class_fields (line 102) | async def with_class_fields(request: Request): function with_foreign_key (line 107) | async def with_foreign_key(request: Request): class TestModelSerializer (line 121) | class TestModelSerializer(IsolatedAsyncioTestCase): method setUpClass (line 123) | def setUpClass(cls) -> None: method tearDown (line 127) | def tearDown(self) -> None: method tearDownClass (line 132) | def tearDownClass(cls) -> None: method test_not_required_fields_empty_response (line 138) | async def test_not_required_fields_empty_response(self): method test_not_required_fields_full_response (line 144) | async def test_not_required_fields_full_response(self): method test_required_fields_error (line 150) | async def test_required_fields_error(self): method test_required_fields_success (line 156) | async def test_required_fields_success(self): method test_only_required_fields_error (line 162) | async def test_only_required_fields_error(self): method test_only_required_fields_success (line 168) | async def test_only_required_fields_success(self): method test_with_validators (line 174) | async def test_with_validators(self): method test_with_class_fields_success (line 180) | async def test_with_class_fields_success(self): method test_foreign_key (line 193) | async def test_foreign_key(self): method test_define_class_without_meta (line 206) | async def test_define_class_without_meta(self): method test_define_class_without_model (line 217) | async def test_define_class_without_model(self): method test_define_class_without_fields (line 229) | async def test_define_class_without_fields(self): method test_define_class_with_invalid_fields (line 241) | async def test_define_class_with_invalid_fields(self): method test_define_class_with_invalid_required_fields (line 254) | async def test_define_class_with_invalid_required_fields(self): method test_define_class_with_invalid_model (line 268) | async def test_define_class_with_invalid_model(self): method test_define_class_with_invalid_exclude_1 (line 283) | async def test_define_class_with_invalid_exclude_1(self): method test_define_class_with_invalid_exclude_2 (line 298) | async def test_define_class_with_invalid_exclude_2(self): method test_with_star_fields_with_exclude3 (line 313) | async def test_with_star_fields_with_exclude3(self): method test_with_simple_model_config (line 329) | async def test_with_simple_model_config(self): method test_with_inner_model_config (line 342) | async def test_with_inner_model_config(self): method test_with_dual_model_config (line 354) | async def test_with_dual_model_config(self): method test_serializer_doc (line 368) | async def test_serializer_doc(self): method test_with_exclude (line 387) | async def test_with_exclude(self): method test_with_star_fields (line 399) | async def test_with_star_fields(self): method test_with_star_fields_with_exclude (line 411) | async def test_with_star_fields_with_exclude(self): FILE: tests/test_status.py class TestStatus (line 6) | class TestStatus(TestCase): method setUpClass (line 8) | def setUpClass(cls): method test_status_numbers (line 87) | def test_status_numbers(self): method test_status_is_informational (line 91) | def test_status_is_informational(self): method test_status_is_success (line 98) | def test_status_is_success(self): method test_status_is_redirect (line 105) | def test_status_is_redirect(self): method test_status_is_client_error (line 112) | def test_status_is_client_error(self): method test_status_is_server_error (line 119) | def test_status_is_server_error(self): method test_statuses_text (line 126) | def test_statuses_text(self): FILE: tests/test_throttling.py function without_throttling_api (line 14) | async def without_throttling_api(): function with_throttling_api (line 19) | async def with_throttling_api(): function throttling_headers_api (line 24) | async def throttling_headers_api(): class TestThrottling (line 37) | class TestThrottling(IsolatedAsyncioTestCase): method setUpClass (line 39) | def setUpClass(cls) -> None: method tearDownClass (line 44) | def tearDownClass(cls): method test_without_throttling (line 47) | async def test_without_throttling(self): method test_with_throttling (line 61) | async def test_with_throttling(self): method test_throttling_header (line 94) | async def test_throttling_header(self): method test_global_throttling (line 107) | async def test_global_throttling(self): FILE: tests/test_utils.py class TestLoadEnvFile (line 12) | class TestLoadEnvFile(TestCase): method tearDown (line 19) | def tearDown(self) -> None: method _create_env_file (line 22) | def _create_env_file(self, file_data): method test_load_env_invalid_file (line 26) | def test_load_env_invalid_file(self): method test_load_env_double_quote (line 32) | def test_load_env_double_quote(self): method test_load_env_single_quote (line 44) | def test_load_env_single_quote(self): method test_load_env_no_quote (line 56) | def test_load_env_no_quote(self): method test_load_env_no_space (line 69) | def test_load_env_no_space(self): method test_load_env_not_striped (line 81) | def test_load_env_not_striped(self): method test_load_env_and_read_from_system_env (line 93) | def test_load_env_and_read_from_system_env(self): class TestUtilFunctions (line 106) | class TestUtilFunctions(TestCase): method test_round_datetime_second_1 (line 107) | def test_round_datetime_second_1(self): method test_round_datetime_second_2 (line 115) | def test_round_datetime_second_2(self): method test_round_datetime_minute_1 (line 123) | def test_round_datetime_minute_1(self): method test_round_datetime_minute_2 (line 131) | def test_round_datetime_minute_2(self): method test_round_datetime_hour_1 (line 139) | def test_round_datetime_hour_1(self): method test_round_datetime_hour_2 (line 147) | def test_round_datetime_hour_2(self): method test_round_datetime_day_1 (line 155) | def test_round_datetime_day_1(self): method test_round_datetime_day_2 (line 163) | def test_round_datetime_day_2(self): method test_generate_hash_value_from_string (line 171) | def test_generate_hash_value_from_string(self): class TestLoadConfigs (line 180) | class TestLoadConfigs(TestCase): method tearDown (line 181) | def tearDown(self): method tearDownClass (line 185) | def tearDownClass(cls): method test_urls_not_found (line 188) | def test_urls_not_found(self): method test_urls_cant_be_dict (line 203) | def test_urls_cant_be_dict(self): method test_urls_not_string (line 222) | def test_urls_not_string(self): method test_urls_invalid_target (line 237) | def test_urls_invalid_target(self): method test_urls_invalid_module_path (line 252) | def test_urls_invalid_module_path(self): method test_middlewares_invalid_path (line 267) | def test_middlewares_invalid_path(self): method test_middlewares_invalid_structure (line 293) | def test_middlewares_invalid_structure(self): method test_middlewares_too_many_args (line 313) | def test_middlewares_too_many_args(self): method test_middlewares_without_args (line 333) | def test_middlewares_without_args(self): method test_middlewares_invalid_middleware_parent (line 342) | def test_middlewares_invalid_middleware_parent(self): method test_jwt_auth_without_secret_key (line 362) | def test_jwt_auth_without_secret_key(self): method test_jwt_auth_with_secret_key (line 379) | def test_jwt_auth_with_secret_key(self): method test_check_function_endpoint_decorator (line 395) | def test_check_function_endpoint_decorator(self): method test_check_class_endpoint_inheritance (line 410) | def test_check_class_endpoint_inheritance(self): method test_check_websocket_inheritance (line 425) | def test_check_websocket_inheritance(self): function invalid_api (line 441) | def invalid_api(): class InvalidAPI (line 445) | class InvalidAPI: class InvalidWebsocket (line 449) | class InvalidWebsocket: class CorrectTestMiddleware (line 453) | class CorrectTestMiddleware(HTTPMiddleware): class TestMiddleware (line 457) | class TestMiddleware: FILE: tests/test_websockets.py class WithoutAcceptWebsocket (line 12) | class WithoutAcceptWebsocket(GenericWebsocket): method connect (line 13) | async def connect(self): class CloseOnConnectWebsocket (line 17) | class CloseOnConnectWebsocket(GenericWebsocket): method connect (line 18) | async def connect(self): class CustomCloseWebsocket (line 23) | class CustomCloseWebsocket(GenericWebsocket): method connect (line 24) | async def connect(self): class MessageOnConnectWebsocket (line 29) | class MessageOnConnectWebsocket(GenericWebsocket): method connect (line 30) | async def connect(self): class QueryParamWebsocket (line 36) | class QueryParamWebsocket(GenericWebsocket): method connect (line 37) | async def connect(self): class PathVariableWebsocket (line 43) | class PathVariableWebsocket(GenericWebsocket): method connect (line 44) | async def connect(self, name: str, age: int, is_male: bool): class SendAllTypesWebsocket (line 52) | class SendAllTypesWebsocket(GenericWebsocket): method connect (line 53) | async def connect(self): class WebsocketWithoutAuthentication (line 75) | class WebsocketWithoutAuthentication(GenericWebsocket): method connect (line 76) | async def connect(self): class WebsocketWithAuthentication (line 82) | class WebsocketWithAuthentication(GenericWebsocket): method connect (line 85) | async def connect(self): class Permission (line 91) | class Permission: method __call__ (line 92) | async def __call__(self, connection) -> bool: class WebsocketWithPermission (line 96) | class WebsocketWithPermission(GenericWebsocket): method connect (line 99) | async def connect(self): class WebsocketWithoutPermission (line 105) | class WebsocketWithoutPermission(GenericWebsocket): method connect (line 108) | async def connect(self): class TestWebsocket (line 129) | class TestWebsocket(TestCase): method setUpClass (line 131) | def setUpClass(cls) -> None: method tearDownClass (line 135) | def tearDownClass(cls): method test_without_accept (line 138) | def test_without_accept(self): method test_close_on_connect (line 145) | def test_close_on_connect(self): method test_custom_close (line 156) | def test_custom_close(self): method test_query_params (line 167) | def test_query_params(self): method test_message_after_connect (line 184) | def test_message_after_connect(self): method test_path_variables (line 198) | def test_path_variables(self): method test_all_types (line 212) | def test_all_types(self): method test_without_auth (line 258) | def test_without_auth(self): method test_with_auth_failed (line 272) | def test_with_auth_failed(self): method test_with_auth_success (line 287) | def test_with_auth_success(self): method test_with_permission (line 310) | def test_with_permission(self): method test_without_permission (line 325) | def test_without_permission(self):