Best Python code snippet using fMBT_python
db.py
Source:db.py  
1# -*- coding: utf-8 -*-2#3from django.utils.translation import ugettext as _4from functools import reduce5from django.db.models import F, CharField, Value, IntegerField, Q, Count6from django.db.models.functions import Concat7from common.utils import get_object_or_none8from orgs.utils import current_org9from ..models import AuthBook, SystemUser, Asset, AdminUser10from .base import BaseBackend11class DBBackend(BaseBackend):12    union_id_length = 213    def __init__(self, queryset=None):14        if queryset is None:15            queryset = self.all()16        self.queryset = queryset17    def _clone(self):18        return self.__class__(self.queryset)19    def all(self):20        return AuthBook.objects.none()21    def count(self):22        return self.queryset.count()23    def get_queryset(self):24        return self.queryset25    def delete(self, union_id):26        cleaned_union_id = union_id.split('_')27        # 妿union_idéä¸è¿æ¬æ£æ¥ï¼ä»£è¡¨å¯è½ä¸æ¯æ¬backend, åºè¯¥è¿å空28        if not self._check_union_id(union_id, cleaned_union_id):29            return30        return self._perform_delete_by_union_id(cleaned_union_id)31    def _perform_delete_by_union_id(self, union_id_cleaned):32        pass33    def filter(self, assets=None, node=None, prefer=None, prefer_id=None,34               union_id=None, id__in=None, **kwargs):35        clone = self._clone()36        clone._filter_union_id(union_id)37        clone._filter_prefer(prefer, prefer_id)38        clone._filter_node(node)39        clone._filter_assets(assets)40        clone._filter_other(kwargs)41        clone._filter_id_in(id__in)42        return clone43    def _filter_union_id(self, union_id):44        if not union_id:45            return46        cleaned_union_id = union_id.split('_')47        # 妿union_idéä¸è¿æ¬æ£æ¥ï¼ä»£è¡¨å¯è½ä¸æ¯æ¬backend, åºè¯¥è¿å空48        if not self._check_union_id(union_id, cleaned_union_id):49            self.queryset = self.queryset.none()50            return51        return self._perform_filter_union_id(union_id, cleaned_union_id)52    def _check_union_id(self, union_id, cleaned_union_id):53        return union_id and len(cleaned_union_id) == self.union_id_length54    def _perform_filter_union_id(self, union_id, union_id_cleaned):55        self.queryset = self.queryset.filter(union_id=union_id)56    def _filter_assets(self, assets):57        assets_id = self.make_assets_as_id(assets)58        if assets_id:59            self.queryset = self.queryset.filter(asset_id__in=assets_id)60    def _filter_node(self, node):61        pass62    def _filter_id_in(self, ids):63        if ids and isinstance(ids, list):64            self.queryset = self.queryset.filter(union_id__in=ids)65    @staticmethod66    def clean_kwargs(kwargs):67        return {k: v for k, v in kwargs.items() if v}68    def _filter_other(self, kwargs):69        kwargs = self.clean_kwargs(kwargs)70        if kwargs:71            self.queryset = self.queryset.filter(**kwargs)72    def _filter_prefer(self, prefer, prefer_id):73        pass74    def search(self, item):75        qs = []76        for i in ['hostname', 'ip', 'username']:77            kwargs = {i + '__startswith': item}78            qs.append(Q(**kwargs))79        q = reduce(lambda x, y: x | y, qs)80        clone = self._clone()81        clone.queryset = clone.queryset.filter(q).distinct()82        return clone83class SystemUserBackend(DBBackend):84    model = SystemUser.assets.through85    backend = 'system_user'86    prefer = backend87    base_score = 088    union_id_length = 289    def _filter_prefer(self, prefer, prefer_id):90        if prefer and prefer != self.prefer:91            self.queryset = self.queryset.none()92        if prefer_id:93            self.queryset = self.queryset.filter(systemuser__id=prefer_id)94    def _perform_filter_union_id(self, union_id, union_id_cleaned):95        system_user_id, asset_id = union_id_cleaned96        self.queryset = self.queryset.filter(97            asset_id=asset_id, systemuser__id=system_user_id,98        )99    def _perform_delete_by_union_id(self, union_id_cleaned):100        system_user_id, asset_id = union_id_cleaned101        system_user = get_object_or_none(SystemUser, pk=system_user_id)102        asset = get_object_or_none(Asset, pk=asset_id)103        if all((system_user, asset)):104            system_user.assets.remove(asset)105    def _filter_node(self, node):106        if node:107            self.queryset = self.queryset.filter(asset__nodes__id=node.id)108    def get_annotate(self):109        kwargs = dict(110            hostname=F("asset__hostname"),111            ip=F("asset__ip"),112            username=F("systemuser__username"),113            password=F("systemuser__password"),114            private_key=F("systemuser__private_key"),115            public_key=F("systemuser__public_key"),116            score=F("systemuser__priority") + self.base_score,117            version=Value(0, IntegerField()),118            date_created=F("systemuser__date_created"),119            date_updated=F("systemuser__date_updated"),120            asset_username=Concat(F("asset__id"), Value("_"),121                                  F("systemuser__username"),122                                  output_field=CharField()),123            union_id=Concat(F("systemuser_id"), Value("_"), F("asset_id"),124                            output_field=CharField()),125            org_id=F("asset__org_id"),126            backend=Value(self.backend, CharField())127        )128        return kwargs129    def get_filter(self):130        return dict(131            systemuser__username_same_with_user=False,132        )133    def all(self):134        kwargs = self.get_annotate()135        filters = self.get_filter()136        qs = self.model.objects.all().annotate(**kwargs)137        if current_org.org_id() is not None:138            filters['org_id'] = current_org.org_id()139        qs = qs.filter(**filters)140        qs = self.qs_to_values(qs)141        return qs142class DynamicSystemUserBackend(SystemUserBackend):143    backend = 'system_user_dynamic'144    prefer = 'system_user'145    union_id_length = 3146    def get_annotate(self):147        kwargs = super().get_annotate()148        kwargs.update(dict(149            username=F("systemuser__users__username"),150            asset_username=Concat(151                F("asset__id"), Value("_"),152                F("systemuser__users__username"),153                output_field=CharField()154            ),155            union_id=Concat(156                F("systemuser_id"), Value("_"), F("asset_id"),157                Value("_"), F("systemuser__users__id"),158                output_field=CharField()159            ),160            users_count=Count('systemuser__users'),161        ))162        return kwargs163    def _perform_filter_union_id(self, union_id, union_id_cleaned):164        system_user_id, asset_id, user_id = union_id_cleaned165        self.queryset = self.queryset.filter(166            asset_id=asset_id, systemuser_id=system_user_id,167            union_id=union_id,168        )169    def _perform_delete_by_union_id(self, union_id_cleaned):170        system_user_id, asset_id, user_id = union_id_cleaned171        system_user = get_object_or_none(SystemUser, pk=system_user_id)172        if not system_user:173            return174        system_user.users.remove(user_id)175        if system_user.users.count() == 0:176            system_user.assets.remove(asset_id)177    def get_filter(self):178        return dict(179            users_count__gt=0,180            systemuser__username_same_with_user=True181        )182class AdminUserBackend(DBBackend):183    model = Asset184    backend = 'admin_user'185    prefer = backend186    base_score = 200187    def _filter_prefer(self, prefer, prefer_id):188        if prefer and prefer != self.backend:189            self.queryset = self.queryset.none()190        if prefer_id:191            self.queryset = self.queryset.filter(admin_user__id=prefer_id)192    def _filter_node(self, node):193        if node:194            self.queryset = self.queryset.filter(nodes__id=node.id)195    def _perform_filter_union_id(self, union_id, union_id_cleaned):196        admin_user_id, asset_id = union_id_cleaned197        self.queryset = self.queryset.filter(198            id=asset_id, admin_user_id=admin_user_id,199        )200    def _perform_delete_by_union_id(self, union_id_cleaned):201        raise PermissionError(_("Could not remove asset admin user"))202    def all(self):203        qs = self.model.objects.all().annotate(204            asset_id=F("id"),205            username=F("admin_user__username"),206            password=F("admin_user__password"),207            private_key=F("admin_user__private_key"),208            public_key=F("admin_user__public_key"),209            score=Value(self.base_score, IntegerField()),210            version=Value(0, IntegerField()),211            date_updated=F("admin_user__date_updated"),212            asset_username=Concat(F("id"), Value("_"), F("admin_user__username"), output_field=CharField()),213            union_id=Concat(F("admin_user_id"), Value("_"), F("id"), output_field=CharField()),214            backend=Value(self.backend, CharField()),215        )216        qs = self.qs_to_values(qs)217        return qs218class AuthbookBackend(DBBackend):219    model = AuthBook220    backend = 'db'221    prefer = backend222    base_score = 400223    def _filter_node(self, node):224        if node:225            self.queryset = self.queryset.filter(asset__nodes__id=node.id)226    def _filter_prefer(self, prefer, prefer_id):227        if not prefer or not prefer_id:228            return229        if prefer.lower() == "admin_user":230            model = AdminUser231        elif prefer.lower() == "system_user":232            model = SystemUser233        else:234            self.queryset = self.queryset.none()235            return236        obj = get_object_or_none(model, pk=prefer_id)237        if obj is None:238            self.queryset = self.queryset.none()239            return240        username = obj.get_username()241        if isinstance(username, str):242            self.queryset = self.queryset.filter(username=username)243        # dynamic system user return more username244        else:245            self.queryset = self.queryset.filter(username__in=username)246    def _perform_filter_union_id(self, union_id, union_id_cleaned):247        authbook_id, asset_id = union_id_cleaned248        self.queryset = self.queryset.filter(249            id=authbook_id, asset_id=asset_id,250        )251    def _perform_delete_by_union_id(self, union_id_cleaned):252        authbook_id, asset_id = union_id_cleaned253        authbook = get_object_or_none(AuthBook, pk=authbook_id)254        if authbook.is_latest:255            raise PermissionError(_("Latest version could not be delete"))256        AuthBook.objects.filter(id=authbook_id).delete()257    def all(self):258        qs = self.model.objects.all().annotate(259            hostname=F("asset__hostname"),260            ip=F("asset__ip"),261            score=F('version') + self.base_score,262            asset_username=Concat(F("asset__id"), Value("_"), F("username"), output_field=CharField()),263            union_id=Concat(F("id"), Value("_"), F("asset_id"), output_field=CharField()),264            backend=Value(self.backend, CharField()),265        )266        qs = self.qs_to_values(qs)...unionTypeCallSignatures.js
Source:unionTypeCallSignatures.js  
1//// [unionTypeCallSignatures.ts]2var numOrDate: number | Date;3var strOrBoolean: string | boolean;4var strOrNum: string | number;5// If each type in U has call signatures and the sets of call signatures are identical ignoring return types, 6// U has the same set of call signatures, but with return types that are unions of the return types of the respective call signatures from each type in U.7var unionOfDifferentReturnType: { (a: number): number; } | { (a: number): Date; };8numOrDate = unionOfDifferentReturnType(10);9strOrBoolean = unionOfDifferentReturnType("hello"); // error 10unionOfDifferentReturnType1(true); // error in type of parameter11var unionOfDifferentReturnType1: { (a: number): number; (a: string): string; } | { (a: number): Date; (a: string): boolean; };12numOrDate = unionOfDifferentReturnType1(10);13strOrBoolean = unionOfDifferentReturnType1("hello");14unionOfDifferentReturnType1(true); // error in type of parameter15unionOfDifferentReturnType1(); // error missing parameter16var unionOfDifferentParameterTypes: { (a: number): number; } | { (a: string): Date; };17unionOfDifferentParameterTypes(10);// error - no call signatures18unionOfDifferentParameterTypes("hello");// error - no call signatures19unionOfDifferentParameterTypes();// error - no call signatures20var unionOfDifferentNumberOfSignatures: { (a: number): number; } | { (a: number): Date; (a: string): boolean; };21unionOfDifferentNumberOfSignatures(); // error - no call signatures22unionOfDifferentNumberOfSignatures(10); // error - no call signatures23unionOfDifferentNumberOfSignatures("hello"); // error - no call signatures24var unionWithDifferentParameterCount: { (a: string): string; } | { (a: string, b: number): number; } ;25unionWithDifferentParameterCount();// no  call signature26unionWithDifferentParameterCount("hello");// no  call signature27unionWithDifferentParameterCount("hello", 10);// no  call signature28var unionWithOptionalParameter1: { (a: string, b?: number): string; } | { (a: string, b?: number): number; };29strOrNum = unionWithOptionalParameter1('hello');30strOrNum = unionWithOptionalParameter1('hello', 10);31strOrNum = unionWithOptionalParameter1('hello', "hello"); // error in parameter type32strOrNum = unionWithOptionalParameter1(); // error33var unionWithOptionalParameter2: { (a: string, b?: number): string; } | { (a: string, b: number): number };34strOrNum = unionWithOptionalParameter2('hello'); // error no call signature35strOrNum = unionWithOptionalParameter2('hello', 10); // error no call signature36strOrNum = unionWithOptionalParameter2('hello', "hello"); // error no call signature37strOrNum = unionWithOptionalParameter2(); // error no call signature38var unionWithOptionalParameter3: { (a: string, b?: number): string; } | { (a: string): number; };39strOrNum = unionWithOptionalParameter3('hello');40strOrNum = unionWithOptionalParameter3('hello', 10); // error no call signature41strOrNum = unionWithOptionalParameter3('hello', "hello"); // error no call signature42strOrNum = unionWithOptionalParameter3(); // error no call signature43var unionWithRestParameter1: { (a: string, ...b: number[]): string; } | { (a: string, ...b: number[]): number };44strOrNum = unionWithRestParameter1('hello');45strOrNum = unionWithRestParameter1('hello', 10);46strOrNum = unionWithRestParameter1('hello', 10, 11);47strOrNum = unionWithRestParameter1('hello', "hello"); // error in parameter type48strOrNum = unionWithRestParameter1(); // error49var unionWithRestParameter2: { (a: string, ...b: number[]): string; } | { (a: string, b: number): number };50strOrNum = unionWithRestParameter2('hello'); // error no call signature51strOrNum = unionWithRestParameter2('hello', 10); // error no call signature52strOrNum = unionWithRestParameter2('hello', 10, 11); // error no call signature53strOrNum = unionWithRestParameter2('hello', "hello"); // error no call signature54strOrNum = unionWithRestParameter2(); // error no call signature55var unionWithRestParameter3: { (a: string, ...b: number[]): string; } | { (a: string): number };56strOrNum = unionWithRestParameter3('hello');57strOrNum = unionWithRestParameter3('hello', 10); // error no call signature58strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature59strOrNum = unionWithRestParameter3('hello', "hello"); // error no call signature60strOrNum = unionWithRestParameter3(); // error no call signature61var unionWithRestParameter4: { (...a: string[]): string; } | { (a: string, b: string): number; };62strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature63strOrNum = unionWithRestParameter4("hello", "world");646566//// [unionTypeCallSignatures.js]67var numOrDate;68var strOrBoolean;69var strOrNum;70// If each type in U has call signatures and the sets of call signatures are identical ignoring return types, 71// U has the same set of call signatures, but with return types that are unions of the return types of the respective call signatures from each type in U.72var unionOfDifferentReturnType;73numOrDate = unionOfDifferentReturnType(10);74strOrBoolean = unionOfDifferentReturnType("hello"); // error 75unionOfDifferentReturnType1(true); // error in type of parameter76var unionOfDifferentReturnType1;77numOrDate = unionOfDifferentReturnType1(10);78strOrBoolean = unionOfDifferentReturnType1("hello");79unionOfDifferentReturnType1(true); // error in type of parameter80unionOfDifferentReturnType1(); // error missing parameter81var unionOfDifferentParameterTypes;82unionOfDifferentParameterTypes(10); // error - no call signatures83unionOfDifferentParameterTypes("hello"); // error - no call signatures84unionOfDifferentParameterTypes(); // error - no call signatures85var unionOfDifferentNumberOfSignatures;86unionOfDifferentNumberOfSignatures(); // error - no call signatures87unionOfDifferentNumberOfSignatures(10); // error - no call signatures88unionOfDifferentNumberOfSignatures("hello"); // error - no call signatures89var unionWithDifferentParameterCount;90unionWithDifferentParameterCount(); // no  call signature91unionWithDifferentParameterCount("hello"); // no  call signature92unionWithDifferentParameterCount("hello", 10); // no  call signature93var unionWithOptionalParameter1;94strOrNum = unionWithOptionalParameter1('hello');95strOrNum = unionWithOptionalParameter1('hello', 10);96strOrNum = unionWithOptionalParameter1('hello', "hello"); // error in parameter type97strOrNum = unionWithOptionalParameter1(); // error98var unionWithOptionalParameter2;99strOrNum = unionWithOptionalParameter2('hello'); // error no call signature100strOrNum = unionWithOptionalParameter2('hello', 10); // error no call signature101strOrNum = unionWithOptionalParameter2('hello', "hello"); // error no call signature102strOrNum = unionWithOptionalParameter2(); // error no call signature103var unionWithOptionalParameter3;104strOrNum = unionWithOptionalParameter3('hello');105strOrNum = unionWithOptionalParameter3('hello', 10); // error no call signature106strOrNum = unionWithOptionalParameter3('hello', "hello"); // error no call signature107strOrNum = unionWithOptionalParameter3(); // error no call signature108var unionWithRestParameter1;109strOrNum = unionWithRestParameter1('hello');110strOrNum = unionWithRestParameter1('hello', 10);111strOrNum = unionWithRestParameter1('hello', 10, 11);112strOrNum = unionWithRestParameter1('hello', "hello"); // error in parameter type113strOrNum = unionWithRestParameter1(); // error114var unionWithRestParameter2;115strOrNum = unionWithRestParameter2('hello'); // error no call signature116strOrNum = unionWithRestParameter2('hello', 10); // error no call signature117strOrNum = unionWithRestParameter2('hello', 10, 11); // error no call signature118strOrNum = unionWithRestParameter2('hello', "hello"); // error no call signature119strOrNum = unionWithRestParameter2(); // error no call signature120var unionWithRestParameter3;121strOrNum = unionWithRestParameter3('hello');122strOrNum = unionWithRestParameter3('hello', 10); // error no call signature123strOrNum = unionWithRestParameter3('hello', 10, 11); // error no call signature124strOrNum = unionWithRestParameter3('hello', "hello"); // error no call signature125strOrNum = unionWithRestParameter3(); // error no call signature126var unionWithRestParameter4;127strOrNum = unionWithRestParameter4("hello"); // error supplied parameters do not match any call signature
...itsdangerous.pyi
Source:itsdangerous.pyi  
1from datetime import datetime2from typing import Any, Callable, IO, Mapping, MutableMapping, Optional, Tuple, Union, Text, Generator3_serializer = Any  # must be an object that has "dumps" and "loads" attributes (e.g. the json module)4def want_bytes(s: Union[Text, bytes], encoding: Text = ..., errors: Text = ...) -> bytes: ...5class BadData(Exception):6    message: str7    def __init__(self, message: str) -> None: ...8class BadPayload(BadData):9    original_error: Optional[Exception]10    def __init__(self, message: str, original_error: Optional[Exception] = ...) -> None: ...11class BadSignature(BadData):12    payload: Optional[Any]13    def __init__(self, message: str, payload: Optional[Any] = ...) -> None: ...14class BadTimeSignature(BadSignature):15    date_signed: Optional[int]16    def __init__(self, message: str, payload: Optional[Any] = ..., date_signed: Optional[int] = ...) -> None: ...17class BadHeader(BadSignature):18    header: Any19    original_error: Any20    def __init__(self, message, payload: Optional[Any] = ..., header: Optional[Any] = ..., original_error: Optional[Any] = ...) -> None: ...21class SignatureExpired(BadTimeSignature): ...22def base64_encode(string: Union[Text, bytes]) -> bytes: ...23def base64_decode(string: Union[Text, bytes]) -> bytes: ...24class SigningAlgorithm(object):25    def get_signature(self, key: bytes, value: bytes) -> bytes: ...26    def verify_signature(self, key: bytes, value: bytes, sig: bytes) -> bool: ...27class NoneAlgorithm(SigningAlgorithm):28    def get_signature(self, key: bytes, value: bytes) -> bytes: ...29class HMACAlgorithm(SigningAlgorithm):30    default_digest_method: Callable[..., Any]31    digest_method: Callable[..., Any]32    def __init__(self, digest_method: Optional[Callable[..., Any]] = ...) -> None: ...33    def get_signature(self, key: bytes, value: bytes) -> bytes: ...34class Signer(object):35    default_digest_method: Callable[..., Any] = ...36    default_key_derivation: str = ...37    secret_key: bytes38    sep: bytes39    salt: Union[Text, bytes]40    key_derivation: str41    digest_method: Callable[..., Any]42    algorithm: SigningAlgorithm43    def __init__(self,44                 secret_key: Union[Text, bytes],45                 salt: Optional[Union[Text, bytes]] = ...,46                 sep: Optional[Union[Text, bytes]] = ...,47                 key_derivation: Optional[str] = ...,48                 digest_method: Optional[Callable[..., Any]] = ...,49                 algorithm: Optional[SigningAlgorithm] = ...) -> None: ...50    def derive_key(self) -> bytes: ...51    def get_signature(self, value: Union[Text, bytes]) -> bytes: ...52    def sign(self, value: Union[Text, bytes]) -> bytes: ...53    def verify_signature(self, value: bytes, sig: Union[Text, bytes]) -> bool: ...54    def unsign(self, signed_value: Union[Text, bytes]) -> bytes: ...55    def validate(self, signed_value: Union[Text, bytes]) -> bool: ...56class TimestampSigner(Signer):57    def get_timestamp(self) -> int: ...58    def timestamp_to_datetime(self, ts: float) -> datetime: ...59    def sign(self, value: Union[Text, bytes]) -> bytes: ...60    def unsign(self, value: Union[Text, bytes], max_age: Optional[int] = ...,61               return_timestamp: bool = ...) -> Any: ...  # morally -> Union[bytes, Tuple[bytes, datetime]]62    def validate(self, signed_value: Union[Text, bytes], max_age: Optional[int] = ...) -> bool: ...63class Serializer(object):64    default_serializer: _serializer = ...65    default_signer: Callable[..., Signer] = ...66    secret_key: bytes67    salt: bytes68    serializer: _serializer69    is_text_serializer: bool70    signer: Callable[..., Signer]71    signer_kwargs: MutableMapping[str, Any]72    def __init__(self, secret_key: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...,73                 serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ...,74                 signer_kwargs: Optional[MutableMapping[str, Any]] = ...) -> None: ...75    def load_payload(self, payload: bytes, serializer: Optional[_serializer] = ...) -> Any: ...76    def dump_payload(self, obj: Any) -> bytes: ...77    def make_signer(self, salt: Optional[Union[Text, bytes]] = ...) -> Signer: ...78    def iter_unsigners(self, salt: Optional[Union[Text, bytes]] = ...) -> Generator[Any, None, None]: ...79    def dumps(self, obj: Any, salt: Optional[Union[Text, bytes]] = ...) -> Any: ...  # morally -> Union[str, bytes]80    def dump(self, obj: Any, f: IO[Any], salt: Optional[Union[Text, bytes]] = ...) -> None: ...81    def loads(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...) -> Any: ...82    def load(self, f: IO[Any], salt: Optional[Union[Text, bytes]] = ...): ...83    def loads_unsafe(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...) -> Tuple[bool, Optional[Any]]: ...84    def load_unsafe(self, f: IO[Any], salt: Optional[Union[Text, bytes]] = ...) -> Tuple[bool, Optional[Any]]: ...85class TimedSerializer(Serializer):86    def loads(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ..., max_age: Optional[int] = ...,87              return_timestamp: bool = ...) -> Any: ...  # morally -> Union[Any, Tuple[Any, datetime]]88    def loads_unsafe(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...,89                     max_age: Optional[int] = ...) -> Tuple[bool, Any]: ...90class JSONWebSignatureSerializer(Serializer):91    jws_algorithms: MutableMapping[Text, SigningAlgorithm] = ...92    default_algorithm: Text = ...93    default_serializer: Any = ...94    algorithm_name: Text95    algorithm: SigningAlgorithm96    def __init__(self, secret_key: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...,97                 serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ...,98                 signer_kwargs: Optional[MutableMapping[str, Any]] = ..., algorithm_name: Optional[Text] = ...) -> None: ...99    def load_payload(self, payload: Union[Text, bytes], serializer: Optional[_serializer] = ...,100                     return_header: bool = ...) -> Any: ...  # morally -> Union[Any, Tuple[Any, MutableMapping[str, Any]]]101    def dump_payload(self, header: Mapping[str, Any], obj: Any) -> bytes: ...  # type: ignore102    def make_algorithm(self, algorithm_name: Text) -> SigningAlgorithm: ...103    def make_signer(self, salt: Optional[Union[Text, bytes]] = ..., algorithm: SigningAlgorithm = ...) -> Signer: ...104    def make_header(self, header_fields: Optional[Mapping[str, Any]]) -> MutableMapping[str, Any]: ...105    def dumps(self, obj: Any, salt: Optional[Union[Text, bytes]] = ...,106              header_fields: Optional[Mapping[str, Any]] = ...) -> bytes: ...107    def loads(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...,108              return_header: bool = ...) -> Any: ...  # morally -> Union[Any, Tuple[Any, MutableMapping[str, Any]]]109    def loads_unsafe(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...,110                     return_header: bool = ...) -> Tuple[bool, Any]: ...111class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer):112    DEFAULT_EXPIRES_IN: int = ...113    expires_in: int114    def __init__(self, secret_key: Union[Text, bytes], expires_in: Optional[int] = ..., salt: Optional[Union[Text, bytes]] = ...,115                 serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ...,116                 signer_kwargs: Optional[MutableMapping[str, Any]] = ..., algorithm_name: Optional[Text] = ...) -> None: ...117    def make_header(self, header_fields: Optional[Mapping[str, Any]]) -> MutableMapping[str, Any]: ...118    def loads(self, s: Union[Text, bytes], salt: Optional[Union[Text, bytes]] = ...,119              return_header: bool = ...) -> Any: ...  # morally -> Union[Any, Tuple[Any, MutableMapping[str, Any]]]120    def get_issue_date(self, header: Mapping[str, Any]) -> Optional[datetime]: ...121    def now(self) -> int: ...122class _URLSafeSerializerMixin(object):123    default_serializer: _serializer = ...124    def load_payload(self, payload: bytes, serializer: Optional[_serializer] = ...) -> Any: ...125    def dump_payload(self, obj: Any) -> bytes: ...126class URLSafeSerializer(_URLSafeSerializerMixin, Serializer): ......navtreeindex3.js
Source:navtreeindex3.js  
1var NAVTREEINDEX3 =2{3"unionCPACR__Type.html#a4de69636eb450fcc3f5f3e4a19a869f5":[6,1,3,2,15],4"unionCPACR__Type.html#a5a6f694264518a813bdbc202ff47664f":[6,1,3,2,14],5"unionCPACR__Type.html#a6206695a548b18ce0e2ea5276d1eef1d":[6,1,3,2,16],6"unionCPACR__Type.html#a6424b7a81a440217aab8e51e4b623adb":[6,1,3,2,10],7"unionCPACR__Type.html#a68d69635225dd479d3035cc51b4c40ce":[6,1,3,2,6],8"unionCPACR__Type.html#a792fabd71db2311eefbc9b896db37986":[6,1,3,2,0],9"unionCPACR__Type.html#a7aa1870fa74e00241618df136e04141f":[6,1,3,2,1],10"unionCPACR__Type.html#ac54b8897f9358f37e0046b010c334e87":[6,1,3,2,5],11"unionCPACR__Type.html#ac6f2f67dd0250b9dc9a8271a05655bbe":[6,1,3,2,17],12"unionCPACR__Type.html#acb2055cdbdf2a6c9b8279dc6f7cbc624":[6,1,3,2,3],13"unionCPACR__Type.html#ad5c0b15cd6a01a6f1db398e020809573":[6,1,3,2,11],14"unionCPACR__Type.html#ad898cab7c89a07b80068d141ced869e3":[6,1,3,2,12],15"unionCPACR__Type.html#ae2d9d724aff1f8f0060738f5d4527c33":[6,1,3,2,18],16"unionCPACR__Type.html#af245b8dabfea0bf7dc06f5d4de7bfa79":[6,1,3,2,9],17"unionCPSR__Type.html":[6,1,4,2],18"unionCPSR__Type.html#a0bdcd0ceaa1ecb8f55ea15075974eb5a":[6,1,4,2,12],19"unionCPSR__Type.html#a0d277e8b4d2147137407f526aa9e3214":[6,1,4,2,6],20"unionCPSR__Type.html#a20bbf5d5ba32cae380b7f181cf306f9e":[6,1,4,2,4],21"unionCPSR__Type.html#a26907b41c086a9f9e7b8c7051481c643":[6,1,4,2,11],22"unionCPSR__Type.html#a2bc38ab81bc2e2fd111526a58f94511f":[6,1,4,2,10],23"unionCPSR__Type.html#a2e735da6b6156874d12aaceb2017da06":[6,1,4,2,1],24"unionCPSR__Type.html#a5299532c92c92babc22517a433686b95":[6,1,4,2,7],25"unionCPSR__Type.html#a5d4e06d8dba8f512c54b16bfa7150d9d":[6,1,4,2,9],26"unionCPSR__Type.html#a790f1950658257a87ac58d132eca9849":[6,1,4,2,16],27"unionCPSR__Type.html#a8bdd87822e3c00b3742c94a42b0654b9":[6,1,4,2,8],28"unionCPSR__Type.html#a8dc2435a7c376c9b8dfdd9748c091458":[6,1,4,2,0],29"unionCPSR__Type.html#a96bd175ed9927279dba40e76259dcfa7":[6,1,4,2,3],30"unionCPSR__Type.html#aa967d0e42ed00bd886b2c6df6f49a7e2":[6,1,4,2,2],31"unionCPSR__Type.html#aba74c9da04be21f1266d3816af79f8c3":[6,1,4,2,14],32"unionCPSR__Type.html#ac5ec7329b5be4722abc3cef6ef2e9c1b":[6,1,4,2,13],33"unionCPSR__Type.html#acc18314a4088adfb93a9662c76073704":[6,1,4,2,5],34"unionCPSR__Type.html#afd5ed10bab25f324a6fbb3e124d16fc9":[6,1,4,2,15],35"unionDFSR__Type.html":[6,1,5,1],36"unionDFSR__Type.html#a0512860c27723cd35f0abdaa68be9935":[6,1,5,1,10],37"unionDFSR__Type.html#a38562a26cc210ea4c39c6b951c4a5b62":[6,1,5,1,0],38"unionDFSR__Type.html#a38982c7088a4069f8a4b347f5eb400e9":[6,1,5,1,1],39"unionDFSR__Type.html#a4cb3ba7b8c8075bfbff792b7e5b88103":[6,1,5,1,8],40"unionDFSR__Type.html#a54c2eb668436a0f15d781265ceaa8c58":[6,1,5,1,7],41"unionDFSR__Type.html#a583e3138696be655c46f297e083ece52":[6,1,5,1,5],42"unionDFSR__Type.html#a869658f432d5e213b8cd55e8e58d1f56":[6,1,5,1,4],43"unionDFSR__Type.html#ad827a36e38ce2dee796835122ae95dd2":[6,1,5,1,9],44"unionDFSR__Type.html#add7c7800b87cabdb4a9ecdf41e4469a7":[6,1,5,1,6],45"unionDFSR__Type.html#aede34079d030df1977646c155a90f445":[6,1,5,1,2],46"unionDFSR__Type.html#af29edf59ecfd29848b69e2bbfb7f3082":[6,1,5,1,3],47"unionIFSR__Type.html":[6,1,9,1],48"unionIFSR__Type.html#a40c5236caf0549cc1cc78945b0b0f131":[6,1,9,1,4],49"unionIFSR__Type.html#a4ece60d66e87e10e78aab83ac05e957c":[6,1,9,1,5],50"unionIFSR__Type.html#a543066fc60d5b63478cc85ba082524d4":[6,1,9,1,6],51"unionIFSR__Type.html#a8f4e4fe46a9cb9b6c8a6355f9b0938e3":[6,1,9,1,3],52"unionIFSR__Type.html#a9f9ae1ffa89d33e90159eec5c4b7cd6a":[6,1,9,1,1],53"unionIFSR__Type.html#adb493acf17881eaf09a2e8629ee2243e":[6,1,9,1,2],54"unionIFSR__Type.html#ae31262477d14b86f30c3bef90a3fc371":[6,1,9,1,7],55"unionIFSR__Type.html#aee6fed7525c5125e637acc8e957c8d0f":[6,1,9,1,0],56"unionISR__Type.html":[6,1,10,1],57"unionISR__Type.html#a4fca9c1057aa8a6006f1fb631a28ee30":[6,1,10,1,4],58"unionISR__Type.html#ad01f116d61c2ae79c2469a38a0b2f497":[6,1,10,1,1],59"unionISR__Type.html#ad4dfcb37f30162fd57c4402ae99ca49e":[6,1,10,1,0],60"unionISR__Type.html#ad83ba976f1764c7d3a7954c073c39c22":[6,1,10,1,3],61"unionISR__Type.html#ae691a856f7de0f301c60521a7a779dc2":[6,1,10,1,2],62"unionSCTLR__Type.html":[6,1,18,1],63"unionSCTLR__Type.html#a078edcb9c3fc8b46b8cf382ad249bb79":[6,1,18,1,0],64"unionSCTLR__Type.html#a0a4ed1a41f25a191cf4a500401c3c5db":[6,1,18,1,9],65"unionSCTLR__Type.html#a10212a8d038bb1e076cbd06a5ba0b055":[6,1,18,1,12],66"unionSCTLR__Type.html#a122a4dde5ab1a27855ddad88bb3f9f78":[6,1,18,1,4],67"unionSCTLR__Type.html#a1ca6569db52bca6250afbbd565d05449":[6,1,18,1,16],68"unionSCTLR__Type.html#a21ec59a37644281456a5f607450951d8":[6,1,18,1,3],69"unionSCTLR__Type.html#a25d4c4cf4df168a30cc4600a130580ab":[6,1,18,1,14],70"unionSCTLR__Type.html#a32873e90e6814c3a2fc1b1c79c0bc8c8":[6,1,18,1,17],71"unionSCTLR__Type.html#a37f6910db32361f44a268f93b9ff7b20":[6,1,18,1,22],72"unionSCTLR__Type.html#a4cb084e09742794f1d040c4e44ee4e0f":[6,1,18,1,20],73"unionSCTLR__Type.html#a551d0505856acaef4dd1ecca54cb540d":[6,1,18,1,21],74"unionSCTLR__Type.html#a60d589567422115a14d6d0fde342dfce":[6,1,18,1,11],75"unionSCTLR__Type.html#a6598f817304ccaef4509843ce041de1c":[6,1,18,1,13],76"unionSCTLR__Type.html#a805ee3324a333d7a77d9f0d8f0fac9a7":[6,1,18,1,2],77"unionSCTLR__Type.html#a8cbfde3ba235ebd48e82cb314c9b9cc4":[6,1,18,1,10],78"unionSCTLR__Type.html#a98b55213f3bf0a8bd4f1db90512238de":[6,1,18,1,5],79"unionSCTLR__Type.html#a9a3885d0e2ba2433d128f62ec2552a00":[6,1,18,1,18],80"unionSCTLR__Type.html#aba2a8aac3478cdc34428af7b9726d97f":[6,1,18,1,8],81"unionSCTLR__Type.html#abc3055203ce7f9d117ceb10f146722f3":[6,1,18,1,15],82"unionSCTLR__Type.html#ae5a729bf64a6de4cbfa42c1a7d254535":[6,1,18,1,1],83"unionSCTLR__Type.html#af29c170c65dd4d076b78c793dc17aa0a":[6,1,18,1,19],84"unionSCTLR__Type.html#af868e042d01b612649539c151f1aaea5":[6,1,18,1,6],85"unionSCTLR__Type.html#afe77b6c5d73e64d4ef3c5dc5ce2692dc":[6,1,18,1,7],86"using_ARM_pg.html":[2,1],87"using_CMSIS.html":[2,0],88"using_pg.html":[2]
...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
