Here's the basics of some code that will do what you need. If you already have the consensus sequence in another file, you don't need to derive the consensus as I have here. I am also using an arbitrarily low identity and high hamming distance for illustration purposes:
from Bio import AlignIO
from Bio.Align import AlignInfo
def hamming_distance(s1, s2):
"""Return the Hamming distance between equal-length sequences"""
if len(s1) != len(s2):
raise ValueError("Undefined for sequences of unequal length")
return sum(ch1 != ch2 for ch1, ch2 in zip(s1, s2))
alignment = AlignIO.read(sys.argv, "fasta")
threshold = 0.10
summary = AlignInfo.SummaryInfo(alignment)
consensus_seq = summary.dumb_consensus(threshold)
filtered = 
for record in alignment:
if hamming_distance(record.seq, consensus_seq) < 100:
[print(record.id) for record in filtered]
Read your alignment in with Bio.AlignIO.
Read in your consensus sequence (e.g. with SeqIO or derive it in the code).
Iterate each record in the alignment, and compare its sequence distance (in this case using the Hamming Distance) to the consensus.
If it passes whatever similarity threshold, add it to a list for recall later.