معرفی شرکت ها


drf-imgproxy-1.1.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Serialize Django's ImageField into imgproxy URLs for your Django REST Framework APIs to generate thumbnails.
ویژگی مقدار
سیستم عامل -
نام فایل drf-imgproxy-1.1.0
نام drf-imgproxy
نسخه کتابخانه 1.1.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده VIPER Development UG
ایمیل نویسنده info@viper.dev
آدرس صفحه اصلی https://github.com/viper-development/drf-imgproxy
آدرس اینترنتی https://pypi.org/project/drf-imgproxy/
مجوز MIT
############ drf-imgproxy ############ Serialize Django's ImageField into `imgproxy <https://github.com/imgproxy/imgproxy>`_ URLs for your Django REST Framework APIs to generate thumbnails. **************** Important Notice **************** This package only provides the serializer class necessary to translate your ImageField to signed imgproxy URLs. It does not provide anything to upload images to your object storage bucket. We suggest you use another Django storage backend library that's able to communicate with your object storage solution, in particular we recommend the following: * `django-storages <https://github.com/jschneier/django-storages>`_ * `django-minio-storage <https://github.com/py-pa/django-minio-storage>`_ ***** Usage ***** 0. Installation =============== You can easily install this package from PyPI with ``pip`` by doing: .. code:: bash pip install drf-imgproxy 1. Quickstart ============= In ``settings.py``: .. code:: python INSTALLED_APPS = [ ... 'drf_imgproxy', ... ] # Configure this to either of the following: # - 's3' for Amazon S3, Minio and any other S3-compatible object # storage # - 'gs' for Google Cloud Storage # - 'abs' for Azure Blob Storage IMGPROXY_PROTOCOL = 's3' # Set the following to the bucket name that imgproxy uses. IMGPROXY_BUCKET_NAME = 'nerv_angel_captures' # Set both of the following to the appropiate values of # `IMGPROXY_KEY` and `IMGPROXY_SALT` of your imgproxy server. IMGPROXY_KEY = 'ThisIsNotASecureKeyAtAll' IMGPROXY_SALT = 'SeriouslyThisSaltIsVeryInsecure' # Set the following to the publicly accessible URL of your imgproxy # server. IMGPROXY_HOST = 'https://imgproxy.infra.nerv.tld' # Set the following variable to the available resolutions your API # provides. # # The format is `(<width>, <height>)`. IMGPROXY_RESOLUTIONS = ( (640, 480), (800, 600), (1024, 768), ) # In case you want to skip imgproxy url generation, set this flag to True. # When generation is being skipped, all the resolutions return the url of # the source file if possible or None. IMGPROXY_SKIP = False In ``serializers.py``: .. code:: python ... from drf_imgproxy.serializers import ImgproxyResizeableImageField ... class AngelActivity(ModelSerializer): ... captured_photo_thumbs = ImgproxyResizeableImageField( read_only=True, source='captured_photo' ) ... ******** See also ******** * `drf-imgproxy-demo <https://github.com/viper-development/drf-imgproxy-demo>`_


نیازمندی

مقدار نام
>=3.9.0 djangorestframework
>=2.1.0 Django


زبان مورد نیاز

مقدار نام
>=3.6,<4.0 Python


نحوه نصب


نصب پکیج whl drf-imgproxy-1.1.0:

    pip install drf-imgproxy-1.1.0.whl


نصب پکیج tar.gz drf-imgproxy-1.1.0:

    pip install drf-imgproxy-1.1.0.tar.gz