id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
31,000
encode/starlette
starlette/authentication.py
starlette.authentication.AuthCredentials
from collections.abc import Sequence class AuthCredentials: def __init__(self, scopes: Sequence[str] | None=None): self.scopes = [] if scopes is None else list(scopes)
class AuthCredentials: def __init__(self, scopes: Sequence[str] | None=None): pass
2
0
2
0
2
0
2
0
0
2
0
0
1
1
1
1
3
0
3
3
1
0
3
3
1
2
0
0
2
31,001
encode/starlette
starlette/authentication.py
starlette.authentication.AuthenticationBackend
from starlette.requests import HTTPConnection, Request class AuthenticationBackend: async def authenticate(self, conn: HTTPConnection) -> tuple[AuthCredentials, BaseUser] | None: raise NotImplementedError()
class AuthenticationBackend: async def authenticate(self, conn: HTTPConnection) -> tuple[AuthCredentials, BaseUser] | None: pass
2
0
2
0
2
1
1
0.33
0
5
3
1
1
0
1
1
3
0
3
2
1
1
3
2
1
1
0
0
1
31,002
encode/starlette
starlette/authentication.py
starlette.authentication.BaseUser
class BaseUser: @property def is_authenticated(self) -> bool: raise NotImplementedError() @property def display_name(self) -> str: raise NotImplementedError() @property def identity(self) -> str: raise NotImplementedError()
class BaseUser: @property def is_authenticated(self) -> bool: pass @property def display_name(self) -> str: pass @property def identity(self) -> str: pass
7
0
2
0
2
1
1
0.3
0
3
0
2
3
0
3
3
12
2
10
7
3
3
7
4
3
1
0
0
3
31,003
encode/starlette
starlette/authentication.py
starlette.authentication.SimpleUser
class SimpleUser(BaseUser): def __init__(self, username: str) -> None: self.username = username @property def is_authenticated(self) -> bool: return True @property def display_name(self) -> str: return self.username
class SimpleUser(BaseUser): def __init__(self, username: str) -> None: pass @property def is_authenticated(self) -> bool: pass @property def display_name(self) -> str: pass
6
0
2
0
2
0
1
0
1
2
0
0
3
1
3
6
11
2
9
7
3
0
7
5
3
1
1
0
3
31,004
encode/starlette
starlette/authentication.py
starlette.authentication.UnauthenticatedUser
class UnauthenticatedUser(BaseUser): @property def is_authenticated(self) -> bool: return False @property def display_name(self) -> str: return ''
class UnauthenticatedUser(BaseUser): @property def is_authenticated(self) -> bool: pass @property def display_name(self) -> str: pass
5
0
2
0
2
0
1
0
1
2
0
0
2
0
2
5
8
1
7
5
2
0
5
3
2
1
1
0
2
31,005
encode/starlette
starlette/background.py
starlette.background.BackgroundTask
from starlette._utils import is_async_callable from typing import Any, Callable from starlette.concurrency import run_in_threadpool class BackgroundTask: def __init__(self, func: Callable[P, Any], *args: P.args, **kwargs: P.kwargs) -> None: self.func = func self.args = args self.kwargs = k...
class BackgroundTask: def __init__(self, func: Callable[P, Any], *args: P.args, **kwargs: P.kwargs) -> None: pass async def __call__(self) -> None: pass
3
0
5
0
5
0
2
0
0
1
0
1
2
4
2
2
12
1
11
7
8
0
10
7
7
2
0
1
3
31,006
encode/starlette
starlette/background.py
starlette.background.BackgroundTasks
from collections.abc import Sequence from typing import Any, Callable class BackgroundTasks(BackgroundTask): def __init__(self, tasks: Sequence[BackgroundTask] | None=None): self.tasks = list(tasks) if tasks else [] def add_task(self, func: Callable[P, Any], *args: P.args, **kwargs: P.kwargs) -> None...
class BackgroundTasks(BackgroundTask): def __init__(self, tasks: Sequence[BackgroundTask] | None=None): pass def add_task(self, func: Callable[P, Any], *args: P.args, **kwargs: P.kwargs) -> None: pass async def __call__(self) -> None: pass
4
0
3
0
3
0
2
0
1
2
0
0
3
1
3
5
11
2
9
7
5
0
9
7
5
2
1
1
5
31,007
encode/starlette
starlette/concurrency.py
starlette.concurrency._StopIteration
class _StopIteration(Exception): pass
class _StopIteration(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
2
0
2
1
1
0
2
1
1
0
3
0
0
31,008
encode/starlette
starlette/config.py
starlette.config.Config
import warnings from collections.abc import Iterator, Mapping, MutableMapping from pathlib import Path import os from typing import Any, Callable, TypeVar, overload class Config: def __init__(self, env_file: str | Path | None=None, environ: Mapping[str, str]=environ, env_prefix: str='') -> None: self.envi...
class Config: def __init__(self, env_file: str | Path | None=None, environ: Mapping[str, str]=environ, env_prefix: str='') -> None: pass @overload def __call__(self, key: str, *, default: None) -> str | None: pass @overload def __call__(self, key: str, *, default: None) -> str | No...
16
0
8
0
8
0
2
0.01
0
10
1
0
10
3
10
10
91
9
82
50
46
1
55
19
44
5
0
3
21
31,009
encode/starlette
starlette/config.py
starlette.config.Environ
from collections.abc import Iterator, Mapping, MutableMapping import os class Environ(MutableMapping[str, str]): def __init__(self, environ: MutableMapping[str, str]=os.environ): self._environ = environ self._has_been_read: set[str] = set() def __getitem__(self, key: str) -> str: self...
class Environ(MutableMapping[str, str]): def __init__(self, environ: MutableMapping[str, str]=os.environ): pass def __getitem__(self, key: str) -> str: pass def __setitem__(self, key: str, value: str) -> None: pass def __delitem__(self, key: str) -> None: pass d...
7
0
3
0
3
0
1
0
1
4
1
0
6
2
6
6
24
5
19
9
12
0
19
9
12
2
1
1
8
31,010
encode/starlette
starlette/config.py
starlette.config.EnvironError
class EnvironError(Exception): pass
class EnvironError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
2
0
2
1
1
0
2
1
1
0
3
0
0
31,011
encode/starlette
starlette/config.py
starlette.config.undefined
class undefined: pass
class undefined: pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
0
0
0
31,012
encode/starlette
starlette/convertors.py
starlette.convertors.Convertor
from typing import Any, ClassVar, Generic, TypeVar class Convertor(Generic[T]): regex: ClassVar[str] = '' def convert(self, value: str) -> T: raise NotImplementedError() def to_string(self, value: T) -> str: raise NotImplementedError()
class Convertor(Generic[T]): def convert(self, value: str) -> T: pass def to_string(self, value: T) -> str: pass
3
0
2
0
2
1
1
0.33
1
2
0
6
2
0
2
4
8
2
6
4
3
2
6
4
3
1
1
0
2
31,013
encode/starlette
starlette/convertors.py
starlette.convertors.FloatConvertor
import math class FloatConvertor(Convertor[float]): regex = '[0-9]+(\\.[0-9]+)?' def convert(self, value: str) -> float: return float(value) def to_string(self, value: float) -> str: value = float(value) assert value >= 0.0, 'Negative floats are not supported' assert not m...
class FloatConvertor(Convertor[float]): def convert(self, value: str) -> float: pass def to_string(self, value: float) -> str: pass
3
0
4
0
4
0
1
0
1
2
0
0
2
0
2
6
12
2
10
4
7
0
10
4
7
1
2
0
2
31,014
encode/starlette
starlette/convertors.py
starlette.convertors.IntegerConvertor
class IntegerConvertor(Convertor[int]): regex = '[0-9]+' def convert(self, value: str) -> int: return int(value) def to_string(self, value: int) -> str: value = int(value) assert value >= 0, 'Negative integers are not supported' return str(value)
class IntegerConvertor(Convertor[int]): def convert(self, value: str) -> int: pass def to_string(self, value: int) -> str: pass
3
0
3
0
3
0
1
0
1
2
0
0
2
0
2
6
10
2
8
4
5
0
8
4
5
1
2
0
2
31,015
encode/starlette
starlette/convertors.py
starlette.convertors.PathConvertor
class PathConvertor(Convertor[str]): regex = '.*' def convert(self, value: str) -> str: return str(value) def to_string(self, value: str) -> str: return str(value)
class PathConvertor(Convertor[str]): def convert(self, value: str) -> str: pass def to_string(self, value: str) -> str: pass
3
0
2
0
2
0
1
0
1
1
0
0
2
0
2
6
8
2
6
4
3
0
6
4
3
1
2
0
2
31,016
encode/starlette
starlette/convertors.py
starlette.convertors.StringConvertor
class StringConvertor(Convertor[str]): regex = '[^/]+' def convert(self, value: str) -> str: return value def to_string(self, value: str) -> str: value = str(value) assert '/' not in value, 'May not contain path separators' assert value, 'Must not be empty' return v...
class StringConvertor(Convertor[str]): def convert(self, value: str) -> str: pass def to_string(self, value: str) -> str: pass
3
0
4
0
4
0
1
0
1
1
0
0
2
0
2
6
11
2
9
4
6
0
9
4
6
1
2
0
2
31,017
encode/starlette
starlette/convertors.py
starlette.convertors.UUIDConvertor
import uuid class UUIDConvertor(Convertor[uuid.UUID]): regex = '[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}' def convert(self, value: str) -> uuid.UUID: return uuid.UUID(value) def to_string(self, value: uuid.UUID) -> str: return str(value)
class UUIDConvertor(Convertor[uuid.UUID]): def convert(self, value: str) -> uuid.UUID: pass def to_string(self, value: uuid.UUID) -> str: pass
3
0
2
0
2
0
1
0
1
2
0
0
2
0
2
6
8
2
6
4
3
0
6
4
3
1
2
0
2
31,018
encode/starlette
starlette/datastructures.py
starlette.datastructures.Address
from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast class Address(NamedTuple): host: str port: int
class Address(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
31,019
encode/starlette
starlette/datastructures.py
starlette.datastructures.CommaSeparatedStrings
from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, MutableMapping, Sequence, ValuesView from shlex import shlex class CommaSeparatedStrings(Sequence[str]): def __init__(self, value: str | Sequence[str]): if isins...
class CommaSeparatedStrings(Sequence[str]): def __init__(self, value: str | Sequence[str]): pass def __len__(self) -> int: pass def __getitem__(self, index: int | slice) -> Any: pass def __iter__(self) -> Iterator[str]: pass def __repr__(self) -> str: pa...
7
0
3
0
3
0
1
0
1
6
0
0
6
1
6
6
26
5
21
11
14
0
20
11
13
2
1
1
7
31,020
encode/starlette
starlette/datastructures.py
starlette.datastructures.FormData
from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, MutableMapping, Sequence, ValuesView class FormData(ImmutableMultiDict[str, Union[UploadFile, str]]): """ An immutable multidict, containing both file uploads and tex...
class FormData(ImmutableMultiDict[str, Union[UploadFile, str]]): ''' An immutable multidict, containing both file uploads and text input. ''' def __init__(self, *args: FormData | Mapping[str, str | UploadFile] | list[tuple[str, str | UploadFile]], **kwargs: str | UploadFile) -> None: pass ...
3
1
5
0
5
0
2
0.27
1
5
1
0
2
0
2
14
16
2
11
8
4
3
7
4
4
3
2
2
4
31,021
encode/starlette
starlette/datastructures.py
starlette.datastructures.Headers
from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, MutableMapping, Sequence, ValuesView from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast class Headers(Mapping[str, str]): """ An immutable, case-insensitive multidict. """ def __init__(self, headers: Mapping[...
class Headers(Mapping[str, str]): ''' An immutable, case-insensitive multidict. ''' def __init__(self, headers: Mapping[str, str] | None=None, raw: list[tuple[bytes, bytes]] | None=None, scope: MutableMapping[str, Any] | None=None) -> None: pass @property def raw(self) -> list[tuple[by...
15
1
4
0
4
0
2
0.14
1
10
1
1
13
1
13
13
75
13
57
31
37
8
49
22
35
4
1
2
22
31,022
encode/starlette
starlette/datastructures.py
starlette.datastructures.ImmutableMultiDict
from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, MutableMapping, Sequence, ValuesView from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast class ImmutableMultiDict(Mapping[_KeyType, _CovariantValueType]): _dict: dict[_KeyType, _CovariantValueType] def __init__(self, ...
class ImmutableMultiDict(Mapping[_KeyType, _CovariantValueType]): def __init__(self, *args: ImmutableMultiDict[_KeyType, _CovariantValueType] | Mapping[_KeyType, _CovariantValueType] | Iterable[tuple[_KeyType, _CovariantValueType]], **kwargs: Any) -> None: pass def getlist(self, key: Any) -> list[_Co...
13
0
4
0
4
0
2
0
1
6
0
3
12
1
12
12
67
15
52
25
33
0
43
18
30
6
1
1
18
31,023
encode/starlette
starlette/datastructures.py
starlette.datastructures.MultiDict
from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, MutableMapping, Sequence, ValuesView class MultiDict(ImmutableMultiDict[Any, Any]): def __setitem__(self, key: Any, value: Any) -> None: self.setlist(key, [value...
class MultiDict(ImmutableMultiDict[Any, Any]): def __setitem__(self, key: Any, value: Any) -> None: pass def __delitem__(self, key: Any) -> None: pass def pop(self, key: Any, default: Any=None) -> Any: pass def popitem(self) -> tuple[Any, Any]: pass def poplist(...
11
0
4
0
4
0
1
0
1
3
0
0
10
1
10
22
54
10
44
21
29
0
39
17
28
2
2
1
12
31,024
encode/starlette
starlette/datastructures.py
starlette.datastructures.MutableHeaders
from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, MutableMapping, Sequence, ValuesView class MutableHeaders(Headers): def __setitem__(self, key: str, value: str) -> None: """ Set the header `key` to `value`, removing any duplicate entries. Retains insertion orde...
class MutableHeaders(Headers): def __setitem__(self, key: str, value: str) -> None: ''' Set the header `key` to `value`, removing any duplicate entries. Retains insertion order. ''' pass def __delitem__(self, key: str) -> None: ''' Remove the header `ke...
11
4
8
1
6
2
2
0.25
1
8
0
0
9
0
9
22
85
14
57
26
46
14
55
25
45
5
2
2
22
31,025
encode/starlette
starlette/datastructures.py
starlette.datastructures.QueryParams
from urllib.parse import SplitResult, parse_qsl, urlencode, urlsplit from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, MutableMapping, Sequence, ValuesView class QueryParams(ImmutableMultiDict[str, str]): """ An immu...
class QueryParams(ImmutableMultiDict[str, str]): ''' An immutable multidict. ''' def __init__(self, *args: ImmutableMultiDict[Any, Any] | Mapping[Any, Any] | list[tuple[Any, Any]] | str | bytes, **kwargs: Any) -> None: pass def __str__(self) -> str: pass def __repr__(self) ->...
4
1
9
1
8
0
2
0.15
1
6
0
0
3
2
3
15
34
5
26
17
14
4
16
9
12
4
2
1
6
31,026
encode/starlette
starlette/datastructures.py
starlette.datastructures.Secret
class Secret: """ Holds a string value that should not be revealed in tracebacks etc. You should cast the value to `str` at the point it is required. """ def __init__(self, value: str): self._value = value def __repr__(self) -> str: class_name = self.__class__.__name__ ...
class Secret: ''' Holds a string value that should not be revealed in tracebacks etc. You should cast the value to `str` at the point it is required. ''' def __init__(self, value: str): pass def __repr__(self) -> str: pass def __str__(self) -> str: pass def __...
5
1
2
0
2
0
1
0.4
0
2
0
0
4
1
4
4
18
4
10
7
5
4
10
7
5
1
0
0
4
31,027
encode/starlette
starlette/datastructures.py
starlette.datastructures.State
from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast class State: """ An object that can be used to store arbitrary state. Used for `request.state` and `app.state`. """ _state: dict[str, Any] def __init__(self, state: dict[str, Any] | None=None): if state is None: ...
class State: ''' An object that can be used to store arbitrary state. Used for `request.state` and `app.state`. ''' def __init__(self, state: dict[str, Any] | None=None): pass def __setattr__(self, key: Any, value: Any) -> None: pass def __getattr__(self, key: Any) -> Any...
5
1
4
0
4
0
2
0.25
0
6
0
0
4
0
4
4
26
6
16
6
11
4
16
6
11
2
0
1
6
31,028
encode/starlette
starlette/datastructures.py
starlette.datastructures.URL
from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast from collections.abc import ItemsView, Iterable, Iterator, KeysView, Mapping, MutableMapping, Sequence, ValuesView from starlette.types import Scope from urllib.parse import SplitResult, parse_qsl, urlencode, urlsplit class URL: def __init__(self,...
null
31
0
6
0
6
0
2
0
0
6
1
0
19
2
19
19
145
27
118
61
82
0
98
45
78
9
0
3
37
31,029
encode/starlette
starlette/datastructures.py
starlette.datastructures.URLPath
class URLPath(str): """ A URL path string that may also hold an associated protocol and/or host. Used by the routing to return `url_path_for` matches. """ def __new__(cls, path: str, protocol: str='', host: str='') -> URLPath: assert protocol in ('http', 'websocket', '') return str....
class URLPath(str): ''' A URL path string that may also hold an associated protocol and/or host. Used by the routing to return `url_path_for` matches. ''' def __new__(cls, path: str, protocol: str='', host: str='') -> URLPath: pass def __init__(self, path: str, protocol: str='', host: ...
4
1
7
0
6
0
2
0.2
1
1
1
0
3
2
3
69
28
4
20
9
16
4
16
9
12
3
2
1
5
31,030
encode/starlette
starlette/datastructures.py
starlette.datastructures.UploadFile
from starlette.concurrency import run_in_threadpool from typing import Any, BinaryIO, NamedTuple, TypeVar, Union, cast class UploadFile: """ An uploaded file included as part of the request data. """ def __init__(self, file: BinaryIO, *, size: int | None=None, filename: str | None=None, headers: Heade...
class UploadFile: ''' An uploaded file included as part of the request data. ''' def __init__(self, file: BinaryIO, *, size: int | None=None, filename: str | None=None, headers: Headers | None=None) -> None: pass @property def content_type(self) -> str | None: pass @propert...
12
1
5
0
5
0
2
0.09
0
6
1
0
8
4
8
8
56
9
43
23
25
4
31
14
22
3
0
1
13
31,031
encode/starlette
starlette/endpoints.py
starlette.endpoints.HTTPEndpoint
from collections.abc import Generator from starlette.requests import Request from starlette.concurrency import run_in_threadpool from starlette.responses import PlainTextResponse, Response from starlette.types import Message, Receive, Scope, Send from starlette._utils import is_async_callable from typing import Any, Ca...
class HTTPEndpoint: def __init__(self, scope: Scope, receive: Receive, send: Send) -> None: pass def __await__(self) -> Generator[Any, None, None]: pass async def dispatch(self) -> None: pass async def method_not_allowed(self, request: Request) -> Response: pass
5
0
8
0
7
1
2
0.11
0
5
4
4
4
4
4
4
35
4
28
15
23
3
23
15
18
3
0
1
7
31,032
encode/starlette
starlette/endpoints.py
starlette.endpoints.WebSocketEndpoint
from starlette.types import Message, Receive, Scope, Send from collections.abc import Generator from starlette.websockets import WebSocket import json from starlette import status from typing import Any, Callable class WebSocketEndpoint: encoding: str | None = None def __init__(self, scope: Scope, receive: Re...
class WebSocketEndpoint: def __init__(self, scope: Scope, receive: Receive, send: Send) -> None: pass def __await__(self) -> Generator[Any, None, None]: pass async def dispatch(self) -> None: pass async def decode(self, websocket: WebSocket, message: Message) -> Any: ...
8
3
9
1
7
1
3
0.09
0
5
1
7
7
3
7
7
70
13
54
18
46
5
49
17
41
9
0
3
19
31,033
encode/starlette
starlette/exceptions.py
starlette.exceptions.HTTPException
import http from collections.abc import Mapping class HTTPException(Exception): def __init__(self, status_code: int, detail: str | None=None, headers: Mapping[str, str] | None=None) -> None: if detail is None: detail = http.HTTPStatus(status_code).phrase self.status_code = status_code ...
class HTTPException(Exception): def __init__(self, status_code: int, detail: str | None=None, headers: Mapping[str, str] | None=None) -> None: pass def __str__(self) -> str: pass def __repr__(self) -> str: pass
4
0
4
0
4
0
1
0
1
4
0
2
3
3
3
13
14
2
12
8
8
0
12
8
8
2
3
1
4
31,034
encode/starlette
starlette/exceptions.py
starlette.exceptions.WebSocketException
class WebSocketException(Exception): def __init__(self, code: int, reason: str | None=None) -> None: self.code = code self.reason = reason or '' def __str__(self) -> str: return f'{self.code}: {self.reason}' def __repr__(self) -> str: class_name = self.__class__.__name__ ...
class WebSocketException(Exception): def __init__(self, code: int, reason: str | None=None) -> None: pass def __str__(self) -> str: pass def __repr__(self) -> str: pass
4
0
3
0
3
0
1
0
1
2
0
1
3
2
3
13
11
2
9
7
5
0
9
7
5
1
3
0
3
31,035
encode/starlette
starlette/formparsers.py
starlette.formparsers.FormMessage
from enum import Enum class FormMessage(Enum): FIELD_START = 1 FIELD_NAME = 2 FIELD_DATA = 3 FIELD_END = 4 END = 5
class FormMessage(Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
6
0
6
6
5
0
6
6
5
0
4
0
0
31,036
encode/starlette
starlette/formparsers.py
starlette.formparsers.FormParser
from urllib.parse import unquote_plus from collections.abc import AsyncGenerator from starlette.datastructures import FormData, Headers, UploadFile class FormParser: def __init__(self, headers: Headers, stream: AsyncGenerator[bytes, None]) -> None: assert multipart is not None, 'The `python-multipart` lib...
class FormParser: def __init__(self, headers: Headers, stream: AsyncGenerator[bytes, None]) -> None: pass def on_field_start(self) -> None: pass def on_field_name(self, data: bytes, start: int, end: int) -> None: pass def on_field_data(self, data: bytes, start: int, end: int...
8
0
8
1
7
0
2
0.06
0
9
4
0
7
3
7
7
66
10
53
26
45
3
43
26
35
8
0
3
14
31,037
encode/starlette
starlette/formparsers.py
starlette.formparsers.MultiPartException
class MultiPartException(Exception): def __init__(self, message: str) -> None: self.message = message
class MultiPartException(Exception): def __init__(self, message: str) -> None: pass
2
0
2
0
2
0
1
0
1
1
0
0
1
1
1
11
3
0
3
3
1
0
3
3
1
1
3
0
1
31,038
encode/starlette
starlette/formparsers.py
starlette.formparsers.MultiPartParser
from collections.abc import AsyncGenerator from tempfile import SpooledTemporaryFile from dataclasses import dataclass, field from starlette.datastructures import FormData, Headers, UploadFile class MultiPartParser: spool_max_size = 1024 * 1024 'The maximum size of the spooled temporary file used to store file...
class MultiPartParser: def __init__(self, headers: Headers, stream: AsyncGenerator[bytes, None], *, max_files: int | float=1000, max_fields: int | float=1000, max_part_size: int=1024 * 1024) -> None: pass def on_part_begin(self) -> None: pass def on_part_data(self, data: bytes, start: in...
11
0
14
0
12
2
3
0.15
0
13
5
0
10
15
10
10
149
13
123
49
104
18
93
40
82
8
0
3
25
31,039
encode/starlette
starlette/formparsers.py
starlette.formparsers.MultipartPart
from dataclasses import dataclass, field from starlette.datastructures import FormData, Headers, UploadFile @dataclass class MultipartPart: content_disposition: bytes | None = None field_name: str = '' data: bytearray = field(default_factory=bytearray) file: UploadFile | None = None item_headers: l...
@dataclass class MultipartPart: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
6
6
5
0
6
6
5
0
0
0
0
31,040
encode/starlette
starlette/middleware/__init__.py
starlette.middleware.Middleware
from typing import Any, Protocol from collections.abc import Iterator class Middleware: def __init__(self, cls: _MiddlewareFactory[P], *args: P.args, **kwargs: P.kwargs) -> None: self.cls = cls self.args = args self.kwargs = kwargs def __iter__(self) -> Iterator[Any]: as_tuple...
class Middleware: def __init__(self, cls: _MiddlewareFactory[P], *args: P.args, **kwargs: P.kwargs) -> None: pass def __iter__(self) -> Iterator[Any]: pass def __repr__(self) -> str: pass
4
0
6
0
6
0
1
0
0
4
1
0
3
3
3
3
22
2
20
18
11
0
15
13
11
1
0
0
3
31,041
encode/starlette
starlette/middleware/__init__.py
starlette.middleware._MiddlewareFactory
from starlette.types import ASGIApp from typing import Any, Protocol class _MiddlewareFactory(Protocol[P]): def __call__(self, app: ASGIApp, /, *args: P.args, **kwargs: P.kwargs) -> ASGIApp: ...
class _MiddlewareFactory(Protocol[P]): def __call__(self, app: ASGIApp, /, *args: P.args, **kwargs: P.kwargs) -> ASGIApp: pass
2
0
1
0
1
1
1
0.5
1
0
0
0
1
0
1
25
2
0
2
2
1
1
3
2
1
1
5
0
1
31,042
encode/starlette
starlette/middleware/authentication.py
starlette.middleware.authentication.AuthenticationMiddleware
from starlette.types import ASGIApp, Receive, Scope, Send from starlette.responses import PlainTextResponse, Response from typing import Callable from starlette.authentication import AuthCredentials, AuthenticationBackend, AuthenticationError, UnauthenticatedUser from starlette.requests import HTTPConnection class Aut...
class AuthenticationMiddleware: def __init__(self, app: ASGIApp, backend: AuthenticationBackend, on_error: Callable[[HTTPConnection, AuthenticationError], Response] | None=None) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass @staticmethod ...
5
0
11
1
10
0
3
0
0
9
7
0
2
3
3
3
37
4
33
17
23
0
24
10
20
5
0
2
8
31,043
encode/starlette
starlette/middleware/base.py
starlette.middleware.base.BaseHTTPMiddleware
from starlette.types import ASGIApp, Message, Receive, Scope, Send from starlette.requests import ClientDisconnect, Request from collections.abc import AsyncGenerator, AsyncIterable, Awaitable, Mapping, MutableMapping import anyio from typing import Any, Callable, TypeVar, Union from starlette._utils import collapse_ex...
class BaseHTTPMiddleware: def __init__(self, app: ASGIApp, dispatch: DispatchFunction | None=None) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass async def call_next(request: Request) -> Response: pass async def r...
10
0
23
4
18
0
2
0.03
0
7
3
24
3
2
3
3
93
20
72
30
61
2
72
27
61
5
0
2
22
31,044
encode/starlette
starlette/middleware/base.py
starlette.middleware.base._CachedRequest
from starlette.requests import ClientDisconnect, Request from starlette.types import ASGIApp, Message, Receive, Scope, Send class _CachedRequest(Request): """ If the user calls Request.body() from their dispatch function we cache the entire request body in memory and pass that to downstream middlewares, ...
class _CachedRequest(Request): ''' If the user calls Request.body() from their dispatch function we cache the entire request body in memory and pass that to downstream middlewares, but if they call Request.stream() then all we do is send an empty body so that downstream things don't hang forever. ...
3
1
33
1
22
11
5
0.6
1
2
0
0
2
3
2
2
74
3
45
9
42
27
31
9
28
8
1
2
9
31,045
encode/starlette
starlette/middleware/base.py
starlette.middleware.base._StreamingResponse
from typing import Any, Callable, TypeVar, Union from starlette.types import ASGIApp, Message, Receive, Scope, Send from starlette.responses import Response from collections.abc import AsyncGenerator, AsyncIterable, Awaitable, Mapping, MutableMapping class _StreamingResponse(Response): def __init__(self, content:...
class _StreamingResponse(Response): def __init__(self, content: AsyncContentStream, status_code: int=200, headers: Mapping[str, str] | None=None, media_type: str | None=None, info: Mapping[str, Any] | None=None) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> Non...
3
0
16
2
15
0
3
0
1
3
0
0
2
5
2
9
34
4
30
16
20
0
17
9
14
4
1
1
5
31,046
encode/starlette
starlette/middleware/cors.py
starlette.middleware.cors.CORSMiddleware
from collections.abc import Sequence import functools from starlette.responses import PlainTextResponse, Response import re from starlette.datastructures import Headers, MutableHeaders from starlette.types import ASGIApp, Message, Receive, Scope, Send class CORSMiddleware: def __init__(self, app: ASGIApp, allow_o...
class CORSMiddleware: def __init__(self, app: ASGIApp, allow_origins: Sequence[str]=(), allow_methods: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass def is_allowed_origin(self, origin: str) -> bool: pass def preflight_response(self, ...
9
0
21
3
17
2
4
0.11
0
10
4
0
6
10
7
7
158
27
119
49
100
13
99
38
91
9
0
3
31
31,047
encode/starlette
starlette/middleware/errors.py
starlette.middleware.errors.ServerErrorMiddleware
import html from starlette._utils import is_async_callable from starlette.requests import Request import traceback from starlette.concurrency import run_in_threadpool from starlette.types import ASGIApp, ExceptionHandler, Message, Receive, Scope, Send from starlette.responses import HTMLResponse, PlainTextResponse, Res...
class ServerErrorMiddleware: ''' Handles returning 500 responses when a server error occurs. If 'debug' is set, then traceback responses will be returned, otherwise the designated 'handler' will be called. This middleware class should generally be used to wrap *everything* else up, so that unha...
10
1
13
2
10
2
3
0.27
0
13
3
0
8
3
8
8
133
23
90
36
74
24
63
30
52
7
0
3
23
31,048
encode/starlette
starlette/middleware/exceptions.py
starlette.middleware.exceptions.ExceptionMiddleware
from starlette.types import ASGIApp, ExceptionHandler, Receive, Scope, Send from starlette._exception_handler import ExceptionHandlers, StatusHandlers, wrap_app_handling_exceptions from collections.abc import Mapping from starlette.requests import Request from starlette.exceptions import HTTPException, WebSocketExcepti...
class ExceptionMiddleware: def __init__(self, app: ASGIApp, handlers: Mapping[Any, ExceptionHandler] | None=None, debug: bool=False) -> None: pass def add_exception_handler(self, exc_class_or_status_code: int | type[Exception], handler: ExceptionHandler) -> None: pass async def __call__(...
6
0
10
1
10
1
2
0.06
0
10
5
0
5
4
5
5
56
7
49
20
34
3
32
11
26
3
0
2
11
31,049
encode/starlette
starlette/middleware/gzip.py
starlette.middleware.gzip.GZipMiddleware
from starlette.datastructures import Headers, MutableHeaders from starlette.types import ASGIApp, Message, Receive, Scope, Send class GZipMiddleware: def __init__(self, app: ASGIApp, minimum_size: int=500, compresslevel: int=9) -> None: self.app = app self.minimum_size = minimum_size self....
class GZipMiddleware: def __init__(self, app: ASGIApp, minimum_size: int=500, compresslevel: int=9) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass
3
0
6
0
6
1
2
0.08
0
3
2
0
2
3
2
2
14
1
13
8
10
1
13
8
10
3
0
2
4
31,050
encode/starlette
starlette/middleware/gzip.py
starlette.middleware.gzip.GZipResponder
import gzip from starlette.types import ASGIApp, Message, Receive, Scope, Send import io class GZipResponder(IdentityResponder): content_encoding = 'gzip' def __init__(self, app: ASGIApp, minimum_size: int, compresslevel: int=9) -> None: super().__init__(app, minimum_size) self.gzip_buffer = i...
class GZipResponder(IdentityResponder): def __init__(self, app: ASGIApp, minimum_size: int, compresslevel: int=9) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass def apply_compression(self, body: bytes, *, more_body: bool) -> bytes: ...
4
0
26
3
21
2
4
0.11
0
5
2
0
3
8
3
3
80
10
64
16
60
7
59
16
55
9
0
2
11
31,051
encode/starlette
starlette/middleware/httpsredirect.py
starlette.middleware.httpsredirect.HTTPSRedirectMiddleware
from starlette.responses import RedirectResponse from starlette.types import ASGIApp, Receive, Scope, Send from starlette.datastructures import URL class HTTPSRedirectMiddleware: def __init__(self, app: ASGIApp) -> None: self.app = app async def __call__(self, scope: Scope, receive: Receive, send: Se...
class HTTPSRedirectMiddleware: def __init__(self, app: ASGIApp) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass
3
0
6
0
6
0
2
0
0
2
2
0
2
1
2
2
14
1
13
8
10
0
12
8
9
3
0
1
4
31,052
encode/starlette
starlette/middleware/sessions.py
starlette.middleware.sessions.SessionMiddleware
import itsdangerous from base64 import b64decode, b64encode import json from starlette.requests import HTTPConnection from typing import Literal from starlette.types import ASGIApp, Message, Receive, Scope, Send from itsdangerous.exc import BadSignature from starlette.datastructures import MutableHeaders, Secret class...
class SessionMiddleware: def __init__(self, app: ASGIApp, secret_key: str | Secret, session_cookie: str='session', max_age: int | None=14 * 24 * 60 * 60, path: str='/', same_site: Literal['lax', 'strict', 'none']='lax', https_only: bool=False, domain: str | None=None) -> None: pass async def __call__...
4
0
32
1
29
2
4
0.08
0
6
3
0
2
6
2
2
71
5
64
26
50
5
40
16
36
5
0
2
12
31,053
encode/starlette
starlette/middleware/trustedhost.py
starlette.middleware.trustedhost.TrustedHostMiddleware
from collections.abc import Sequence from starlette.types import ASGIApp, Receive, Scope, Send from starlette.responses import PlainTextResponse, RedirectResponse, Response from starlette.datastructures import URL, Headers class TrustedHostMiddleware: def __init__(self, app: ASGIApp, allowed_hosts: Sequence[str] ...
class TrustedHostMiddleware: def __init__(self, app: ASGIApp, allowed_hosts: Sequence[str] | None=None, www_redirect: bool=True) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass
3
0
24
2
22
1
6
0.02
0
8
5
0
2
4
2
2
49
4
45
20
37
1
34
15
31
7
0
2
11
31,054
encode/starlette
starlette/middleware/wsgi.py
starlette.middleware.wsgi.WSGIMiddleware
from starlette.types import Receive, Scope, Send from typing import Any, Callable class WSGIMiddleware: def __init__(self, app: Callable[..., Any]) -> None: self.app = app async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: assert scope['type'] == 'http' resp...
class WSGIMiddleware: def __init__(self, app: Callable[..., Any]) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass
3
0
3
0
3
0
1
0
0
2
1
0
2
1
2
2
8
1
7
5
4
0
7
5
4
1
0
0
2
31,055
encode/starlette
starlette/middleware/wsgi.py
starlette.middleware.wsgi.WSGIResponder
from typing import Any, Callable import math from starlette.types import Receive, Scope, Send from anyio.abc import ObjectReceiveStream, ObjectSendStream from collections.abc import MutableMapping import anyio class WSGIResponder: stream_send: ObjectSendStream[MutableMapping[str, Any]] stream_receive: ObjectRe...
class WSGIResponder: def __init__(self, app: Callable[..., Any], scope: Scope) -> None: pass async def __call__(self, receive: Receive, send: Send) -> None: pass async def sender(self, send: Send) -> None: pass def start_response(self, status: str, response_headers: list[tup...
6
0
12
0
12
0
2
0.02
0
6
0
0
5
6
5
5
70
7
63
31
48
1
41
21
35
3
0
2
10
31,056
encode/starlette
starlette/requests.py
starlette.requests.ClientDisconnect
class ClientDisconnect(Exception): pass
class ClientDisconnect(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
2
0
2
1
1
0
2
1
1
0
3
0
0
31,057
encode/starlette
starlette/requests.py
starlette.requests.HTTPConnection
from collections.abc import AsyncGenerator, Iterator, Mapping from http import cookies as http_cookies from typing import TYPE_CHECKING, Any, NoReturn, cast from starlette.types import Message, Receive, Scope, Send from starlette.datastructures import URL, Address, FormData, Headers, QueryParams, State class HTTPConne...
class HTTPConnection(Mapping[str, Any]): ''' A base class for incoming HTTP connections, that is used to provide any functionality that is common to both `Request` and `WebSocket`. ''' def __init__(self, scope: Scope, receive: Receive | None=None) -> None: pass def __getitem__(self, k...
30
1
5
0
4
1
2
0.2
1
12
7
1
17
7
17
17
118
19
85
47
55
17
73
35
55
3
1
2
27
31,058
encode/starlette
starlette/requests.py
starlette.requests.Request
import anyio from starlette.exceptions import HTTPException from starlette._utils import AwaitableOrContextManager, AwaitableOrContextManagerWrapper from typing import TYPE_CHECKING, Any, NoReturn, cast from collections.abc import AsyncGenerator, Iterator, Mapping import json from starlette.formparsers import FormParse...
class Request(HTTPConnection): def __init__(self, scope: Scope, receive: Receive=empty_receive, send: Send=empty_send): pass @property def method(self) -> str: pass @property def receive(self) -> Receive: pass async def stream(self) -> AsyncGenerator[bytes, None]: ...
14
0
10
0
10
0
3
0.05
1
16
6
0
11
7
11
28
125
14
110
48
84
5
83
31
71
8
2
4
32
31,059
encode/starlette
starlette/responses.py
starlette.responses.FileResponse
import os from email.utils import format_datetime, formatdate from starlette.types import Receive, Scope, Send from mimetypes import guess_type from starlette.background import BackgroundTask import anyio.to_thread import warnings from urllib.parse import quote from secrets import token_hex from starlette.datastructure...
class FileResponse(Response): def __init__(self, path: str | os.PathLike[str], status_code: int=200, headers: Mapping[str, str] | None=None, media_type: str | None=None, background: BackgroundTask | None=None, filename: str | None=None, stat_result: os.stat_result | None=None, method: str | None=None, content_dis...
11
1
26
2
23
2
5
0.11
1
18
5
1
8
6
9
16
248
24
206
78
170
22
142
48
132
13
1
4
41
31,060
encode/starlette
starlette/responses.py
starlette.responses.HTMLResponse
class HTMLResponse(Response): media_type = 'text/html'
class HTMLResponse(Response): pass
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
7
2
0
2
2
1
0
2
2
1
0
1
0
0
31,061
encode/starlette
starlette/responses.py
starlette.responses.JSONResponse
from starlette.background import BackgroundTask from collections.abc import AsyncIterable, Awaitable, Iterable, Mapping, Sequence from typing import Any, Callable, Literal, Union import json class JSONResponse(Response): media_type = 'application/json' def __init__(self, content: Any, status_code: int=200, he...
class JSONResponse(Response): def __init__(self, content: Any, status_code: int=200, headers: Mapping[str, str] | None=None, media_type: str | None=None, background: BackgroundTask | None=None) -> None: pass def render(self, content: Any) -> bytes: pass
3
0
9
0
9
0
1
0
1
6
1
0
2
0
2
9
21
2
19
11
9
0
6
4
3
1
1
0
2
31,062
encode/starlette
starlette/responses.py
starlette.responses.MalformedRangeHeader
class MalformedRangeHeader(Exception): def __init__(self, content: str='Malformed range header.') -> None: self.content = content
class MalformedRangeHeader(Exception): def __init__(self, content: str='Malformed range header.') -> None: pass
2
0
2
0
2
0
1
0
1
1
0
0
1
1
1
11
3
0
3
3
1
0
3
3
1
1
3
0
1
31,063
encode/starlette
starlette/responses.py
starlette.responses.PlainTextResponse
class PlainTextResponse(Response): media_type = 'text/plain'
class PlainTextResponse(Response): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
7
2
0
2
2
1
0
2
2
1
0
1
0
0
31,064
encode/starlette
starlette/responses.py
starlette.responses.RangeNotSatisfiable
class RangeNotSatisfiable(Exception): def __init__(self, max_size: int) -> None: self.max_size = max_size
class RangeNotSatisfiable(Exception): def __init__(self, max_size: int) -> None: pass
2
0
2
0
2
0
1
0
1
1
0
0
1
1
1
11
3
0
3
3
1
0
3
3
1
1
3
0
1
31,065
encode/starlette
starlette/responses.py
starlette.responses.RedirectResponse
from starlette.background import BackgroundTask from collections.abc import AsyncIterable, Awaitable, Iterable, Mapping, Sequence from urllib.parse import quote from starlette.datastructures import URL, Headers, MutableHeaders class RedirectResponse(Response): def __init__(self, url: str | URL, status_code: int=3...
class RedirectResponse(Response): def __init__(self, url: str | URL, status_code: int=307, headers: Mapping[str, str] | None=None, background: BackgroundTask | None=None) -> None: pass
2
0
9
0
9
1
1
0.1
1
5
2
0
1
0
1
8
10
0
10
8
2
1
4
2
2
1
1
0
1
31,066
encode/starlette
starlette/responses.py
starlette.responses.Response
from starlette.datastructures import URL, Headers, MutableHeaders from typing import Any, Callable, Literal, Union import http.cookies from email.utils import format_datetime, formatdate import sys from starlette.types import Receive, Scope, Send from datetime import datetime from collections.abc import AsyncIterable, ...
class Response: def __init__(self, content: Any=None, status_code: int=200, headers: Mapping[str, str] | None=None, media_type: str | None=None, background: BackgroundTask | None=None) -> None: pass def render(self, content: Any) -> bytes | memoryview: pass def init_headers(self, headers...
9
0
17
1
17
0
4
0.01
0
13
2
9
7
5
7
7
132
11
121
52
86
1
69
25
61
9
0
2
25
31,067
encode/starlette
starlette/responses.py
starlette.responses.StreamingResponse
from typing import Any, Callable, Literal, Union import anyio from starlette.requests import ClientDisconnect from starlette.background import BackgroundTask from starlette.types import Receive, Scope, Send from starlette._utils import collapse_excgroups from starlette.concurrency import iterate_in_threadpool from func...
class StreamingResponse(Response): def __init__(self, content: ContentStream, status_code: int=200, headers: Mapping[str, str] | None=None, media_type: str | None=None, background: BackgroundTask | None=None) -> None: pass async def listen_for_disconnect(self, receive: Receive) -> None: pass ...
6
0
12
1
11
0
3
0
1
9
1
0
4
3
4
11
61
9
52
20
39
0
37
12
31
4
1
2
14
31,068
encode/starlette
starlette/routing.py
starlette.routing.BaseRoute
from starlette.types import ASGIApp, Lifespan, Receive, Scope, Send from starlette.websockets import WebSocket, WebSocketClose from starlette.datastructures import URL, Headers, URLPath from starlette.responses import PlainTextResponse, RedirectResponse, Response from typing import Any, Callable, TypeVar class BaseRou...
class BaseRoute: def matches(self, scope: Scope) -> tuple[Match, Scope]: pass def url_path_for(self, name: str, /, **path_params: Any) -> URLPath: pass async def handle(self, scope: Scope, receive: Receive, send: Send) -> None: pass async def __call__(self, scope: Scope, rec...
5
1
6
0
5
2
2
0.47
0
8
4
4
4
0
4
4
28
4
19
8
14
9
18
8
13
4
0
2
7
31,069
encode/starlette
starlette/routing.py
starlette.routing.Host
from starlette.types import ASGIApp, Lifespan, Receive, Scope, Send from typing import Any, Callable, TypeVar from starlette.datastructures import URL, Headers, URLPath class Host(BaseRoute): def __init__(self, host: str, app: ASGIApp, name: str | None=None) -> None: assert not host.startswith('/'), "Host...
class Host(BaseRoute): def __init__(self, host: str, app: ASGIApp, name: str | None=None) -> None: pass @property def routes(self) -> list[BaseRoute]: pass def matches(self, scope: Scope) -> tuple[Match, Scope]: pass def url_path_for(self, name: str, /, **path_params: Any...
9
0
7
0
7
1
2
0.08
1
10
4
0
7
6
7
11
60
6
51
27
42
4
48
26
40
7
1
3
16
31,070
encode/starlette
starlette/routing.py
starlette.routing.Match
from enum import Enum class Match(Enum): NONE = 0 PARTIAL = 1 FULL = 2
class Match(Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
4
0
4
4
3
0
4
4
3
0
4
0
0
31,071
encode/starlette
starlette/routing.py
starlette.routing.Mount
from typing import Any, Callable, TypeVar from starlette.types import ASGIApp, Lifespan, Receive, Scope, Send from collections.abc import Awaitable, Collection, Generator, Sequence from starlette.middleware import Middleware from starlette._utils import get_route_path, is_async_callable from starlette.datastructures im...
class Mount(BaseRoute): def __init__(self, path: str, app: ASGIApp | None=None, routes: Sequence[BaseRoute] | None=None, name: str | None=None, *, middleware: Sequence[Middleware] | None=None) -> None: pass @property def routes(self) -> list[BaseRoute]: pass def matches(self, scope: S...
9
0
13
0
11
2
3
0.18
1
12
5
0
7
7
7
11
98
6
79
39
62
14
62
30
54
8
1
3
20
31,072
encode/starlette
starlette/routing.py
starlette.routing.NoMatchFound
from typing import Any, Callable, TypeVar class NoMatchFound(Exception): """ Raised by `.url_for(name, **path_params)` and `.url_path_for(name, **path_params)` if no matching route exists. """ def __init__(self, name: str, path_params: dict[str, Any]) -> None: params = ', '.join(list(path_...
class NoMatchFound(Exception): ''' Raised by `.url_for(name, **path_params)` and `.url_path_for(name, **path_params)` if no matching route exists. ''' def __init__(self, name: str, path_params: dict[str, Any]) -> None: pass
2
1
3
0
3
0
1
1
1
5
0
0
1
0
1
11
9
1
4
3
2
4
4
3
2
1
3
0
1
31,073
encode/starlette
starlette/routing.py
starlette.routing.Route
from starlette.responses import PlainTextResponse, RedirectResponse, Response import inspect from starlette.types import ASGIApp, Lifespan, Receive, Scope, Send from starlette.exceptions import HTTPException from typing import Any, Callable, TypeVar from collections.abc import Awaitable, Collection, Generator, Sequence...
class Route(BaseRoute): def __init__(self, path: str, endpoint: Callable[..., Any], *, methods: Collection[str] | None=None, name: str | None=None, include_in_schema: bool=True, middleware: Sequence[Middleware] | None=None) -> None: pass def matches(self, scope: Scope) -> tuple[Match, Scope]: ...
7
0
15
1
14
0
4
0.02
1
15
6
0
6
9
6
10
95
11
82
38
66
2
63
29
56
9
1
3
21
31,074
encode/starlette
starlette/routing.py
starlette.routing.Router
from starlette.websockets import WebSocket, WebSocketClose import traceback from typing import Any, Callable, TypeVar from starlette.exceptions import HTTPException from starlette.requests import Request from starlette._utils import get_route_path, is_async_callable from starlette.types import ASGIApp, Lifespan, Receiv...
class Router: def __init__(self, routes: Sequence[BaseRoute] | None=None, redirect_slashes: bool=True, default: ASGIApp | None=None, on_startup: Sequence[Callable[[], Any]] | None=None, on_shutdown: Sequence[Callable[[], Any]] | None=None, lifespan: Lifespan[Any] | None=None, *, middleware: Sequence[Middleware] |...
21
6
15
1
12
3
3
0.21
0
26
17
0
17
7
17
17
297
38
224
78
175
48
142
49
121
12
0
4
54
31,075
encode/starlette
starlette/routing.py
starlette.routing.WebSocketRoute
from starlette._utils import get_route_path, is_async_callable from typing import Any, Callable, TypeVar from collections.abc import Awaitable, Collection, Generator, Sequence import inspect from starlette.middleware import Middleware from starlette.types import ASGIApp, Lifespan, Receive, Scope, Send from starlette.da...
class WebSocketRoute(BaseRoute): def __init__(self, path: str, endpoint: Callable[..., Any], *, name: str | None=None, middleware: Sequence[Middleware] | None=None) -> None: pass def matches(self, scope: Scope) -> tuple[Match, Scope]: pass def url_path_for(self, name: str, /, **path_para...
7
0
10
1
9
0
3
0.04
1
12
4
0
6
7
6
10
64
10
52
29
38
2
44
22
37
6
1
3
15
31,076
encode/starlette
starlette/routing.py
starlette.routing._AsyncLiftContextManager
import types from contextlib import AbstractAsyncContextManager, AbstractContextManager, asynccontextmanager import traceback class _AsyncLiftContextManager(AbstractAsyncContextManager[_T]): def __init__(self, cm: AbstractContextManager[_T]): self._cm = cm async def __aenter__(self) -> _T: re...
class _AsyncLiftContextManager(AbstractAsyncContextManager[_T]): def __init__(self, cm: AbstractContextManager[_T]): pass async def __aenter__(self) -> _T: pass async def __aexit__(self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: types.TracebackType...
4
0
4
0
4
0
1
0
1
3
0
0
3
1
3
3
14
2
12
10
3
0
7
5
3
1
1
0
3
31,077
encode/starlette
starlette/routing.py
starlette.routing._DefaultLifespan
class _DefaultLifespan: def __init__(self, router: Router): self._router = router async def __aenter__(self) -> None: await self._router.startup() async def __aexit__(self, *exc_info: object) -> None: await self._router.shutdown() def __call__(self: _T, app: object) -> _T: ...
class _DefaultLifespan: def __init__(self, router: Router): pass async def __aenter__(self) -> None: pass async def __aexit__(self, *exc_info: object) -> None: pass def __call__(self: _T, app: object) -> _T: pass
5
0
2
0
2
0
1
0
0
2
1
0
4
1
4
4
12
3
9
6
4
0
9
6
4
1
0
0
4
31,078
encode/starlette
starlette/schemas.py
starlette.schemas.BaseSchemaGenerator
from starlette.routing import BaseRoute, Host, Mount, Route from typing import Any, Callable, NamedTuple import inspect from starlette.requests import Request from starlette.responses import Response class BaseSchemaGenerator: def get_schema(self, routes: list[BaseRoute]) -> dict[str, Any]: raise NotImple...
class BaseSchemaGenerator: def get_schema(self, routes: list[BaseRoute]) -> dict[str, Any]: pass def get_endpoints(self, routes: list[BaseRoute]) -> list[EndpointInfo]: ''' Given the routes, yields the following information: - path eg: /users/ - http_method...
6
3
17
2
10
5
3
0.45
0
12
7
1
5
0
5
5
90
14
53
16
47
24
42
16
36
10
0
4
16
31,079
encode/starlette
starlette/schemas.py
starlette.schemas.EndpointInfo
from typing import Any, Callable, NamedTuple class EndpointInfo(NamedTuple): path: str http_method: str func: Callable[..., Any]
class EndpointInfo(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
4
0
4
1
3
0
4
1
3
0
1
0
0
31,080
encode/starlette
starlette/schemas.py
starlette.schemas.OpenAPIResponse
from typing import Any, Callable, NamedTuple from starlette.responses import Response class OpenAPIResponse(Response): media_type = 'application/vnd.oai.openapi' def render(self, content: Any) -> bytes: assert yaml is not None, '`pyyaml` must be installed to use OpenAPIResponse.' assert isinst...
class OpenAPIResponse(Response): def render(self, content: Any) -> bytes: pass
2
0
4
0
4
0
1
0
1
3
0
0
1
0
1
8
7
1
6
3
4
0
6
3
4
1
1
0
1
31,081
encode/starlette
starlette/schemas.py
starlette.schemas.SchemaGenerator
from typing import Any, Callable, NamedTuple from starlette.routing import BaseRoute, Host, Mount, Route class SchemaGenerator(BaseSchemaGenerator): def __init__(self, base_schema: dict[str, Any]) -> None: self.base_schema = base_schema def get_schema(self, routes: list[BaseRoute]) -> dict[str, Any]:...
class SchemaGenerator(BaseSchemaGenerator): def __init__(self, base_schema: dict[str, Any]) -> None: pass def get_schema(self, routes: list[BaseRoute]) -> dict[str, Any]: pass
3
0
10
3
7
0
3
0
1
5
1
0
2
1
2
7
21
6
15
8
12
0
15
8
12
4
1
2
5
31,082
encode/starlette
starlette/staticfiles.py
starlette.staticfiles.NotModifiedResponse
from starlette.responses import FileResponse, RedirectResponse, Response from starlette.datastructures import URL, Headers class NotModifiedResponse(Response): NOT_MODIFIED_HEADERS = ('cache-control', 'content-location', 'date', 'etag', 'expires', 'vary') def __init__(self, headers: Headers): super()....
class NotModifiedResponse(Response): def __init__(self, headers: Headers): pass
2
0
5
0
5
0
1
0
1
2
1
0
1
0
1
8
15
1
14
3
12
0
4
3
2
1
1
0
1
31,083
encode/starlette
starlette/staticfiles.py
starlette.staticfiles.StaticFiles
from starlette.exceptions import HTTPException from starlette.responses import FileResponse, RedirectResponse, Response import stat from starlette.datastructures import URL, Headers from email.utils import parsedate from starlette._utils import get_route_path import anyio import os import importlib.util import anyio.to...
class StaticFiles: def __init__(self, *, directory: PathLike | None=None, packages: list[str | tuple[str, str]] | None=None, html: bool=False, check_dir: bool=True, follow_symlink: bool=False) -> None: pass def get_directories(self, directory: PathLike | None=None, packages: list[str | tuple[str, str...
10
6
19
1
14
3
4
0.23
0
19
7
0
9
6
9
9
181
21
130
56
102
30
107
37
97
11
0
3
36
31,084
encode/starlette
starlette/templating.py
starlette.templating.Jinja2Templates
from starlette.requests import Request from starlette.background import BackgroundTask from os import PathLike import warnings from typing import Any, Callable, cast, overload from starlette.datastructures import URL from collections.abc import Mapping, Sequence class Jinja2Templates: """ templates = Jinja2Tem...
class Jinja2Templates: ''' templates = Jinja2Templates("templates") return templates.TemplateResponse("index.html", {"request": request}) ''' @overload def __init__(self, directory: str | PathLike[str] | Sequence[str | PathLike[str]], *, context_processors: list[Callable[[Request], dict[str, An...
16
1
15
1
14
1
3
0.07
0
13
4
0
9
2
9
9
158
18
135
73
78
9
67
24
56
18
0
3
30
31,085
encode/starlette
starlette/templating.py
starlette.templating._TemplateResponse
from collections.abc import Mapping, Sequence from starlette.background import BackgroundTask from starlette.types import Receive, Scope, Send from typing import Any, Callable, cast, overload from starlette.responses import HTMLResponse class _TemplateResponse(HTMLResponse): def __init__(self, template: Any, cont...
class _TemplateResponse(HTMLResponse): def __init__(self, template: Any, context: dict[str, Any], status_code: int=200, headers: Mapping[str, str] | None=None, media_type: str | None=None, background: BackgroundTask | None=None): pass async def __call__(self, scope: Scope, receive: Receive, send: Sen...
3
0
14
0
14
1
2
0.04
1
6
1
0
2
2
2
9
29
1
28
16
17
1
12
8
9
2
2
1
3
31,086
encode/starlette
starlette/websockets.py
starlette.websockets.WebSocket
from typing import Any, cast import json from starlette.requests import HTTPConnection from collections.abc import AsyncIterator, Iterable from starlette.types import Message, Receive, Scope, Send from starlette.responses import Response class WebSocket(HTTPConnection): def __init__(self, scope: Scope, receive: R...
class WebSocket(HTTPConnection): def __init__(self, scope: Scope, receive: Receive, send: Send) -> None: pass async def receive(self) -> Message: ''' Receive ASGI websocket messages, ensuring valid state transitions. ''' pass async def send(self, message: Message)...
17
2
9
0
9
1
3
0.06
1
11
3
0
16
4
16
16
162
17
138
33
117
8
117
29
100
12
1
2
48
31,087
encode/starlette
starlette/websockets.py
starlette.websockets.WebSocketClose
from starlette.types import Message, Receive, Scope, Send class WebSocketClose: def __init__(self, code: int=1000, reason: str | None=None) -> None: self.code = code self.reason = reason or '' async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: await send({'t...
class WebSocketClose: def __init__(self, code: int=1000, reason: str | None=None) -> None: pass async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: pass
3
0
3
0
3
0
1
0
0
2
0
0
2
2
2
2
7
1
6
5
3
0
6
5
3
1
0
0
2
31,088
encode/starlette
starlette/websockets.py
starlette.websockets.WebSocketDisconnect
class WebSocketDisconnect(Exception): def __init__(self, code: int=1000, reason: str | None=None) -> None: self.code = code self.reason = reason or ''
class WebSocketDisconnect(Exception): def __init__(self, code: int=1000, reason: str | None=None) -> None: pass
2
0
3
0
3
0
1
0
1
2
0
1
1
2
1
11
4
0
4
4
2
0
4
4
2
1
3
0
1
31,089
encode/starlette
starlette/websockets.py
starlette.websockets.WebSocketState
import enum class WebSocketState(enum.Enum): CONNECTING = 0 CONNECTED = 1 DISCONNECTED = 2 RESPONSE = 3
class WebSocketState(enum.Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
5
0
5
5
4
0
5
5
4
0
4
0
0
31,090
fishtown-analytics/dbt
core/dbt/artifacts/resources/v1/analysis.py
analysis.Analysis
from dataclasses import dataclass from typing import Literal from dbt.artifacts.resources.v1.components import CompiledResource from dbt.artifacts.resources.types import NodeType @dataclass class Analysis(CompiledResource): resource_type: Literal[NodeType.Analysis]
@dataclass class Analysis(CompiledResource): pass
2
0
0
0
0
0
0
0
1
0
0
1
0
0
0
5
2
0
2
1
1
0
2
1
1
0
6
0
0
31,091
fishtown-analytics/dbt
scripts/collect-artifact-schema.py
collect-artifact-schema.Arguments
from dataclasses import dataclass from pathlib import Path from argparse import ArgumentParser @dataclass class Arguments: artifact: str path: Path @classmethod def parse(cls) -> 'Arguments': parser = ArgumentParser(prog='Collect and write dbt arfifact schema') parser.add_argument('--p...
@dataclass class Arguments: @classmethod def parse(cls) -> 'Arguments': pass
4
0
17
2
15
0
1
0
0
3
0
0
0
0
1
1
22
3
19
5
16
0
9
4
7
1
0
0
1
31,092
fishtown-analytics/dbt
scripts/collect-artifact-schema.py
collect-artifact-schema.ArtifactInfo
from pathlib import Path import json from dbt_common.clients.system import write_file from dataclasses import dataclass from dbt.artifacts.schemas.base import VersionedSchema from typing import Type, Dict, Any @dataclass class ArtifactInfo: path: str name: str json_schema: Dict[str, Any] @classmethod ...
@dataclass class ArtifactInfo: @classmethod def from_artifact_cls(cls, artifact_cls: Type[VersionedSchema]) -> 'ArtifactInfo': pass def write_schema(self, dest_dir: Path): pass
5
0
6
0
6
0
1
0
0
3
1
0
1
0
2
2
18
2
16
7
9
0
8
3
5
1
0
0
2
31,093
fishtown-analytics/dbt
scripts/collect-dbt-contexts.py
collect-dbt-contexts.ContextCatalog
from dataclasses import dataclass from dbt_common.dataclass_schema import dbtClassMixin from typing import List, Optional, Iterable, Union, Dict, Any @dataclass class ContextCatalog(dbtClassMixin): base: List[ContextMember] target: List[ContextMember] model: List[ContextMember] macro: List[ContextMembe...
@dataclass class ContextCatalog(dbtClassMixin): pass
2
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
6
0
6
1
5
0
6
1
5
0
1
0
0
31,094
fishtown-analytics/dbt
scripts/collect-dbt-contexts.py
collect-dbt-contexts.ContextMethod
from dataclasses import dataclass from dbt_common.dataclass_schema import dbtClassMixin from typing import List, Optional, Iterable, Union, Dict, Any @dataclass class ContextMethod(dbtClassMixin): name: str args: List[MethodArgument] result: str doc: Optional[str]
@dataclass class ContextMethod(dbtClassMixin): pass
2
0
0
0
0
0
0
0.2
1
0
0
0
0
0
0
0
5
0
5
1
4
1
5
1
4
0
1
0
0
31,095
fishtown-analytics/dbt
scripts/collect-dbt-contexts.py
collect-dbt-contexts.ContextValue
from dbt_common.dataclass_schema import dbtClassMixin from dataclasses import dataclass from typing import List, Optional, Iterable, Union, Dict, Any @dataclass class ContextValue(dbtClassMixin): name: str value: str doc: Optional[str]
@dataclass class ContextValue(dbtClassMixin): pass
2
0
0
0
0
0
0
0.25
1
0
0
0
0
0
0
0
4
0
4
1
3
1
4
1
3
0
1
0
0
31,096
fishtown-analytics/dbt
scripts/collect-dbt-contexts.py
collect-dbt-contexts.MethodArgument
from dataclasses import dataclass from dbt_common.dataclass_schema import dbtClassMixin @dataclass class MethodArgument(dbtClassMixin): name: str value: str
@dataclass class MethodArgument(dbtClassMixin): pass
2
0
0
0
0
0
0
0.33
1
0
0
0
0
0
0
0
3
0
3
1
2
1
3
1
2
0
1
0
0
31,097
fishtown-analytics/dbt
scripts/collect-dbt-contexts.py
collect-dbt-contexts.Unknown
from dbt_common.dataclass_schema import dbtClassMixin from typing import List, Optional, Iterable, Union, Dict, Any from dataclasses import dataclass @dataclass class Unknown(dbtClassMixin): name: str value: str doc: Optional[str]
@dataclass class Unknown(dbtClassMixin): pass
2
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
4
0
4
1
3
0
4
1
3
0
1
0
0
31,098
fishtown-analytics/dbt
core/dbt/artifacts/resources/v1/components.py
components.ColumnInfo
from dbt_common.contracts.config.properties import AdditionalPropertiesMixin from dataclasses import dataclass, field from dbt_common.contracts.constraints import ColumnLevelConstraint from typing import Any, Dict, List, Optional, Union from dbt_common.dataclass_schema import ExtensibleDbtClassMixin, dbtClassMixin from...
@dataclass class ColumnInfo(AdditionalPropertiesMixin, ExtensibleDbtClassMixin): '''Used in all ManifestNodes and SourceDefinition''' def __post_serialize__(self, dct: Dict, context: Optional[Dict]=None) -> dict: pass
3
1
0
0
0
0
0
0.1
2
0
0
0
0
0
0
0
12
1
10
9
9
1
10
9
9
0
1
0
0
31,099
fishtown-analytics/dbt
core/dbt/artifacts/resources/v1/components.py
components.CompiledResource
from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Union @dataclass class CompiledResource(ParsedResource): """Contains attributes necessary for SQL files and nodes with refs, sources, etc, so all ManifestNodes except SeedNode.""" language: str = 'sql' refs: List[Ref...
@dataclass class CompiledResource(ParsedResource): '''Contains attributes necessary for SQL files and nodes with refs, sources, etc, so all ManifestNodes except SeedNode.''' def __post_serialize__(self, dct: Dict, context: Optional[Dict]=None): pass
3
1
13
0
11
2
4
0.17
1
1
0
8
1
0
1
5
30
2
24
14
22
4
24
14
22
4
5
2
4