core package¶
Submodules¶
core.cipherfactory module¶
- class core.cipherfactory.CipherFactory[source]¶
Bases:
objectFactory wrapper for dispatching appropriate cipher-based encryptor/decryptor
- property decryptor¶
Returns a decryptor instance
- property encryptor¶
Returns an encryptor instance
- load_param_cfg(config_obj: core.config.CipherConfig)[source]¶
Maintains yaml config arguments
core.collection module¶
- class core.collection.Collection[source]¶
Bases:
objectHouses a collection of records
- add_record(rcrd: core.record.Record)[source]¶
Helper for record insertion
- Parameters
record – The record object to insert
:type Record
- del_record(record_id)[source]¶
Helper for record deletion
- Parameters
record_id – The identifier of the record to delete
:type int
- get_collection(enc: ciphers.cipher.Encryptor)[source]¶
- load_vault(vault_content: str, dec: ciphers.cipher.Decryptor)[source]¶
core.config module¶
core.model module¶
core.parser module¶
core.record module¶
- class core.record.Record(model_type: str)[source]¶
Bases:
objectWrapper for an individual record maintained in the vault file
- display(mode='table', indent=1)[source]¶
Displays contents of a record
- Parameters
mode (str (json, yaml, table)) – The display format
core.util module¶
- class core.util.CollectionMeta(*args, **kwargs)[source]¶
Bases:
typeMetaclass for accrual of supported suites and models
- property cipher_suites¶
- property model_collection¶
- class core.util.Schema(*args, **kwargs)[source]¶
Bases:
typeMetaclass for reserving the schema blueprint
- property field_template¶
- property model_template¶
- core.util.get_abs_path(relative_path)[source]¶
Abstracts absolute path
- Parameters
relative_path (str) – The current path relative to a reference
- Return type
str
- core.util.is_valid_suite(suite_name: str)[source]¶
Cipher suite validity checker
- Parameters
suite_name (str) – Name of the cipher suite
- Return type
bool
- core.util.join_path(parent_path, relative_path)[source]¶
Abstracts file path concatenation
- Parameters
parent_path (str) – The path housing the relative path
relative_path (str) – The current path referenced from the base location
- Return type
str
- core.util.safe_write(directory, name, content, overwrite=False)[source]¶
Writes content in a temporary location and renames/overwrites the file accordingly
- Parameters
directory (str) – The dir hosting the final file
name (str) – propogated name of the regular file
content (str) – Data to be written onto the file
overwrite (bool) – Overwrite file if existing