imgproxy_python
A tiny library to simplify generation of imgproxy urls
installation
pip install imgproxy_python
usage
For example you want to simply resize your image to other height and width using imgproxy. To get proper imgproxy url you need the following
from imgproxy_python.urls import UrlGenerator
config = {
'imgproxy_key': '943b421c9eb07c830af81030552c86009268de4e532ba2ee2eab8247c6da0881',
'imgproxy_salt': '520f986b998545b4785e0defbc4f3c1203f22de2374a3d53cb7a7fe9fea309c5',
'imgproxy_host': 'http://localhost:8000',
'options': {
'resize': 'fill',
'width': 300,
'height': 300,
}
}
url = 'http://img.example.com/pretty/image.jpg'
urlgen = UrlGenerator(url, config)
print(urlgen.get_full_signed_url())
You will get a ready-to-go imgproxy link
http://localhost:8000/6cy4IRuQ1nQW8qGVmNvPdynjmkuwUEx-XhGw_C_kQmA/fill/300/300/ce/0/aHR0cDovL2ltZy5l/eGFtcGxlLmNvbS9w/cmV0dHkvaW1hZ2Uu/anBn
warning
If you want to have generated link working you need to have imgproxy instance up and running on config['imgproxy_host'], in our example it is http://localhost:8000
diclaimer
for now only basic urls are supported in version 0.0.1. Advanced url generation is coming
Metadata
Release files for imgproxy-python 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 |
|---|---|---|---|---|
| imgproxy_python-0.0.2.tar.gz | 2.6 kB | Without provenance | Details for imgproxy_python-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imgproxy_python-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for imgproxy_python-0.0.2-py3-none-any.whl |
Total release size: 5.4 kB
Release files / imgproxy_python-0.0.2.tar.gz
| Download URL | imgproxy_python-0.0.2.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25b45143f3a22b7a61c5c2acf4bc3f061d4c507c5c86eb256b021a9c22fb0791
|
|
BLAKE2b-256 checksum How to use checksums |
5cfe85a417d6518aa99b57bd64e989955922d4679ee9b34dc08e4d7be891d0aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.6.9 Linux/4.15.0-132-generic
|
Release files / imgproxy_python-0.0.2-py3-none-any.whl
| Download URL | imgproxy_python-0.0.2-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e9cbebd434c6bbb81e5b59eedfd3f1694f8e59e657f7e523843dd19e8a00ee4
|
|
BLAKE2b-256 checksum How to use checksums |
5fa7b28341178158d7d782a4bf2c807da83bf67423b59199b8a4b91b324fc4ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.6.9 Linux/4.15.0-132-generic
|
Security for imgproxy-python 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.