Backends
backends.db.abstractdb
backends.db.abstractdb
AbstractDatabase
Bases: ABC
Abstract base class for database operations.
Source code in backends/db/abstractdb.py
__enter__()
__exit__(exc_type, exc_val, exc_tb)
close()
abstractmethod
connect()
abstractmethod
execute_query(query, params=())
abstractmethod
fetch_all()
abstractmethod
backends.db.azsqldb
backends.db.azsqldb
AzureSQLDatabase
Bases: AbstractDatabase
Azure SQL Database implementation of the DatabaseInterface.
Source code in backends/db/azsqldb.py
backends.db.sqlitedb
backends.db.sqlitedb
SQLiteDatabase
Bases: AbstractDatabase
SQLite implementation of the DatabaseInterface.
Source code in backends/db/sqlitedb.py
backends.filesystem.abstractfs
backends.filesystem.abstractfs
AbstractFileSystem
Bases: ABC
Abstract base class for file system operations.
Source code in backends/filesystem/abstractfs.py
delete(relative_path)
abstractmethod
list(relative_dir)
abstractmethod
read(relative_path)
abstractmethod
backends.filesystem.azureblobfs
backends.filesystem.azureblobfs
AzureBlobFileSystem
Bases: AbstractFileSystem
Azure Blob Storage implementation of the FileSystemInterface.
Source code in backends/filesystem/azureblobfs.py
delete(relative_path)
Delete a file from Azure Blob Storage.
Source code in backends/filesystem/azureblobfs.py
list(relative_dir)
List files in the specified Azure Blob directory.
read(relative_path)
Read data from an Azure Blob.
Source code in backends/filesystem/azureblobfs.py
write(relative_path, data)
backends.filesystem.ftpfs
backends.filesystem.ftpfs
FTPFileSystem
Bases: AbstractFileSystem
FTP implementation of the FileSystemInterface.
Source code in backends/filesystem/ftpfs.py
delete(relative_path)
list(relative_dir)
read(relative_path)
Read data from an FTP file.
Source code in backends/filesystem/ftpfs.py
write(relative_path, data)
Write data to an FTP file.
Source code in backends/filesystem/ftpfs.py
SFTPFileSystem
Bases: AbstractFileSystem
SFTP implementation of the FileSystemInterface.
Source code in backends/filesystem/ftpfs.py
delete(relative_path)
list(relative_dir)
read(relative_path)
backends.filesystem.gcsfs
backends.filesystem.gcsfs
GCSFileSystem
Bases: AbstractFileSystem
Google Cloud Storage implementation of the FileSystemInterface.
Source code in backends/filesystem/gcsfs.py
delete(relative_path)
Delete a file from GCS.
list(relative_dir)
List files in the specified GCS directory.
read(relative_path)
Read data from a GCS file.
Source code in backends/filesystem/gcsfs.py
backends.filesystem.localfs
backends.filesystem.localfs
LocalFileSystem
Bases: AbstractFileSystem
Local file system implementation of the FileSystemInterface.
Source code in backends/filesystem/localfs.py
delete(relative_path)
list(relative_dir)
read(relative_path)
Read data from the local file.
Source code in backends/filesystem/localfs.py
backends.filesystem.s3fs
backends.filesystem.s3fs
S3FileSystem
Bases: AbstractFileSystem
S3 file system implementation of the FileSystemInterface.
Source code in backends/filesystem/s3fs.py
delete(relative_path)
Delete the file.
Source code in backends/filesystem/s3fs.py
list(relative_dir)
List files in the specified S3 bucket.
Source code in backends/filesystem/s3fs.py
read(relative_path)
Read data from the S3 file.
Source code in backends/filesystem/s3fs.py
write(relative_path, data)
Write data to an S3 file.
backends.kms.abstractkms
backends.kms.abstractkms
AbstractKMS
Bases: ABC
Abstract base class for Key Management System operations.
Source code in backends/kms/abstractkms.py
decrypt_dek(encrypted_dek)
abstractmethod
Decrypt a Data Encryption Key (DEK).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
encrypted_dek
|
bytes
|
The encrypted DEK to decrypt. |
required |
Returns: bytes: Plaintext DEK as bytes.
encrypt_dek(dek, key_id)
abstractmethod
Encrypt a Data Encryption Key (DEK).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dek
|
bytes
|
The plaintext DEK to encrypt. |
required |
key_id
|
str
|
The Key ID to use for encryption. |
required |
Returns: bytes: Encrypted DEK as bytes.
Source code in backends/kms/abstractkms.py
generate_kek(description)
abstractmethod
Generate a Key Encryption Key (KEK).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
description
|
str
|
Description for the key. |
required |
Returns: str: Key ID of the generated KEK.
backends.kms.awskms
backends.kms.awskms
AWSKMS
Bases: AbstractKMS
AWS KMS implementation of the AbstractKMS.
Source code in backends/kms/awskms.py
backends.kms.localkms
backends.kms.localkms
LocalKMS
Bases: AbstractKMS
Local implementation of the AbstractKMS for testing purposes with persistent storage.