-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
391625c
commit eba524f
Showing
5 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include hibpwned/py.typed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
"""__init__.pyi""" | ||
|
||
from __future__ import annotations | ||
import requests | ||
|
||
ReturnAlias = int | list[dict[str, str | int | bool]] | ||
|
||
AltReturnAlias = int | list[dict[str, str | int | bool]] | list[str] | ||
|
||
DataAlias = list[dict[str, str | int | bool]] | dict[str, str | int | bool] | ||
|
||
AltDataAlias = (list[dict[str, str | int | bool]] | ||
| dict[str, str | int | bool] | list[str]) | ||
|
||
|
||
def _check(resp: requests.models.Response) -> None: | ||
... | ||
|
||
|
||
class Pwned: | ||
|
||
url: str | ||
resp: requests.models.Response | ||
truncate_string: str | ||
domain_string: str | ||
unverified_string: str | ||
classes: list[str] | ||
hashes: str | ||
hash_list: list[str] | ||
hexdig: str | ||
hsh: str | ||
pnum: str | ||
data: DataAlias | ||
alt_data: AltDataAlias | ||
|
||
def __init__(self, account: str, agent: str, key: str) -> None: | ||
... | ||
|
||
def search_all_breaches(self, | ||
truncate: bool | None = False, | ||
domain: str | None = None, | ||
unverified: bool | None = False) -> AltReturnAlias: | ||
... | ||
|
||
def all_breaches(self, domain: str | None = None) -> ReturnAlias: | ||
... | ||
|
||
def single_breach(self, name: str) -> ReturnAlias: | ||
... | ||
|
||
def data_classes(self) -> int | list[str]: | ||
... | ||
|
||
def search_pastes(self) -> ReturnAlias: | ||
... | ||
|
||
def search_password(self, password: str) -> int | str: | ||
... | ||
|
||
def search_hashes(self, hsh: str) -> int | str: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Marker file for PEP 561. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters