Module markov.api.credentials.credential
Classes
class CredRegistrationResponse (credential_id: str,
return_code: str,
create_time: str = '',
message: Optional[str] = '')-
CredRegistrationResponse(credential_id: 'str', return_code: 'str', create_time: 'str' = '', message: 'Optional[str]' = '')
Static methods
def create_from_dict(value: Dict) ‑> CredRegistrationResponse
def create_from_json(value: str) ‑> CredRegistrationResponse
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var create_time : str
var credential_id : str
var message : str | None
var return_code : str
Methods
def get_dict(self) ‑> Dict
def get_json(self) ‑> str
def is_ok(self)
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> str
class CredentialManager (profile_name='default')
-
Static methods
def cred_info_by_name(name: str) ‑> List[GenericCredential]
-
Find
Args
name:str
Returns
GenericCredential that represent these credentials at MarkovML Backend.
def get_cred_for_data_set(ds_id: str) ‑> GenericCredential
-
Return the credentials for the dataset with id ds_id
Args
ds_id
- identifier of the dataset for which we want to find the credentials
Returns:
def get_credential(credential_id: str) ‑> GenericCredential
-
Get credentials associated with this id
Args
credential_id:
Returns
GenericCredential that contains requested credentials.
def register_s3_cred(cred: S3Credentials) ‑> CredRegistrationResponse
class GenericCredential (provider: str,
data: dict,
name: str,
credential_id: Optional[str] = '',
details: str = '')-
GenericCredential(provider: 'str', data: 'dict', name: 'str', credential_id: 'Optional[str]' = '', details: 'str' = '')
Static methods
def create_from_dict(dv: dict) ‑> GenericCredential
def create_from_json(json_str: str) ‑> GenericCredential
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef from_s3_cred(access_token: str, access_key: str, name: str, details: str) ‑> GenericCredential
-
create generic credentials from
Args
access_token: access_key: name: details: Returns:
def schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var credential_id : str | None
var data : dict
var details : str
var name : str
var provider : str
Methods
def get_dict(self) ‑> Dict
def get_json(self) ‑> str
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> strdef to_s3_cred(self) ‑> S3Credentials
class S3Credentials (access_key: Optional[str],
access_secret: Optional[str],
name: str,
details: str = '')-
S3Credentials(access_key: 'Optional[str]', access_secret: 'Optional[str]', name: 'str', details: 'str' = '')
Static methods
def create_from_dict(cred: Dict) ‑> S3Credentials
def from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) ‑> ~A
def from_generic_cred(gc: GenericCredential) ‑> S3Credentials
def from_json(s: str | bytes | bytearray,
*,
parse_float=None,
parse_int=None,
parse_constant=None,
infer_missing=False,
**kw) ‑> ~Adef schema(*,
infer_missing: bool = False,
only=None,
exclude=(),
many: bool = False,
context=None,
load_only=(),
dump_only=(),
partial: bool = False,
unknown=None) ‑> dataclasses_json.mm.SchemaF[~A]
Instance variables
var access_key : str | None
var access_secret : str | None
var details : str
var name : str
Methods
def get_dict(self) ‑> str
def get_json(self) ‑> str
def register(self) ‑> CredRegistrationResponse
def to_dict(self, encode_json=False) ‑> Dict[str, dict | list | str | int | float | bool | None]
def to_generic_cred(self)
def to_json(self,
*,
skipkeys: bool = False,
ensure_ascii: bool = True,
check_circular: bool = True,
allow_nan: bool = True,
indent: int | str | None = None,
separators: Tuple[str, str] | None = None,
default: Callable | None = None,
sort_keys: bool = False,
**kw) ‑> str