File: secrets.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (14 lines) | stat: -rw-r--r-- 483 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Stubs for secrets (Python 3.6)

from typing import Optional, Sequence, TypeVar
from hmac import compare_digest as compare_digest
from random import SystemRandom as SystemRandom

_T = TypeVar('_T')

def randbelow(exclusive_upper_bound: int) -> int: ...
def randbits(k: int) -> int: ...
def choice(seq: Sequence[_T]) -> _T: ...
def token_bytes(nbytes: Optional[int]) -> bytes: ...
def token_hex(nbytes: Optional[int]) -> str: ...
def token_urlsafe(nbytes: Optional[int]) -> str: ...