I use PDF merging occasionally, so I can use it immediately for myself. Requires pip installation of PyPDF2. that's all.
merge_pdf.py
import PyPDF2
#Combine separate pdf files
def merge_pdf(pdf_files):
merger = PyPDF2.PdfFileMerger()
for pdf in pdf_files:
merger.append(pdf)
merger.write("merge.pdf")
merger.close()
if __name__ == "__main__":
pdf_files = ["a.pdf","b.pdf"]
merge_pdf(pdf_files)