pyunique package

Submodules

pyunique.archive module

class pyunique.archive.Archive[source]

Bases: object

abstract add_digest(filename: str, digest: bytes) None[source]
abstract close() None[source]
abstract count() int[source]
abstract delete(filename: str) None[source]
abstract end_read() None[source]
abstract end_write() None[source]
abstract get_digest(filename: str) bytes | None[source]
abstract start_read() None[source]
abstract start_write() None[source]
abstract yield_all_items()[source]
class pyunique.archive.ArchiveLMDB[source]

Bases: Archive

add_digest(filename: str, digest: bytes) None[source]
close() None[source]
count() int[source]
delete(filename: str) None[source]
end_read() None[source]
end_write() None[source]
get_digest(filename: str) bytes | None[source]
start_read() None[source]
start_write() None[source]
yield_all_items()[source]
pyunique.archive.get_archive() Archive[source]

return correct archive using the currently configured algorithm (factory method)

pyunique.configs module

All configurations for pyunique

class pyunique.configs.ConfigAlgo[source]

Bases: Config

Parameters at the core of the algorithm

digest = 'sha256'
encoding = 'utf-8'
class pyunique.configs.ConfigLMDB[source]

Bases: Config

Parameters that control working with LMDB (experts only)

buffers = False
map_size = 1000000000000
class pyunique.configs.ConfigScan[source]

Bases: Config

Parameters that control the scanning phase

folder = '.'

pyunique.digest module

pyunique.digest.digest_file_bytes(filename: str) bytes[source]

pyunique.main module

main entry point to the program

pyunique.main.check_filenames() None[source]
pyunique.main.clean_db() None[source]
pyunique.main.main()[source]
pyunique.main.scan() None[source]

pyunique.static module

version which can be consumed from within the module

pyunique.utils module

pyunique.utils.get_logger()[source]
pyunique.utils.get_number_of_files(folder: str) int[source]

Module contents