mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Add stubs for dj-database-url (#7972)
Co-authored-by: Xavier Francisco <xavier.n.francisco@gmail.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
"stubs/commonmark",
|
||||
"stubs/cryptography",
|
||||
"stubs/dateparser",
|
||||
"stubs/dj-database-url",
|
||||
"stubs/docutils",
|
||||
"stubs/Flask-SQLAlchemy",
|
||||
"stubs/fpdf2",
|
||||
|
||||
1
stubs/dj-database-url/METADATA.toml
Normal file
1
stubs/dj-database-url/METADATA.toml
Normal file
@@ -0,0 +1 @@
|
||||
version = "0.5.*"
|
||||
22
stubs/dj-database-url/dj_database_url.pyi
Normal file
22
stubs/dj-database-url/dj_database_url.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
from typing import Any
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
DEFAULT_ENV: str
|
||||
SCHEMES: dict[str, str]
|
||||
|
||||
class _DBConfigBase(TypedDict):
|
||||
NAME: str
|
||||
|
||||
class _DBConfig(_DBConfigBase, total=False):
|
||||
USER: str
|
||||
PASSWORD: str
|
||||
HOST: str
|
||||
PORT: str
|
||||
CONN_MAX_AGE: int
|
||||
OPTIONS: dict[str, Any]
|
||||
ENGINE: str
|
||||
|
||||
def parse(url: str, engine: str | None = ..., conn_max_age: int = ..., ssl_require: bool = ...) -> _DBConfig: ...
|
||||
def config(
|
||||
env: str = ..., default: str | None = ..., engine: str | None = ..., conn_max_age: int = ..., ssl_require: bool = ...
|
||||
) -> _DBConfig: ...
|
||||
Reference in New Issue
Block a user