GroupDocs.Signature for Python via .NET is an electronic signature API for Python applications. It adds text, image, digital, barcode, QR code, stamp, form-field, and metadata signatures to documents, and finds, verifies, updates, and removes the signatures a document already carries. It works the same way for every supported format and needs no Microsoft Office or Adobe Acrobat installation.
Install the package with pip install groupdocs-signature-net, then sign a PDF in a few lines:
fromgroupdocs.signatureimportSignaturefromgroupdocs.signature.optionsimportTextSignOptions# Open a document and add a text signature to its first pagewithSignature("sample.pdf")assignature:options=TextSignOptions("John Smith")options.left=100options.top=100result=signature.sign("signed_sample.pdf",options)print(f"Signatures added: {len(result.succeeded)}")