Signapadpy
Signature Pad is a nice tool that allows users to provide a drawn signature. Because of the flakiness of some browsers, it’s probably recommend to generate an actual image of the signature on the server. And that’s what signapadpy does with a little help of Pillow (or PIL).
First install it:
pip install signapadpy
Next, import what you need (padding is optional):
from signapadpy import create_image, Padding
Then load the lines of the signature you want to convert into an image:
lines = load_signature_pad_output(from_something)
And create the image:
image = create_image(lines)
The image is an instance of PIL’s (or Pillow’s) Image, so you can choose to display it:
image.show()
Or save it:
image.save('signature.png')
If you’d like to render the image with Django, you could do it like this:
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from signapadpy import create_image
def view_signature(request, pk):
# Django view, assuming a Sigature model with a lines attribute
signature = get_object_or_404(Signature, pk=pk)
return signature_to_response(signature.lines)
def signature_to_response(lines):
image = create_image(lines)
response = HttpResponse(mimetype='image/png')
image.save(response, 'PNG')
return response
Metadata
Release files for signapadpy 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| signapadpy-0.0.2.tar.gz | 4.4 kB | Without provenance | Details for signapadpy-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| signapadpy-0.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for signapadpy-0.0.2-py2.py3-none-any.whl |
Total release size: 10.9 kB
Release files / signapadpy-0.0.2.tar.gz
| Download URL | signapadpy-0.0.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca2c870f5b1f02ab37c017989acd2cf4b019040ef7731c77eb3234b197aa0a1f
|
|
BLAKE2b-256 checksum How to use checksums |
0f2e121e2294db2a366009e9b1fdaaf7056d8b39113a6e9c9ca0e66217325413
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / signapadpy-0.0.2-py2.py3-none-any.whl
| Download URL | signapadpy-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d6033f557cf31c10b323526b77c6dc9ecca72696b5d9200a345eaabed849d41b
|
|
BLAKE2b-256 checksum How to use checksums |
8531a00d499ece51341cab58deab65628d239685d7e6a8fb57ad47e08dc2ddfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for signapadpy 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.