Models
NZB
Bases: ParentModel
Represents a complete NZB file.
files
instance-attribute
File objects representing the files included in the NZB.
groups
cached
property
Tuple of unique groups across all the files in the NZB.
metadata
class-attribute
instance-attribute
Optional creator-definable metadata for the contents of the NZB.
names
cached
property
Tuple of unique file names across all the files in the NZB. May return an empty tuple if it fails to extract the name for every file.
posters
cached
property
Tuple of unique posters across all the files in the NZB.
stems
cached
property
Tuple of unique file stems (basename) across all the files in the NZB. May return an empty tuple if it fails to extract the stem for every file.
suffixes
cached
property
Tuple of unique file extensions across all the files in the NZB. May return an empty tuple if it fails to extract the extension for every file.
get_par2_percentage
get_par2_percentage() -> float
Percentage of recovery based on the total .par2
size divided by the total size of all files.
has_par2
has_par2() -> bool
has_rar
has_rar() -> bool
is_obfuscated
is_obfuscated() -> bool
is_rar
is_rar() -> bool
Metadata
Bases: ParentModel
Optional creator-definable metadata for the contents of the NZB.
password
cached
property
password: str | None
Return the first password from Metadata.passwords
if it exists, None otherwise.
This is essentially just syntactic sugar for password = passwords[0] if passwords else None
because although the spec allows multiple passwords, single passwords are far more common.
tag
cached
property
tag: str | None
The first tag from Metadata.tags
if it exists, None otherwise.
This is essentially just syntactic sugar for tag = tags[0] if tags else None
because although the spec allows multiple tags, single tags are far more common.
Segment
File
Bases: ParentModel
Represents a complete file, consisting of segments that make up a file.
datetime
instance-attribute
datetime: UTCDateTime
The date and time when the file was posted, in UTC.
name
cached
property
name: str
Complete name of the file with it's extension extracted from the subject. May return an empty string if it fails to extract the name.
stem
cached
property
stem: str
Base name of the file without it's extension extracted from the File.name
.
May return an empty string if it fails to extract the stem.
suffix
cached
property
suffix: str
Extension of the file extracted from the File.name
.
May return an empty string if it fails to extract the extension.
is_obfuscated
is_obfuscated() -> bool
is_par2
is_par2() -> bool