From cb9f2d43e329327f96dd768185006cb779f7b308 Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Fri, 26 Jan 2024 23:24:40 +0700 Subject: [PATCH 01/25] Draft for readme update --- README.md | 211 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 160 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 9235bd1f..68d5878e 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,109 @@ +# Python API client for Uploadcare + +[![](https://badge.fury.io/py/pyuploadcare.svg)](https://pypi.org/project/pyuploadcare/) +[![](https://github.com/uploadcare/pyuploadcare/actions/workflows/test.yml/badge.svg)](https://github.com/uploadcare/pyuploadcare/actions?query=branch%3Amain+workflow%3ATests++) +[![](https://readthedocs.org/projects/pyuploadcare/badge/?version=latest)](https://pyuploadcare.readthedocs.io/) +[![](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/uploadcare) + +Build file handling in minutes. Upload or accept UGC, store, transform, optimize, and deliver images, videos, and documents to billions of users. + +* [Features](#features) +* [Requirements and installation](#requirements-and-installation) +* [Documentation](#documentation) +* [Usage example](#usage-example) +* [Use cases](#use-cases) +* [Demo app](#demo-app) +* [Useful links](#useful-links) + +## Features + +This library consists of the Uploadcare APIs interface and a couple of Django goodies, 100% covering [Upload](https://uploadcare.com/api-refs/upload-api/), [REST](https://uploadcare.com/api-refs/rest-api/) and [URL](https://uploadcare.com/api-refs/url-api/) Uploadcare APIs. + +Enable obsessively friendly file uploads: +* Built-in [File Uploader](https://uploadcare.com/docs/uploads/storage/#file-storing-behavior) +* Upload files from anywhere +* Multipart uploading for large files +* File size and MIME type filtering +* Malware protection +* Signed uploads +* Uploading network to speed up uploading jobs + +Store files the way you need: +* Define file storing behaviour +* Create projects with separate settings programmatically +* Connect custom storage + +Handle all files smart & RESTfully: +* CRUD files and their metadata +* Scan for unsafe and malicious content +* Convert documents and other files +* Encode and transform videos +* Recognize objects in the image +* Add arbitrary file metadata +* Control events with webhooks + +Process images on the fly right before delivery time: +* Compression +* Geometry +* Colors +* Definition +* Overlays +* Rotations +* Recognition + +Fast and reliable delivery: +* Worldwide CDN +* Custom CDN CNAME +* Signed URLs +* Search engine indexing behaviour +* Proxy to fetch and deliver remote files + +## Requirements and installation + +* Python 3.8, 3.9, 3.10, 3.11, 3.12 + +To use pyuploadcare with Python 3.6 or 3.7 please install `pyuploadcare < 5.0`. + +To use pyuploadcare with Python 2.7 please install `pyuploadcare < 3.0`. + +Django compatibility: + +| Py/Dj | 2.2 | 3.0 | 3.1 | 3.2 | 4.0 | 4.1 | 4.2 | 5.0 | +|-------|-----|-----|-----|-----|-----|-----|-----|-----| +| 3.8 | X | X | X | X | X | X | X | | +| 3.9 | X | X | X | X | X | X | X | | +| 3.10 | | | | X | X | X | X | X | +| 3.11 | | | | | | X | X | X | +| 3.12 | | | | | | | X | X | + +In order to install `pyuploadcare`, run these commands in CLI: + +```bash +pip install pyuploadcare +``` - - - - - -
- - -

PyUploadcare: a Python library for Uploadcare

-
- -

- - - - - - - - - - - - -

- -Uploadcare Python & Django integrations handle uploads and further operations -with files by wrapping Upload and REST APIs. - -Simple file uploads for the web are of most importance for us. Today, everyone -is used to the routine of allowing users to upload their pics or attach resumes. -The routine covers it all: installing image processing libraries, adjusting -permissions, ensuring servers never go down, and enabling CDN. - -This library consists of the Uploadcare API interface and a couple of Django -goodies. - -Simple as that, Uploadcare `ImageField` can be added to an -existing Django project in just a couple of [simple steps](https://pyuploadcare.readthedocs.org/en/latest/quickstart.html). -This will enable your users to see the upload progress, pick files -from Google Drive or Instagram, and edit a form while files are -being uploaded asynchronously. - -You can find an example project [here](https://github.com/uploadcare/pyuploadcare-example). +or, if you prefer it the old way: -```python +```bash +easy_install pyuploadcare +``` + +To use in Django project install with extra dependencies: + +```bash +pip install pyuploadcare[django] +``` +## Usage example + +Let's add [File Uploader][file-uploader] to an existing Django project. Follow +a few simple steps described in our [quickstart](https://pyuploadcare.readthedocs.org/en/latest/quickstart.html). + +This will enable users to see the upload progress, pick files from sources like +Google Drive or Instagram, and edit a form while files are being uploaded +asynchronously. + +```python from django import forms from django.db import models @@ -63,16 +121,67 @@ You can find an example project [here](https://github.com/uploadcare/pyuploadcar 'data-cdn-base': 'https://cdn.super-candidates.com', 'data-image-shrink': '1024x1024', })) - ``` -![](https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/manual_crop.png) +![](https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/josi.png) ## Documentation Detailed documentation is available [on RTD](https://pyuploadcare.readthedocs.io/en/latest/). -## Feedback - -Issues and PRs are welcome. You can provide your feedback or drop us a support -request at [hello@uploadcare.com](hello@uploadcare.com). +Though we highly recommend to read [Uploadcare documentation](https://uploadcare.com/docs/) +to fully understand what our platform enables you. + +## Use cases + +In this section, we also want to showcase some common use cases you can solve +with Uploadcare, regardless of using Python integration. + +Main use cases: +* Accept user-generated content ([file uploader](https://uploadcare.com/docs/file-uploader/), [upload sources](https://uploadcare.com/docs/upload-sources/)) +* Serve responsive images ([optimization](https://uploadcare.com/docs/transformations/image/compression/), [proxy](https://uploadcare.com/docs/delivery/proxy/), [adaptive image](https://uploadcare.com/docs/adaptive-image/) and other [integrations](https://uploadcare.com/docs/integrations/)) + +Common: +* Art-direction of the content on your page ([transformations](https://uploadcare.com/docs/transformations/image/), [remove.bg](https://uploadcare.com/docs/remove-bg/), [smart crop](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-smart-crop), [scale crop](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-scale-crop), [smart resize](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-smart-resize), [zoom](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-zoom-objects), [circle](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-border-radius), [fill](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-setfill)) +* Unify accepted video files to web-friendly formats and quality ([encoding](https://uploadcare.com/docs/transformations/video-encoding/)) +* Create thumbnails ([videos](https://uploadcare.com/docs/transformations/video-encoding/#operation-thumbs), [documents](https://uploadcare.com/docs/transformations/document-conversion/#thumbnails)) +* Validate incoming files ([validation](https://uploadcare.com/docs/moderation/), [NSFW](https://uploadcare.com/docs/unsafe-content/), [malware](https://uploadcare.com/docs/security/malware-protection/)) +* Watermark and protect your content ([overlays](https://uploadcare.com/docs/transformations/image/overlay/), [blur](https://uploadcare.com/docs/effects-enhancements/#operation-blur-region) + [baking](https://uploadcare.com/docs/mutability/)) +* Optimize the size of animated images ([gif2video](https://uploadcare.com/docs/transformations/gif-to-video/)) +* Access control (signed [uploads](https://uploadcare.com/docs/security/secure-uploads/) and [downloads](https://uploadcare.com/docs/security/secure-delivery/)) + +Less common: +* Image art-direction based on faces or objects ([faces](https://uploadcare.com/docs/intelligence/face-detection/), [objects](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-crop-tags)) +* Image delivery when color science is important ([colors](https://uploadcare.com/docs/effects-enhancements/#image-color-profile-management)) +* Native uploads on mobile ([iOS](https://uploadcare.com/docs/integrations/swift/), [Android](https://uploadcare.com/docs/integrations/android/)) +* SVG transformations ([rasterization](https://uploadcare.com/docs/transformations/image/svg/)) +* Remove geolocation data ([strip](https://uploadcare.com/docs/transformations/image/compression/#meta-information-control) + [workaround](https://uploadcare.com/docs/mutability/)) +* Download static files for scrsets ([webpack](https://github.com/uploadcare/uploadcare-loader)) +* Substitute DB with arbitrary metadata ([metadata](https://uploadcare.com/docs/file-metadata/)) +* Prepare OG pictures with text ([text overlays](https://uploadcare.com/docs/transformations/image/overlay/#overlay-text)) +* Scrap pictures from the web ([from url](https://uploadcare.com/docs/uploading-files/#from-url)) +* Make decisions based on files info ([analysis](https://uploadcare.com/docs/file-analysis/) + [webhooks](https://uploadcare.com/docs/webhooks/)) +* Weird file conversions ([file coversion](https://uploadcare.com/docs/transformations/document-conversion/#document-file-formats)) +* Process and save ([copy remotely](https://uploadcare.com/docs/managing-files/#copy)) +* Check for duplicates ([phash](https://uploadcare.com/docs/cdn-operations/#operation-phash)) +* Prepare a bunch of files for download ([archive](https://uploadcare.com/docs/cdn-operations/#get-as-archive)) +* No-code automate uploads ([Zapier](https://uploadcare.com/docs/integrations/zapier/), [Make](https://www.make.com/en/integrations/uploadcare?utm_source=uploadcare&utm_medium=partner&utm_campaign=uploadcare-partner-program), [Integrately](https://uploadcare.com/docs/integrations/integrately/)) +* Do something and don’t store files after it ([storing](https://uploadcare.com/docs/uploads/storage/#file-storing-behavior)) + +## Demo app + +We've developed a demo app that showcases most of the features. You can install +[pyuploadcare-example](https://github.com/uploadcare/pyuploadcare-example) +using Docker or without it. You can use it as a reference or even base your +project on it. + +## Useful links + +[Uploadcare documentation](https://uploadcare.com/docs/) +[File Uploader](https://uploadcare.com/docs/file-uploader/) +[Upload API reference](https://uploadcare.com/api-refs/upload-api/) +[REST API reference](https://uploadcare.com/api-refs/rest-api/) +[URL API reference](https://uploadcare.com/api-refs/url-api/) +[Contributing guide](https://github.com/uploadcare/.github/blob/master/CONTRIBUTING.md) +[Security policy](https://github.com/uploadcare/uploadcare-swift/security/policy) +[Support](https://github.com/uploadcare/.github/blob/master/SUPPORT.md) From ba266a71e4f510df03e74cf6838ec8d6077b1a2f Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Mon, 29 Jan 2024 17:55:49 +0700 Subject: [PATCH 02/25] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 68d5878e..d7e5718d 100644 --- a/README.md +++ b/README.md @@ -96,8 +96,9 @@ pip install pyuploadcare[django] ## Usage example -Let's add [File Uploader][file-uploader] to an existing Django project. Follow -a few simple steps described in our [quickstart](https://pyuploadcare.readthedocs.org/en/latest/quickstart.html). +Let's add [File Uploader](https://uploadcare.com/docs/uploads/storage/#file-storing-behavior) +to an existing Django project. To do so, follow a few simple steps described in +our [quickstart](https://pyuploadcare.readthedocs.org/en/latest/quickstart.html). This will enable users to see the upload progress, pick files from sources like Google Drive or Instagram, and edit a form while files are being uploaded From ddcf3219fcdc2b112e0cafd7eadad703fc28905f Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Mon, 29 Jan 2024 17:58:06 +0700 Subject: [PATCH 03/25] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d7e5718d..67e7c96d 100644 --- a/README.md +++ b/README.md @@ -128,9 +128,10 @@ asynchronously. ## Documentation -Detailed documentation is available [on RTD](https://pyuploadcare.readthedocs.io/en/latest/). +Detailed specification of this library is available +[on RTD](https://pyuploadcare.readthedocs.io/en/latest/). -Though we highly recommend to read [Uploadcare documentation](https://uploadcare.com/docs/) +We highly recommend to check out [Uploadcare documentation](https://uploadcare.com/docs/) to fully understand what our platform enables you. ## Use cases From 1c5a2269dc91c5cfcbe146c41520523f120131f2 Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Mon, 29 Jan 2024 18:01:51 +0700 Subject: [PATCH 04/25] Update README.md --- README.md | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 67e7c96d..ab88f618 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize ## Features -This library consists of the Uploadcare APIs interface and a couple of Django goodies, 100% covering [Upload](https://uploadcare.com/api-refs/upload-api/), [REST](https://uploadcare.com/api-refs/rest-api/) and [URL](https://uploadcare.com/api-refs/url-api/) Uploadcare APIs. +This library consists of the APIs interface and a couple of Django goodies, 100% covering [Upload](https://uploadcare.com/api-refs/upload-api/), [REST](https://uploadcare.com/api-refs/rest-api/) and [URL](https://uploadcare.com/api-refs/url-api/) Uploadcare APIs. Enable obsessively friendly file uploads: * Built-in [File Uploader](https://uploadcare.com/docs/uploads/storage/#file-storing-behavior) @@ -96,13 +96,9 @@ pip install pyuploadcare[django] ## Usage example -Let's add [File Uploader](https://uploadcare.com/docs/uploads/storage/#file-storing-behavior) -to an existing Django project. To do so, follow a few simple steps described in -our [quickstart](https://pyuploadcare.readthedocs.org/en/latest/quickstart.html). +Let's add [File Uploader](https://uploadcare.com/docs/uploads/storage/#file-storing-behavior) to an existing Django project. To do so, follow a few simple steps described in our [quickstart](https://pyuploadcare.readthedocs.org/en/latest/quickstart.html). -This will enable users to see the upload progress, pick files from sources like -Google Drive or Instagram, and edit a form while files are being uploaded -asynchronously. +This will enable users to see the upload progress, pick files from sources like Google Drive or Instagram, and edit a form while files are being uploaded asynchronously. ```python from django import forms @@ -128,20 +124,17 @@ asynchronously. ## Documentation -Detailed specification of this library is available -[on RTD](https://pyuploadcare.readthedocs.io/en/latest/). +Detailed specification of this library is available [on RTD](https://pyuploadcare.readthedocs.io/en/latest/). -We highly recommend to check out [Uploadcare documentation](https://uploadcare.com/docs/) -to fully understand what our platform enables you. +We highly recommend to check out [Uploadcare documentation](https://uploadcare.com/docs/) to fully understand what our platform enables you. ## Use cases -In this section, we also want to showcase some common use cases you can solve -with Uploadcare, regardless of using Python integration. +In this section, we also want to showcase some common use cases you can solve with Uploadcare, regardless of using Python integration. Main use cases: * Accept user-generated content ([file uploader](https://uploadcare.com/docs/file-uploader/), [upload sources](https://uploadcare.com/docs/upload-sources/)) -* Serve responsive images ([optimization](https://uploadcare.com/docs/transformations/image/compression/), [proxy](https://uploadcare.com/docs/delivery/proxy/), [adaptive image](https://uploadcare.com/docs/adaptive-image/) and other [integrations](https://uploadcare.com/docs/integrations/)) +* Serve responsive images ([optimization](https://uploadcare.com/docs/transformations/image/compression/), [proxy](https://uploadcare.com/docs/delivery/proxy/), [adaptive image](https://uploadcare.com/docs/adaptive-image/) and other [integrations](https://uploadcare.com/docs/integrations/)) Common: * Art-direction of the content on your page ([transformations](https://uploadcare.com/docs/transformations/image/), [remove.bg](https://uploadcare.com/docs/remove-bg/), [smart crop](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-smart-crop), [scale crop](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-scale-crop), [smart resize](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-smart-resize), [zoom](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-zoom-objects), [circle](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-border-radius), [fill](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-setfill)) @@ -172,10 +165,7 @@ Less common: ## Demo app -We've developed a demo app that showcases most of the features. You can install -[pyuploadcare-example](https://github.com/uploadcare/pyuploadcare-example) -using Docker or without it. You can use it as a reference or even base your -project on it. +We've developed a demo app that showcases most of the features. You can install [pyuploadcare-example](https://github.com/uploadcare/pyuploadcare-example) using Docker or without it. You can use it as a reference or even base your project on it. ## Useful links From ea29e5fe9dd34ffd370bc895707ee7e1e7bb87ab Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Mon, 29 Jan 2024 18:07:07 +0700 Subject: [PATCH 05/25] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab88f618..0c356fee 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize * [Features](#features) * [Requirements and installation](#requirements-and-installation) -* [Documentation](#documentation) * [Usage example](#usage-example) +* [Documentation](#documentation) * [Use cases](#use-cases) * [Demo app](#demo-app) * [Useful links](#useful-links) @@ -130,7 +130,7 @@ We highly recommend to check out [Uploadcare documentation](https://uploadcare.c ## Use cases -In this section, we also want to showcase some common use cases you can solve with Uploadcare, regardless of using Python integration. +To help you figure what this library can help you with, we want to showcase some use cases that you can solve with Uploadcare. Main use cases: * Accept user-generated content ([file uploader](https://uploadcare.com/docs/file-uploader/), [upload sources](https://uploadcare.com/docs/upload-sources/)) From 689a0bc704c55363987651a396301dbfe96f0d62 Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 13:28:23 +0700 Subject: [PATCH 06/25] Update README.md --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 0c356fee..2423d255 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize, and deliver images, videos, and documents to billions of users. * [Features](#features) +* [Documentation](#documentation) * [Requirements and installation](#requirements-and-installation) * [Usage example](#usage-example) -* [Documentation](#documentation) * [Use cases](#use-cases) * [Demo app](#demo-app) * [Useful links](#useful-links) @@ -19,8 +19,14 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize This library consists of the APIs interface and a couple of Django goodies, 100% covering [Upload](https://uploadcare.com/api-refs/upload-api/), [REST](https://uploadcare.com/api-refs/rest-api/) and [URL](https://uploadcare.com/api-refs/url-api/) Uploadcare APIs. -Enable obsessively friendly file uploads: -* Built-in [File Uploader](https://uploadcare.com/docs/uploads/storage/#file-storing-behavior) +* Enable obsessively friendly file uploads +* Store files the way you need +* Handle all files smart & RESTfully +* Process images on the fly right before delivery time +* Fast and reliable delivery + + + +## Documentation + +Detailed specification of this library is available [on RTD](https://pyuploadcare.readthedocs.io/en/latest/). +In this spreadsheet we also provide links to the [Uploadcare documentation](https://uploadcare.com/docs/) so you can fully understand what our platform enables. + +| Feature | Description | Manual | Specification | +| ------------------------------ | ----------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| _Uploading_ | | [_Overview_](https://uploadcare.com/docs/uploads/) | [_Upload API reference_](https://uploadcare.com/api-refs/upload-api/) | +| Uploading files | | [Manual](https://uploadcare.com/docs/uploading-files/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#uploading-files) | +| File Uploader | | [Manual](https://uploadcare.com/docs/file-uploader/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/django-widget.html) | +| Storage options | | [Manual](https://uploadcare.com/docs/uploads/storage/) | ? | +| Signed uploads | | [Manual](https://uploadcare.com/docs/security/secure-uploads/) | ? | +| File analysis on upload | | [Manual](https://uploadcare.com/docs/file-analysis/) | ? | +| Validation and moderation | | [Manual](https://uploadcare.com/docs/moderation/) | N/A | +| _File management_ | | [_Overview_](https://uploadcare.com/docs/start/file-management/) | [_REST API reference_](https://uploadcare.com/api-refs/rest-api/) | +| Managing files | | [Manual](https://uploadcare.com/docs/managing-files/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#list-files) | +| Projects | | [Manual](https://uploadcare.com/docs/start/settings/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#get-project-info) | +| Webhook notifications | | [Manual](https://uploadcare.com/docs/webhooks/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#create-webhook) | +| S3 bucket integration | | [Manual](https://uploadcare.com/docs/s3-integration/) | N/A | +| Arbitrary file metadata | | [Manual](https://uploadcare.com/docs/file-metadata/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#file-metadata) | +| Video processing | | [Manual](https://uploadcare.com/docs/transformations/video-encoding/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#video-conversion) | +| Document conversion | | [Manual](https://uploadcare.com/docs/transformations/document-conversion/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#document-conversion) | +| Unsafe content detection | | [Manual](https://uploadcare.com/docs/unsafe-content/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | +| Object recognition | | [Manual](https://uploadcare.com/docs/intelligence/object-recognition/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | +| Malware protection | | [Manual](https://uploadcare.com/docs/security/malware-protection/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | +| _Delivery_ | | [_Overview_](https://uploadcare.com/docs/delivery/) | [_URL API_](https://uploadcare.com/api-refs/url-api/) | +| On-the-fly operations | | [Manual](https://uploadcare.com/docs/cdn-operations/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | +| Image optimization | | [Manual](https://uploadcare.com/docs/transformations/image/compression/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | +| Image transformation | | [Manual](https://uploadcare.com/docs/transformations/image/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | +| CDN settings | | [Manual](https://uploadcare.com/docs/delivery/cdn/) | N/A | +| Fetch and deliver remote files | | [Manual](https://uploadcare.com/docs/delivery/proxy/) | N/A | +| Signed URLs | | [Manual](https://uploadcare.com/docs/security/secure-delivery/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#secure-delivery) | ## Requirements and installation @@ -68,13 +107,13 @@ To use pyuploadcare with Python 2.7 please install `pyuploadcare < 3.0`. Django compatibility: -| Py/Dj | 2.2 | 3.0 | 3.1 | 3.2 | 4.0 | 4.1 | 4.2 | 5.0 | -|-------|-----|-----|-----|-----|-----|-----|-----|-----| -| 3.8 | X | X | X | X | X | X | X | | -| 3.9 | X | X | X | X | X | X | X | | -| 3.10 | | | | X | X | X | X | X | -| 3.11 | | | | | | X | X | X | -| 3.12 | | | | | | | X | X | +| Py/Dj | 2.2 | 3.0 | 3.1 | 3.2 | 4.0 | 4.1 | 4.2 | 5.0 | +| ----- | --- | --- | --- | --- | --- | --- | --- | --- | +| 3.8 | X | X | X | X | X | X | X | | +| 3.9 | X | X | X | X | X | X | X | | +| 3.10 | | | | X | X | X | X | X | +| 3.11 | | | | | | X | X | X | +| 3.12 | | | | | | | X | X | In order to install `pyuploadcare`, run these commands in CLI: @@ -122,12 +161,6 @@ This will enable users to see the upload progress, pick files from sources like ![](https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/josi.png) -## Documentation - -Detailed specification of this library is available [on RTD](https://pyuploadcare.readthedocs.io/en/latest/). - -We highly recommend to check out [Uploadcare documentation](https://uploadcare.com/docs/) to fully understand what our platform enables you. - ## Use cases To help you figure what this library can help you with, we want to showcase some use cases that you can solve with Uploadcare. From 89b506c6bb926bb7f757b23bcc3a6ab6dc753673 Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 13:30:21 +0700 Subject: [PATCH 07/25] Update README.md --- README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2423d255..27d0dc77 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize * [Usage example](#usage-example) * [Use cases](#use-cases) * [Demo app](#demo-app) -* [Useful links](#useful-links) +* [Suggestions or questions](#suggestions-or-questions) ## Features @@ -200,13 +200,8 @@ Less common: We've developed a demo app that showcases most of the features. You can install [pyuploadcare-example](https://github.com/uploadcare/pyuploadcare-example) using Docker or without it. You can use it as a reference or even base your project on it. -## Useful links +## Suggestions or questions -[Uploadcare documentation](https://uploadcare.com/docs/) -[File Uploader](https://uploadcare.com/docs/file-uploader/) -[Upload API reference](https://uploadcare.com/api-refs/upload-api/) -[REST API reference](https://uploadcare.com/api-refs/rest-api/) -[URL API reference](https://uploadcare.com/api-refs/url-api/) [Contributing guide](https://github.com/uploadcare/.github/blob/master/CONTRIBUTING.md) [Security policy](https://github.com/uploadcare/uploadcare-swift/security/policy) [Support](https://github.com/uploadcare/.github/blob/master/SUPPORT.md) From 7034cece8d6010b87e848d2945574107df840d3f Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 13:40:00 +0700 Subject: [PATCH 08/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27d0dc77..32cc9607 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ In this spreadsheet we also provide links to the [Uploadcare documentation](http | File Uploader | | [Manual](https://uploadcare.com/docs/file-uploader/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/django-widget.html) | | Storage options | | [Manual](https://uploadcare.com/docs/uploads/storage/) | ? | | Signed uploads | | [Manual](https://uploadcare.com/docs/security/secure-uploads/) | ? | -| File analysis on upload | | [Manual](https://uploadcare.com/docs/file-analysis/) | ? | +| File analysis on upload | | [Manual](https://uploadcare.com/docs/file-analysis/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#retrieve-files) | | Validation and moderation | | [Manual](https://uploadcare.com/docs/moderation/) | N/A | | _File management_ | | [_Overview_](https://uploadcare.com/docs/start/file-management/) | [_REST API reference_](https://uploadcare.com/api-refs/rest-api/) | | Managing files | | [Manual](https://uploadcare.com/docs/managing-files/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#list-files) | From ccdd539514555d39261f1c3e2b6dda15ad29651b Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 13:42:00 +0700 Subject: [PATCH 09/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32cc9607..b4f2a2c0 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ In this spreadsheet we also provide links to the [Uploadcare documentation](http | _Uploading_ | | [_Overview_](https://uploadcare.com/docs/uploads/) | [_Upload API reference_](https://uploadcare.com/api-refs/upload-api/) | | Uploading files | | [Manual](https://uploadcare.com/docs/uploading-files/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#uploading-files) | | File Uploader | | [Manual](https://uploadcare.com/docs/file-uploader/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/django-widget.html) | -| Storage options | | [Manual](https://uploadcare.com/docs/uploads/storage/) | ? | +| Storage options | | [Manual](https://uploadcare.com/docs/uploads/storage/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#store-files) | | Signed uploads | | [Manual](https://uploadcare.com/docs/security/secure-uploads/) | ? | | File analysis on upload | | [Manual](https://uploadcare.com/docs/file-analysis/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#retrieve-files) | | Validation and moderation | | [Manual](https://uploadcare.com/docs/moderation/) | N/A | From 0b90fc531f782dc412aa5fded74dc12990401ebc Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 13:49:04 +0700 Subject: [PATCH 10/25] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b4f2a2c0..275d553e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize * [Usage example](#usage-example) * [Use cases](#use-cases) * [Demo app](#demo-app) -* [Suggestions or questions](#suggestions-or-questions) +* [Suggestions and questions](#suggestions-and-questions) ## Features @@ -200,7 +200,7 @@ Less common: We've developed a demo app that showcases most of the features. You can install [pyuploadcare-example](https://github.com/uploadcare/pyuploadcare-example) using Docker or without it. You can use it as a reference or even base your project on it. -## Suggestions or questions +## Suggestions and questions [Contributing guide](https://github.com/uploadcare/.github/blob/master/CONTRIBUTING.md) [Security policy](https://github.com/uploadcare/uploadcare-swift/security/policy) From 1976bf181a33f36e87fa0ee95f7ff94d68349704 Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 14:46:43 +0700 Subject: [PATCH 11/25] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 275d553e..6a7f675a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize * [Requirements and installation](#requirements-and-installation) * [Usage example](#usage-example) * [Use cases](#use-cases) -* [Demo app](#demo-app) +* [Demo app (Docker)](#demo-app) * [Suggestions and questions](#suggestions-and-questions) ## Features @@ -166,7 +166,7 @@ This will enable users to see the upload progress, pick files from sources like To help you figure what this library can help you with, we want to showcase some use cases that you can solve with Uploadcare. Main use cases: -* Accept user-generated content ([file uploader](https://uploadcare.com/docs/file-uploader/), [upload sources](https://uploadcare.com/docs/upload-sources/)) +* Accept user-generated content ([upload api](https://uploadcare.com/docs/uploading-files/), [file uploader](https://uploadcare.com/docs/file-uploader/), [upload sources](https://uploadcare.com/docs/upload-sources/)) * Serve responsive images ([optimization](https://uploadcare.com/docs/transformations/image/compression/), [proxy](https://uploadcare.com/docs/delivery/proxy/), [adaptive image](https://uploadcare.com/docs/adaptive-image/) and other [integrations](https://uploadcare.com/docs/integrations/)) Common: From 35183d9846a020615fd07c6d3e3d5b48888ee02e Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 14:47:28 +0700 Subject: [PATCH 12/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a7f675a..0cf4488d 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ To help you figure what this library can help you with, we want to showcase some Main use cases: * Accept user-generated content ([upload api](https://uploadcare.com/docs/uploading-files/), [file uploader](https://uploadcare.com/docs/file-uploader/), [upload sources](https://uploadcare.com/docs/upload-sources/)) -* Serve responsive images ([optimization](https://uploadcare.com/docs/transformations/image/compression/), [proxy](https://uploadcare.com/docs/delivery/proxy/), [adaptive image](https://uploadcare.com/docs/adaptive-image/) and other [integrations](https://uploadcare.com/docs/integrations/)) +* Serve responsive images ([optimization](https://uploadcare.com/docs/transformations/image/compression/), [adaptive image SDK](https://uploadcare.com/docs/adaptive-image/), [proxy](https://uploadcare.com/docs/delivery/proxy/), and other [integrations](https://uploadcare.com/docs/integrations/)) Common: * Art-direction of the content on your page ([transformations](https://uploadcare.com/docs/transformations/image/), [remove.bg](https://uploadcare.com/docs/remove-bg/), [smart crop](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-smart-crop), [scale crop](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-scale-crop), [smart resize](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-smart-resize), [zoom](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-zoom-objects), [circle](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-border-radius), [fill](https://uploadcare.com/docs/transformations/image/resize-crop/#operation-setfill)) From d09aab0899e7e05e49d0b99b551801af3fa2a6e0 Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 17:41:03 +0700 Subject: [PATCH 13/25] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0cf4488d..0b7ee602 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Fast and reliable delivery: ## Documentation Detailed specification of this library is available [on RTD](https://pyuploadcare.readthedocs.io/en/latest/). + In this spreadsheet we also provide links to the [Uploadcare documentation](https://uploadcare.com/docs/) so you can fully understand what our platform enables. | Feature | Description | Manual | Specification | From 5e96a2d81ad38e557c33515cfefb455d1026b7cf Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 17:44:13 +0700 Subject: [PATCH 14/25] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0b7ee602..07e53da3 100644 --- a/README.md +++ b/README.md @@ -72,14 +72,14 @@ In this spreadsheet we also provide links to the [Uploadcare documentation](http | Feature | Description | Manual | Specification | | ------------------------------ | ----------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| _Uploading_ | | [_Overview_](https://uploadcare.com/docs/uploads/) | [_Upload API reference_](https://uploadcare.com/api-refs/upload-api/) | +| _Uploading_ | | [_Overview_](https://uploadcare.com/docs/uploads/) | | | Uploading files | | [Manual](https://uploadcare.com/docs/uploading-files/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#uploading-files) | | File Uploader | | [Manual](https://uploadcare.com/docs/file-uploader/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/django-widget.html) | | Storage options | | [Manual](https://uploadcare.com/docs/uploads/storage/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#store-files) | | Signed uploads | | [Manual](https://uploadcare.com/docs/security/secure-uploads/) | ? | | File analysis on upload | | [Manual](https://uploadcare.com/docs/file-analysis/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#retrieve-files) | | Validation and moderation | | [Manual](https://uploadcare.com/docs/moderation/) | N/A | -| _File management_ | | [_Overview_](https://uploadcare.com/docs/start/file-management/) | [_REST API reference_](https://uploadcare.com/api-refs/rest-api/) | +| _File management_ | | [_Overview_](https://uploadcare.com/docs/start/file-management/) | | | Managing files | | [Manual](https://uploadcare.com/docs/managing-files/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#list-files) | | Projects | | [Manual](https://uploadcare.com/docs/start/settings/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#get-project-info) | | Webhook notifications | | [Manual](https://uploadcare.com/docs/webhooks/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#create-webhook) | @@ -90,7 +90,7 @@ In this spreadsheet we also provide links to the [Uploadcare documentation](http | Unsafe content detection | | [Manual](https://uploadcare.com/docs/unsafe-content/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | | Object recognition | | [Manual](https://uploadcare.com/docs/intelligence/object-recognition/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | | Malware protection | | [Manual](https://uploadcare.com/docs/security/malware-protection/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | -| _Delivery_ | | [_Overview_](https://uploadcare.com/docs/delivery/) | [_URL API_](https://uploadcare.com/api-refs/url-api/) | +| _Delivery_ | | [_Overview_](https://uploadcare.com/docs/delivery/) | | | On-the-fly operations | | [Manual](https://uploadcare.com/docs/cdn-operations/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | | Image optimization | | [Manual](https://uploadcare.com/docs/transformations/image/compression/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | | Image transformation | | [Manual](https://uploadcare.com/docs/transformations/image/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | From ffd06de1f0c291d3cda3b5f2225c4ca8b8b3b964 Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Tue, 30 Jan 2024 17:55:31 +0700 Subject: [PATCH 15/25] Update README.md --- README.md | 57 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 07e53da3..c7ef2161 100644 --- a/README.md +++ b/README.md @@ -69,34 +69,35 @@ Fast and reliable delivery: Detailed specification of this library is available [on RTD](https://pyuploadcare.readthedocs.io/en/latest/). In this spreadsheet we also provide links to the [Uploadcare documentation](https://uploadcare.com/docs/) so you can fully understand what our platform enables. - -| Feature | Description | Manual | Specification | -| ------------------------------ | ----------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| _Uploading_ | | [_Overview_](https://uploadcare.com/docs/uploads/) | | -| Uploading files | | [Manual](https://uploadcare.com/docs/uploading-files/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#uploading-files) | -| File Uploader | | [Manual](https://uploadcare.com/docs/file-uploader/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/django-widget.html) | -| Storage options | | [Manual](https://uploadcare.com/docs/uploads/storage/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#store-files) | -| Signed uploads | | [Manual](https://uploadcare.com/docs/security/secure-uploads/) | ? | -| File analysis on upload | | [Manual](https://uploadcare.com/docs/file-analysis/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#retrieve-files) | -| Validation and moderation | | [Manual](https://uploadcare.com/docs/moderation/) | N/A | -| _File management_ | | [_Overview_](https://uploadcare.com/docs/start/file-management/) | | -| Managing files | | [Manual](https://uploadcare.com/docs/managing-files/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#list-files) | -| Projects | | [Manual](https://uploadcare.com/docs/start/settings/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#get-project-info) | -| Webhook notifications | | [Manual](https://uploadcare.com/docs/webhooks/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#create-webhook) | -| S3 bucket integration | | [Manual](https://uploadcare.com/docs/s3-integration/) | N/A | -| Arbitrary file metadata | | [Manual](https://uploadcare.com/docs/file-metadata/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#file-metadata) | -| Video processing | | [Manual](https://uploadcare.com/docs/transformations/video-encoding/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#video-conversion) | -| Document conversion | | [Manual](https://uploadcare.com/docs/transformations/document-conversion/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#document-conversion) | -| Unsafe content detection | | [Manual](https://uploadcare.com/docs/unsafe-content/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | -| Object recognition | | [Manual](https://uploadcare.com/docs/intelligence/object-recognition/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | -| Malware protection | | [Manual](https://uploadcare.com/docs/security/malware-protection/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | -| _Delivery_ | | [_Overview_](https://uploadcare.com/docs/delivery/) | | -| On-the-fly operations | | [Manual](https://uploadcare.com/docs/cdn-operations/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | -| Image optimization | | [Manual](https://uploadcare.com/docs/transformations/image/compression/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | -| Image transformation | | [Manual](https://uploadcare.com/docs/transformations/image/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | -| CDN settings | | [Manual](https://uploadcare.com/docs/delivery/cdn/) | N/A | -| Fetch and deliver remote files | | [Manual](https://uploadcare.com/docs/delivery/proxy/) | N/A | -| Signed URLs | | [Manual](https://uploadcare.com/docs/security/secure-delivery/) | [Specification](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#secure-delivery) | +Manual describes a product feature, and code leads to the library code specification. + +| Feature | Description | Manual | Code | +| ------------------------------ | ----------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| _Uploading_ | | [_Overview_](https://uploadcare.com/docs/uploads/) | | +| Uploading files | | [Manual](https://uploadcare.com/docs/uploading-files/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#uploading-files) | +| File Uploader | | [Manual](https://uploadcare.com/docs/file-uploader/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/django-widget.html) | +| Storage options | | [Manual](https://uploadcare.com/docs/uploads/storage/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#store-files) | +| Signed uploads | | [Manual](https://uploadcare.com/docs/security/secure-uploads/) | ? | +| File analysis on upload | | [Manual](https://uploadcare.com/docs/file-analysis/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#retrieve-files) | +| Validation and moderation | | [Manual](https://uploadcare.com/docs/moderation/) | N/A | +| _File management_ | | [_Overview_](https://uploadcare.com/docs/start/file-management/) | | +| Managing files | | [Manual](https://uploadcare.com/docs/managing-files/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#list-files) | +| Projects | | [Manual](https://uploadcare.com/docs/start/settings/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#get-project-info) | +| Webhook notifications | | [Manual](https://uploadcare.com/docs/webhooks/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#create-webhook) | +| S3 bucket integration | | [Manual](https://uploadcare.com/docs/s3-integration/) | N/A | +| Arbitrary file metadata | | [Manual](https://uploadcare.com/docs/file-metadata/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#file-metadata) | +| Video processing | | [Manual](https://uploadcare.com/docs/transformations/video-encoding/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#video-conversion) | +| Document conversion | | [Manual](https://uploadcare.com/docs/transformations/document-conversion/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#document-conversion) | +| Unsafe content detection | | [Manual](https://uploadcare.com/docs/unsafe-content/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | +| Object recognition | | [Manual](https://uploadcare.com/docs/intelligence/object-recognition/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | +| Malware protection | | [Manual](https://uploadcare.com/docs/security/malware-protection/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#using-addons) | +| _Delivery_ | | [_Overview_](https://uploadcare.com/docs/delivery/) | | +| On-the-fly operations | | [Manual](https://uploadcare.com/docs/cdn-operations/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | +| Image optimization | | [Manual](https://uploadcare.com/docs/transformations/image/compression/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | +| Image transformation | | [Manual](https://uploadcare.com/docs/transformations/image/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#image-transformations) | +| CDN settings | | [Manual](https://uploadcare.com/docs/delivery/cdn/) | N/A | +| Fetch and deliver remote files | | [Manual](https://uploadcare.com/docs/delivery/proxy/) | N/A | +| Signed URLs | | [Manual](https://uploadcare.com/docs/security/secure-delivery/) | [Code](https://pyuploadcare.readthedocs.io/en/latest/core_api.html#secure-delivery) | ## Requirements and installation From d12f8b1f6d95dee252801152272f4e95737270e3 Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Fri, 9 Feb 2024 15:52:08 +0700 Subject: [PATCH 16/25] Update README.md --- README.md | 173 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 137 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index c7ef2161..c0cd5bc6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ +

+ + + + + Uploadcare logo + + +

+

+ Package Docs • + Uploadcare Docs • + Upload API Reference • + REST API Reference • + URL API Reference • + Website +

+ # Python API client for Uploadcare [![](https://badge.fury.io/py/pyuploadcare.svg)](https://pypi.org/project/pyuploadcare/) @@ -19,11 +37,9 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize This library consists of the APIs interface and a couple of Django goodies, 100% covering [Upload](https://uploadcare.com/api-refs/upload-api/), [REST](https://uploadcare.com/api-refs/rest-api/) and [URL](https://uploadcare.com/api-refs/url-api/) Uploadcare APIs. -* Enable obsessively friendly file uploads -* Store files the way you need -* Handle all files smart & RESTfully -* Process images on the fly right before delivery time -* Fast and reliable delivery +* Enable obsessively friendly [file uploads](http://uploadcare.com/products/file-uploader/) +* Manage stored files RESTfully: from malware detection to file conversion +* [Optimize and process images on the fly](https://uploadcare.com/cdn/image-cdn/) right before delivery time + + +Let's add [File Uploader](https://uploadcare.com/docs/file-uploader/) to an existing Django project. + +After package [installation](#requirements-and-installation), you’ll need API keys: public and secret. Get them in [Uploadcare dashboard](https://app.uploadcare.com/projects/-/api-keys). If you don’t have an account yet, you can use demo keys, as in example. However, the files on demo account are regularly removed, so create an account as soon as Uploadcare catches your fancy. + +Assume you have a Django project with gallery app. + +Add `pyuploadcare.dj` into `INSTALLED_APPS`: + +```python +INSTALLED_APPS = ( + # ... + 'pyuploadcare.dj', + + 'gallery', +) +``` +Add API keys to your Django settings file: + +```python +UPLOADCARE = { + 'pub_key': 'demopublickey', + 'secret': 'demoprivatekey', +} +``` + +Uploadcare image field adding to your `gallery/models.py` is really simple. Like that: + +```python +from django.db import models + +from pyuploadcare.dj.models import ImageField + + +class Photo(models.Model): + + title = models.CharField(max_length=255) + photo = ImageField() +``` + +`ImageField` doesn’t require any arguments, file paths or whatever. **It just works**. That’s the point of it all. It looks nice in the admin interface as well: + + +![](https://ucarecdn.com/84e614e4-8faf-4090-ba3a-83294715434b/) + +Obviously, you would want to use Uploadcare field outside an admin. It’s going to work just as well, but, however, you have to remember to add {{ form.media }} in the tag of your page: + +```python +{{ form.media }} + +
+ {% csrf_token %} + {{ form.as_p }} + +
+``` + +This is a default Django form property which is going to render any scripts needed for the form to work, in our case — Uploadcare scripts. + + +After an image is uploaded, you can deliver it while transforming it on the fly: + +```python +{% for photo in photos %} + {{ photo.title }} + {{ photo.photo.cdn_url }}-/resize/400x300/-/effect/flip/-/effect/grayscale/ +{% endfor %} +``` + +(Refer to Uploadcare [image processing docs](https://uploadcare.com/docs/transformations/image/) for more information). + + This will enable users to see the upload progress, pick files from sources like Google Drive or Instagram, and edit a form while files are being uploaded asynchronously. ```python @@ -163,8 +223,48 @@ This will enable users to see the upload progress, pick files from sources like ![](https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/josi.png) +## Testing + +To run tests using [Github Actions](https://github.com/uploadcare/pyuploadcare/actions) workflows, but locally, install the [act](https://github.com/nektos/act) utility, and then run it: + +```make test_with_github_actions``` + +This runs the full suite of tests across Python and Django versions. + + ## Demo app From ebe19334e7a13c78f079b2e9a1710973023ee7eb Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Mon, 12 Feb 2024 14:57:51 +0700 Subject: [PATCH 17/25] Update README.md --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c0cd5bc6..f2d7fbff 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize * [Documentation](#documentation) * [Requirements and installation](#requirements-and-installation) * [Usage example](#usage-example) -* [Use cases](#use-cases) + * [Demo app (Docker)](#demo-app) * [Suggestions and questions](#suggestions-and-questions) @@ -104,18 +104,12 @@ Django compatibility: | 3.11 | | | | | | X | X | X | | 3.12 | | | | | | | X | X | -In order to install `pyuploadcare`, run these commands in CLI: +In order to install `pyuploadcare`, run these command in CLI: ```bash pip install pyuploadcare ``` -or, if you prefer it the old way: - -```bash -easy_install pyuploadcare -``` - To use in Django project install with extra dependencies: ```bash @@ -306,5 +300,5 @@ We've developed a demo app that showcases most of the features. You can install ## Suggestions and questions [Contributing guide](https://github.com/uploadcare/.github/blob/master/CONTRIBUTING.md) -[Security policy](https://github.com/uploadcare/uploadcare-swift/security/policy) +[Security policy](https://github.com/uploadcare/pyuploadcare/security/policy) [Support](https://github.com/uploadcare/.github/blob/master/SUPPORT.md) From ebb4628e19eb8b3e94cfbb99b1ec331612f18aca Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Wed, 14 Feb 2024 14:16:48 +0700 Subject: [PATCH 18/25] Update README.md --- README.md | 114 ++---------------------------------------------------- 1 file changed, 4 insertions(+), 110 deletions(-) diff --git a/README.md b/README.md index f2d7fbff..929dc308 100644 --- a/README.md +++ b/README.md @@ -37,48 +37,10 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize This library consists of the APIs interface and a couple of Django goodies, 100% covering [Upload](https://uploadcare.com/api-refs/upload-api/), [REST](https://uploadcare.com/api-refs/rest-api/) and [URL](https://uploadcare.com/api-refs/url-api/) Uploadcare APIs. -* Enable obsessively friendly [file uploads](http://uploadcare.com/products/file-uploader/) -* Manage stored files RESTfully: from malware detection to file conversion -* [Optimize and process images on the fly](https://uploadcare.com/cdn/image-cdn/) right before delivery time - - +* [Upload](https://uploadcare.com/docs/uploads/) files from anywhere via API or ready-made File Uploader +* [Manage](https://uploadcare.com/docs/start/file-management/) stored files and perform various actions and conversions with them +* [Optimize](https://uploadcare.com/docs/transformations/image/compression/) and [transform](https://uploadcare.com/docs/transformations/image/) images on the fly +* [Deliver](https://uploadcare.com/docs/delivery/) files fast and secure ## Documentation @@ -225,74 +187,6 @@ To run tests using [Github Actions](https://github.com/uploadcare/pyuploadcare/a This runs the full suite of tests across Python and Django versions. - - ## Demo app We've developed a demo app that showcases most of the features. You can install [pyuploadcare-example](https://github.com/uploadcare/pyuploadcare-example) using Docker or without it. You can use it as a reference or even base your project on it. From 733caec87b7238c4d3ed3e8549f2d445083391b4 Mon Sep 17 00:00:00 2001 From: Evgeniy Kirov Date: Thu, 15 Feb 2024 13:50:32 +0100 Subject: [PATCH 19/25] tiny updates to examples in the readme and in the docs --- README.md | 38 ++++++++++++++++++++++---------------- docs/django-widget.rst | 4 +--- docs/index.rst | 10 ++++------ 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 929dc308..c7848bc2 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,12 @@ pip install pyuploadcare[django] ## Usage example +### Basic usage + + + +### Django integration + @@ -129,7 +135,7 @@ class Photo(models.Model): Obviously, you would want to use Uploadcare field outside an admin. It’s going to work just as well, but, however, you have to remember to add {{ form.media }} in the tag of your page: -```python +```htmldjango {{ form.media }}
@@ -144,10 +150,10 @@ This is a default Django form property which is going to render any scripts need After an image is uploaded, you can deliver it while transforming it on the fly: -```python +```htmldjango {% for photo in photos %} - {{ photo.title }} - {{ photo.photo.cdn_url }}-/resize/400x300/-/effect/flip/-/effect/grayscale/ +

{{ photo.title }}

+ {% endfor %} ``` @@ -158,23 +164,23 @@ After an image is uploaded, you can deliver it while transforming it on the fly: This will enable users to see the upload progress, pick files from sources like Google Drive or Instagram, and edit a form while files are being uploaded asynchronously. ```python - from django import forms - from django.db import models +from django import forms +from django.db import models - from pyuploadcare.dj.models import ImageField - from pyuploadcare.dj.forms import FileWidget, ImageField as ImageFormField +from pyuploadcare.dj.models import ImageField +from pyuploadcare.dj.forms import FileWidget, ImageField as ImageFormField - class Candidate(models.Model): - photo = ImageField(blank=True, manual_crop="") +class Candidate(models.Model): + photo = ImageField(blank=True, manual_crop="") - # optional. provide advanced widget options: https://uploadcare.com/docs/uploads/widget/config/#options - class CandidateForm(forms.Form): - photo = ImageFormField(widget=FileWidget(attrs={ - 'data-cdn-base': 'https://cdn.super-candidates.com', - 'data-image-shrink': '1024x1024', - })) +# Optional: provide advanced widget options https://uploadcare.com/docs/file-uploader/options/ +class CandidateForm(forms.Form): + photo = ImageFormField(widget=FileWidget(attrs={ + "source-list": "local,url,camera", + "camera-mirror": True, + })) ``` ![](https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/josi.png) diff --git a/docs/django-widget.rst b/docs/django-widget.rst index 684e0768..f32f4a9b 100644 --- a/docs/django-widget.rst +++ b/docs/django-widget.rst @@ -241,9 +241,7 @@ You can pass any widget `options`_ via ``FileWidget``'s attrs argument: from pyuploadcare.dj.forms import FileWidget, ImageField - # optional. provide advanced widget options: - # https://uploadcare.com/docs/file-uploader/configuration/ - # https://uploadcare.com/docs/file-uploader/options/ + # Optional: provide advanced widget options https://uploadcare.com/docs/file-uploader/options/ class CandidateForm(forms.Form): photo = ImageField(widget=FileWidget(attrs={ "source-list": "local,url,camera", diff --git a/docs/index.rst b/docs/index.rst index 3a2a1586..5d6d712f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -34,13 +34,11 @@ You can find an example project `here`_. photo = ImageField(blank=True, manual_crop='4:3') - # optional. provide advanced widget options: - # https://uploadcare.com/docs/file-uploader/configuration/ - # https://uploadcare.com/docs/file-uploader/options/ + # Optional: provide advanced widget options https://uploadcare.com/docs/file-uploader/options/ class CandidateForm(forms.Form): - photo = ImageField(widget=FileWidget(attrs={ - 'source-list': 'local,url,camera', - 'camera-mirror': True, + photo = ImageFormField(widget=FileWidget(attrs={ + "source-list": "local,url,camera", + "camera-mirror": True, })) .. image:: https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/manual_crop.png From f572a9a7782a24ef73a30b3d88d6f2cf8de4caca Mon Sep 17 00:00:00 2001 From: Evgeniy Kirov Date: Thu, 15 Feb 2024 20:56:33 +0100 Subject: [PATCH 20/25] =?UTF-8?q?README.md:=20added=20Usage=20examples=20?= =?UTF-8?q?=E2=86=92=20Basic=20usage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c7848bc2..55594534 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Build file handling in minutes. Upload or accept UGC, store, transform, optimize * [Features](#features) * [Documentation](#documentation) * [Requirements and installation](#requirements-and-installation) -* [Usage example](#usage-example) +* [Usage examples](#usage-examples) * [Demo app (Docker)](#demo-app) * [Suggestions and questions](#suggestions-and-questions) @@ -78,11 +78,50 @@ To use in Django project install with extra dependencies: pip install pyuploadcare[django] ``` -## Usage example +## Usage examples + +After package [installation](#requirements-and-installation), you’ll need API keys: public and secret. Get them in [Uploadcare dashboard](https://app.uploadcare.com/projects/-/api-keys). If you don’t have an account yet, you can use demo keys, as in example. However, the files on demo account are regularly removed, so create an account as soon as Uploadcare catches your fancy. + +In these examples we’re going to use the aforementioned demo keys. ### Basic usage - +Let’s start with the basics. Say, you want to upload a file: + +```python +from pyuploadcare import Uploadcare + +uploadcare = Uploadcare(public_key="demopublickey", secret_key="demoprivatekey") +with open("sample-file.jpeg", "rb") as file_object: + ucare_file = uploadcare.upload(file_object) +``` + +And your file is now uploaded to the Uploadcare CDN. But how do you access it from the web? It’s really simple: + +```python +print(ucare_file.cdn_url) # file URL, e.g.: https://ucarecdn.com/7d4e9387-26c2-4e58-840e-9254f1871c94/ +``` + +If you don’t have the “Automatic file storing” setting enabled in your project, don’t forget to store the uploaded file: + +```python +ucare_file.store() +print(ucare_file.is_stored) # True +``` + +A whole slew of other file operations are available. Do you want to crop your image, but don't want important information (faces, objects) to be cropped? You can do that with content-aware (“smart”) crop: + +```python +from pyuploadcare.transformations.image import ImageTransformation, ScaleCropMode + +# These two function calls are equivalent +ucare_file.set_effects("scale_crop/512x512/smart/") +ucare_file.set_effects(ImageTransformation().scale_crop(512, 512, mode=ScaleCropMode.smart)) + +print(ucare_file.cdn_url) # https://ucarecdn.com/7d4e9387-26c2-4e58-840e-9254f1871c94/-/scale_crop/512x512/smart/ +``` + +There’s a lot more to uncover. For more information please refer to the [documentation](#documentation). ### Django integration @@ -91,8 +130,6 @@ pip install pyuploadcare[django] Let's add [File Uploader](https://uploadcare.com/docs/file-uploader/) to an existing Django project. -After package [installation](#requirements-and-installation), you’ll need API keys: public and secret. Get them in [Uploadcare dashboard](https://app.uploadcare.com/projects/-/api-keys). If you don’t have an account yet, you can use demo keys, as in example. However, the files on demo account are regularly removed, so create an account as soon as Uploadcare catches your fancy. - Assume you have a Django project with gallery app. Add `pyuploadcare.dj` into `INSTALLED_APPS`: From ef781fd151513b4fe58b0db1b30eb8c827d58ac8 Mon Sep 17 00:00:00 2001 From: Evgeniy Kirov Date: Fri, 16 Feb 2024 17:28:47 +0100 Subject: [PATCH 21/25] [skip ci] README.md: more examples updates --- README.md | 77 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 55594534..8bfd8d25 100644 --- a/README.md +++ b/README.md @@ -99,17 +99,47 @@ with open("sample-file.jpeg", "rb") as file_object: And your file is now uploaded to the Uploadcare CDN. But how do you access it from the web? It’s really simple: ```python -print(ucare_file.cdn_url) # file URL, e.g.: https://ucarecdn.com/7d4e9387-26c2-4e58-840e-9254f1871c94/ +print(ucare_file.cdn_url) # file URL, e.g.: https://ucarecdn.com/640fe4b7-7352-42ca-8d87-0e4387957157/ ``` -If you don’t have the “Automatic file storing” setting enabled in your project, don’t forget to store the uploaded file: +And what about information about the file? ```python -ucare_file.store() -print(ucare_file.is_stored) # True +from pprint import pprint + +pprint(ucare_file.info) + +# {'appdata': None, +# 'content_info': {'image': {'color_mode': , +# 'datetime_original': datetime.datetime(2023, 3, 10, 16, 23, 15), +# 'dpi': (72, 72), +# 'format': 'JPEG', +# 'geo_location': None, +# 'height': 4516, +# 'orientation': 1, +# 'sequence': False, +# 'width': 3011}, +# 'mime': {'mime': 'image/jpeg', +# 'subtype': 'jpeg', +# 'type': 'image'}, +# 'video': None}, +# 'datetime_removed': None, +# 'datetime_stored': datetime.datetime(2024, 2, 16, 14, 44, 29, 637342, tzinfo=TzInfo(UTC)), +# 'datetime_uploaded': datetime.datetime(2024, 2, 16, 14, 44, 29, 395043, tzinfo=TzInfo(UTC)), +# 'is_image': True, +# 'is_ready': True, +# 'metadata': {}, +# 'mime_type': 'image/jpeg', +# 'original_file_url': 'https://ucarecdn.com/640fe4b7-7352-42ca-8d87-0e4387957157/samplefile.jpeg', +# 'original_filename': 'sample-file.jpeg', +# 'size': 3518420, +# 'source': None, +# 'url': 'https://api.uploadcare.com/files/640fe4b7-7352-42ca-8d87-0e4387957157/', +# 'uuid': UUID('640fe4b7-7352-42ca-8d87-0e4387957157'), +# 'variations': None} ``` -A whole slew of other file operations are available. Do you want to crop your image, but don't want important information (faces, objects) to be cropped? You can do that with content-aware (“smart”) crop: +A whole slew of different file operations are available. Do you want to crop your image, but don't want important information (faces, objects) to be cropped? You can do that with content-aware (“smart”) crop: ```python from pyuploadcare.transformations.image import ImageTransformation, ScaleCropMode @@ -118,7 +148,7 @@ from pyuploadcare.transformations.image import ImageTransformation, ScaleCropMod ucare_file.set_effects("scale_crop/512x512/smart/") ucare_file.set_effects(ImageTransformation().scale_crop(512, 512, mode=ScaleCropMode.smart)) -print(ucare_file.cdn_url) # https://ucarecdn.com/7d4e9387-26c2-4e58-840e-9254f1871c94/-/scale_crop/512x512/smart/ +print(ucare_file.cdn_url) # https://ucarecdn.com/640fe4b7-7352-42ca-8d87-0e4387957157/-/scale_crop/512x512/smart/ ``` There’s a lot more to uncover. For more information please refer to the [documentation](#documentation). @@ -130,7 +160,7 @@ There’s a lot more to uncover. For more information please refer to the [docum Let's add [File Uploader](https://uploadcare.com/docs/file-uploader/) to an existing Django project. -Assume you have a Django project with gallery app. +Assume you have a Django project with `gallery` app. Add `pyuploadcare.dj` into `INSTALLED_APPS`: @@ -167,10 +197,9 @@ class Photo(models.Model): `ImageField` doesn’t require any arguments, file paths or whatever. **It just works**. That’s the point of it all. It looks nice in the admin interface as well: - -![](https://ucarecdn.com/84e614e4-8faf-4090-ba3a-83294715434b/) +![](https://ucarecdn.com/6dbac4f4-7cda-42cd-872b-cecf45b9f515/-/scale_crop/900x600/left/) -Obviously, you would want to use Uploadcare field outside an admin. It’s going to work just as well, but, however, you have to remember to add {{ form.media }} in the tag of your page: +Obviously, you would want to use Uploadcare field outside an admin. It’s going to work just as well, but, however, you have to remember to add `{{ form.media }}` in the `` tag of your page: ```htmldjango {{ form.media }} @@ -181,9 +210,10 @@ Obviously, you would want to use Uploadcare field outside an admin. It’s going ``` - This is a default Django form property which is going to render any scripts needed for the form to work, in our case — Uploadcare scripts. +![](https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/josi.png) + After an image is uploaded, you can deliver it while transforming it on the fly: @@ -197,31 +227,6 @@ After an image is uploaded, you can deliver it while transforming it on the fly: (Refer to Uploadcare [image processing docs](https://uploadcare.com/docs/transformations/image/) for more information). - -This will enable users to see the upload progress, pick files from sources like Google Drive or Instagram, and edit a form while files are being uploaded asynchronously. - -```python -from django import forms -from django.db import models - -from pyuploadcare.dj.models import ImageField -from pyuploadcare.dj.forms import FileWidget, ImageField as ImageFormField - - -class Candidate(models.Model): - photo = ImageField(blank=True, manual_crop="") - - -# Optional: provide advanced widget options https://uploadcare.com/docs/file-uploader/options/ -class CandidateForm(forms.Form): - photo = ImageFormField(widget=FileWidget(attrs={ - "source-list": "local,url,camera", - "camera-mirror": True, - })) -``` - -![](https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/josi.png) - ## Testing To run tests using [Github Actions](https://github.com/uploadcare/pyuploadcare/actions) workflows, but locally, install the [act](https://github.com/nektos/act) utility, and then run it: From 35a58be1eda678437618b8300561fe939dde4d3b Mon Sep 17 00:00:00 2001 From: Evgeniy Kirov Date: Fri, 16 Feb 2024 17:41:08 +0100 Subject: [PATCH 22/25] [skip ci] README.md: updated "Django intgration" section intro --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8bfd8d25..65b98f86 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,8 @@ There’s a lot more to uncover. For more information please refer to the [docum Let's add [File Uploader](https://uploadcare.com/docs/file-uploader/) to an existing Django project. +We will allow users to upload their images through a nice and modern UI within the standard Django admin or outside of it, and then display these images on the website and modify them using advanced Uploadcare CDN features. + Assume you have a Django project with `gallery` app. Add `pyuploadcare.dj` into `INSTALLED_APPS`: From 731e23c1555269cb769c327afdd1e60a285584d7 Mon Sep 17 00:00:00 2001 From: Evgeniy Kirov Date: Fri, 16 Feb 2024 17:49:30 +0100 Subject: [PATCH 23/25] [skip ci] README.md: Consistency - apply black (the code formatter) to the examples --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 65b98f86..30f953a6 100644 --- a/README.md +++ b/README.md @@ -169,17 +169,16 @@ Add `pyuploadcare.dj` into `INSTALLED_APPS`: ```python INSTALLED_APPS = ( # ... - 'pyuploadcare.dj', - - 'gallery', + "pyuploadcare.dj", + "gallery", ) ``` Add API keys to your Django settings file: ```python UPLOADCARE = { - 'pub_key': 'demopublickey', - 'secret': 'demoprivatekey', + "pub_key": "demopublickey", + "secret": "demoprivatekey", } ``` @@ -192,7 +191,6 @@ from pyuploadcare.dj.models import ImageField class Photo(models.Model): - title = models.CharField(max_length=255) photo = ImageField() ``` From dffbe479cb6207a08ccf69cdd25b80eb9ae4664c Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Fri, 23 Feb 2024 14:10:19 +0700 Subject: [PATCH 24/25] Prepare for publishing --- README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 30f953a6..4d793f08 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,12 @@ [![](https://readthedocs.org/projects/pyuploadcare/badge/?version=latest)](https://pyuploadcare.readthedocs.io/) [![](https://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/uploadcare) -Build file handling in minutes. Upload or accept UGC, store, transform, optimize, and deliver images, videos, and documents to billions of users. +Build file handling in minutes. Upload or accept user-generated content, store, transform, optimize, and deliver images, videos, and documents to billions of users. * [Features](#features) * [Documentation](#documentation) * [Requirements and installation](#requirements-and-installation) * [Usage examples](#usage-examples) - * [Demo app (Docker)](#demo-app) * [Suggestions and questions](#suggestions-and-questions) @@ -155,9 +154,6 @@ There’s a lot more to uncover. For more information please refer to the [docum ### Django integration - - - Let's add [File Uploader](https://uploadcare.com/docs/file-uploader/) to an existing Django project. We will allow users to upload their images through a nice and modern UI within the standard Django admin or outside of it, and then display these images on the website and modify them using advanced Uploadcare CDN features. @@ -173,6 +169,7 @@ INSTALLED_APPS = ( "gallery", ) ``` + Add API keys to your Django settings file: ```python @@ -214,7 +211,6 @@ This is a default Django form property which is going to render any scripts need ![](https://ucarecdn.com/f0894ef2-352e-406a-8279-737dd6e1f10c/-/resize/800/josi.png) - After an image is uploaded, you can deliver it while transforming it on the fly: ```htmldjango @@ -224,7 +220,6 @@ After an image is uploaded, you can deliver it while transforming it on the fly: {% endfor %} ``` - (Refer to Uploadcare [image processing docs](https://uploadcare.com/docs/transformations/image/) for more information). ## Testing From 5bc452f545a8dae83befac877d5303d138852a2b Mon Sep 17 00:00:00 2001 From: Roman Sedykh Date: Mon, 26 Feb 2024 13:01:11 +0700 Subject: [PATCH 25/25] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 4d793f08..d1082892 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ Build file handling in minutes. Upload or accept user-generated content, store, * [Requirements and installation](#requirements-and-installation) * [Usage examples](#usage-examples) * [Demo app (Docker)](#demo-app) -* [Suggestions and questions](#suggestions-and-questions) ## Features