snippet-image
Package for simple creation images of snippets for social networks using pillow.
Pictures for snippets can be inserted for sharing pages in social networks, for example in tag meta:
<meta property="og:image" content="Link to your snippet image" />
<meta name="twitter:image" content="Link to your snippet image" />
Installation
pip3 install snippet-image
User guide
To start creating images for snippets, it is enough to import the function `from snippet_image import create_snippet_image`.
from snippet_image import create_snippet_image
image_blob = create_snippet_image(
font='/home/iamterminator/.fonts/OpenSans-Bold.ttf', # Path to your font file
font_size=62, # Font size
background='/home/iamterminator/.wallpapers/jakethedog.jpg', # Path to your background image
size=(1200, 630), # Size of snippet image. (width, height)
text='Jake the Dog', # Text for draw on snippet image
brightness=0.3, # Brightness of background
)
with open('jake-the-dog-snippet-image.jpg', 'wb') as file:
file.write(image_blob.getvalue())
Integration
Django: django-snippet-image.
Wagtail: wagtail-snippet-image.
Read more on home.
Metadata
Release files for snippet-image 0.1.7
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 | |
|---|---|---|---|---|
| snippet-image-0.1.7.tar.gz | 4.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| snippet_image-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / snippet-image-0.1.7.tar.gz
| Download URL | snippet-image-0.1.7.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e33fe8e1844eda0f4e207802d621a563af4ed77760874ee16d47ee8bf91cf8b5
|
|
BLAKE2b-256 checksum How to use checksums |
d663ee6a2b9367a8e26d8451b76e49ac4b0bec3bca9a88cff7ca9f474d66de44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.15 CPython/3.7.3 Linux/5.0.0-16-generic
|
Release files / snippet_image-0.1.7-py3-none-any.whl
| Download URL | snippet_image-0.1.7-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfdbb8e2112141d6b86a204c49ed1d99791a8cfa015aa550c9e442d73ae945bc
|
|
BLAKE2b-256 checksum How to use checksums |
db95e2f9eefaf2cbac76aaeef000ab70e9b068b08a092f737c18c075394b3570
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.15 CPython/3.7.3 Linux/5.0.0-16-generic
|
Security for snippet-image 0.1.7
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.