cloudinary 1.46.0__tar.gz → 1.46.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. cloudinary-1.46.2/LICENSE +21 -0
  2. {cloudinary-1.46.0 → cloudinary-1.46.2}/MANIFEST.in +2 -0
  3. cloudinary-1.46.2/PKG-INFO +221 -0
  4. cloudinary-1.46.2/README.md +150 -0
  5. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/__init__.py +1 -1
  6. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/api.py +2 -2
  7. cloudinary-1.46.2/cloudinary/docs/README.md +63 -0
  8. cloudinary-1.46.2/cloudinary/docs/configure-cloudinary.md +86 -0
  9. cloudinary-1.46.2/cloudinary/docs/get-credentials.md +149 -0
  10. cloudinary-1.46.2/cloudinary/docs/import-and-call.md +29 -0
  11. cloudinary-1.46.2/cloudinary/docs/moderate-upload.md +156 -0
  12. cloudinary-1.46.2/cloudinary/docs/platform-capabilities.md +130 -0
  13. cloudinary-1.46.2/cloudinary/docs/search-and-manage-assets.md +189 -0
  14. cloudinary-1.46.2/cloudinary/docs/sign-browser-upload.md +136 -0
  15. cloudinary-1.46.2/cloudinary/docs/transform-and-deliver-image.md +148 -0
  16. cloudinary-1.46.2/cloudinary/docs/transform-and-deliver-video.md +128 -0
  17. cloudinary-1.46.2/cloudinary/docs/troubleshoot-errors.md +175 -0
  18. cloudinary-1.46.2/cloudinary/docs/upload-image.md +127 -0
  19. cloudinary-1.46.2/cloudinary/docs/upload-large-video.md +112 -0
  20. cloudinary-1.46.2/cloudinary/docs/use-structured-metadata.md +144 -0
  21. cloudinary-1.46.2/cloudinary/docs/use-with-django.md +178 -0
  22. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/uploader.py +50 -6
  23. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/utils.py +14 -1
  24. cloudinary-1.46.2/cloudinary.egg-info/PKG-INFO +221 -0
  25. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary.egg-info/SOURCES.txt +16 -1
  26. {cloudinary-1.46.0 → cloudinary-1.46.2}/pyproject.toml +7 -4
  27. {cloudinary-1.46.0 → cloudinary-1.46.2}/setup.py +1 -1
  28. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_api.py +6 -3
  29. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_uploader.py +89 -4
  30. cloudinary-1.46.0/LICENSE.txt +0 -5
  31. cloudinary-1.46.0/PKG-INFO +0 -174
  32. cloudinary-1.46.0/README.md +0 -119
  33. cloudinary-1.46.0/cloudinary.egg-info/PKG-INFO +0 -174
  34. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/api_client/__init__.py +0 -0
  35. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/api_client/call_account_api.py +0 -0
  36. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/api_client/call_api.py +0 -0
  37. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/api_client/execute_request.py +0 -0
  38. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/api_client/tcp_keep_alive_manager.py +0 -0
  39. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/auth_token.py +0 -0
  40. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/cache/__init__.py +0 -0
  41. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/cache/adapter/__init__.py +0 -0
  42. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/cache/adapter/cache_adapter.py +0 -0
  43. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/cache/adapter/key_value_cache_adapter.py +0 -0
  44. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/cache/responsive_breakpoints_cache.py +0 -0
  45. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/cache/storage/__init__.py +0 -0
  46. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/cache/storage/file_system_key_value_storage.py +0 -0
  47. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/cache/storage/key_value_storage.py +0 -0
  48. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/compat.py +0 -0
  49. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/exceptions.py +0 -0
  50. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/forms.py +0 -0
  51. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/http_client.py +0 -0
  52. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/models.py +0 -0
  53. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/poster/__init__.py +0 -0
  54. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/poster/encode.py +0 -0
  55. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/poster/streaminghttp.py +0 -0
  56. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/provisioning/__init__.py +0 -0
  57. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/provisioning/account.py +0 -0
  58. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/provisioning/account_config.py +0 -0
  59. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/search.py +0 -0
  60. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/search_folders.py +0 -0
  61. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/html/cloudinary_cors.html +0 -0
  62. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/canvas-to-blob.min.js +0 -0
  63. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/jquery.cloudinary.js +0 -0
  64. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/jquery.fileupload-image.js +0 -0
  65. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/jquery.fileupload-process.js +0 -0
  66. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/jquery.fileupload-validate.js +0 -0
  67. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/jquery.fileupload.js +0 -0
  68. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/jquery.iframe-transport.js +0 -0
  69. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/jquery.ui.widget.js +0 -0
  70. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/static/cloudinary/js/load-image.all.min.js +0 -0
  71. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/templates/cloudinary_direct_upload.html +0 -0
  72. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/templates/cloudinary_includes.html +0 -0
  73. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/templates/cloudinary_js_config.html +0 -0
  74. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/templatetags/__init__.py +0 -0
  75. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary/templatetags/cloudinary.py +0 -0
  76. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary.egg-info/dependency_links.txt +0 -0
  77. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary.egg-info/not-zip-safe +0 -0
  78. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary.egg-info/requires.txt +0 -0
  79. {cloudinary-1.46.0 → cloudinary-1.46.2}/cloudinary.egg-info/top_level.txt +0 -0
  80. {cloudinary-1.46.0 → cloudinary-1.46.2}/setup.cfg +0 -0
  81. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_api_authorization.py +0 -0
  82. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_archive.py +0 -0
  83. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_auth_token.py +0 -0
  84. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_cloudinary_resource.py +0 -0
  85. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_config.py +0 -0
  86. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_expression_normalization.py +0 -0
  87. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_http_client.py +0 -0
  88. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_image.py +0 -0
  89. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_metadata.py +0 -0
  90. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_metadata_rules.py +0 -0
  91. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_notifications.py +0 -0
  92. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_provisioning_api.py +0 -0
  93. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_request_id.py +0 -0
  94. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_search.py +0 -0
  95. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_streaming_profiles.py +0 -0
  96. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_triggers.py +0 -0
  97. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_utils.py +0 -0
  98. {cloudinary-1.46.0 → cloudinary-1.46.2}/test/test_video.py +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Cloudinary Ltd.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,4 +1,6 @@
1
1
  include *.txt
2
+ include LICENSE
3
+ recursive-include cloudinary/docs *.md
2
4
  recursive-include cloudinary/templates *.html
3
5
  recursive-include cloudinary/static *.html *.js
4
6
  prune django_tests
@@ -0,0 +1,221 @@
1
+ Metadata-Version: 2.1
2
+ Name: cloudinary
3
+ Version: 1.46.2
4
+ Summary: Upload, transform, optimize, and manage images and videos with Cloudinary from Python or Django.
5
+ Author-email: Cloudinary <info@cloudinary.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) Cloudinary Ltd.
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://cloudinary.com
29
+ Project-URL: Source, https://github.com/cloudinary/pycloudinary
30
+ Project-URL: Changelog, https://raw.githubusercontent.com/cloudinary/pycloudinary/master/CHANGELOG.md
31
+ Keywords: cloudinary,image,video,upload,crop,resize,filter,transformation,manipulation,cdn
32
+ Classifier: Development Status :: 5 - Production/Stable
33
+ Classifier: Environment :: Web Environment
34
+ Classifier: Framework :: Django
35
+ Classifier: Framework :: Django :: 1.11
36
+ Classifier: Framework :: Django :: 2.2
37
+ Classifier: Framework :: Django :: 4.2
38
+ Classifier: Framework :: Django :: 5.0
39
+ Classifier: Framework :: Django :: 5.1
40
+ Classifier: Framework :: Django :: 5.2
41
+ Classifier: Framework :: Django :: 6.0
42
+ Classifier: Intended Audience :: Developers
43
+ Classifier: License :: OSI Approved :: MIT License
44
+ Classifier: Programming Language :: Python
45
+ Classifier: Programming Language :: Python :: 2
46
+ Classifier: Programming Language :: Python :: 2.7
47
+ Classifier: Programming Language :: Python :: 3
48
+ Classifier: Programming Language :: Python :: 3.10
49
+ Classifier: Programming Language :: Python :: 3.11
50
+ Classifier: Programming Language :: Python :: 3.12
51
+ Classifier: Programming Language :: Python :: 3.13
52
+ Classifier: Programming Language :: Python :: 3.14
53
+ Classifier: Topic :: Internet :: WWW/HTTP
54
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
55
+ Classifier: Topic :: Multimedia :: Graphics
56
+ Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
57
+ Classifier: Topic :: Multimedia :: Sound/Audio
58
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
59
+ Classifier: Topic :: Multimedia :: Video
60
+ Classifier: Topic :: Multimedia :: Video :: Conversion
61
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
62
+ Description-Content-Type: text/markdown
63
+ License-File: LICENSE
64
+ Requires-Dist: six
65
+ Requires-Dist: urllib3>=1.26.5
66
+ Requires-Dist: certifi
67
+ Provides-Extra: dev
68
+ Requires-Dist: tox; extra == "dev"
69
+ Requires-Dist: pytest==4.6; python_version < "3.7" and extra == "dev"
70
+ Requires-Dist: pytest; python_version >= "3.7" and extra == "dev"
71
+
72
+ # Cloudinary Python SDK
73
+
74
+ Upload, transform, optimize, and manage images and videos with Cloudinary from Python or Django — the `cloudinary` package on PyPI.
75
+
76
+ [![Tests](https://github.com/cloudinary/pycloudinary/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/cloudinary/pycloudinary/actions/workflows/test.yml)
77
+ [![PyPI](https://img.shields.io/pypi/v/cloudinary.svg)](https://pypi.org/project/cloudinary/)
78
+ [![Downloads](https://img.shields.io/pypi/dm/cloudinary.svg)](https://pypi.org/project/cloudinary/)
79
+ [![License](https://img.shields.io/pypi/l/cloudinary.svg)](LICENSE)
80
+
81
+ ## Install
82
+
83
+ ```bash
84
+ pip install cloudinary
85
+ ```
86
+
87
+ ## Quick start
88
+
89
+ Set your API environment variable (Console > Settings > API Keys):
90
+
91
+ ```bash
92
+ export CLOUDINARY_URL=cloudinary://<api_key>:<api_secret>@<cloud_name>
93
+ ```
94
+
95
+ Upload an image and get an optimized delivery URL:
96
+
97
+ ```python
98
+ import cloudinary
99
+ import cloudinary.uploader # cloudinary.uploader must be imported explicitly
100
+
101
+ # Configuration is read from CLOUDINARY_URL automatically.
102
+
103
+
104
+ def main():
105
+ # Upload a remote image (a local file path works the same way)
106
+ result = cloudinary.uploader.upload(
107
+ "https://res.cloudinary.com/demo/image/upload/sample.jpg",
108
+ public_id="quickstart-sample",
109
+ )
110
+ print("Uploaded: {0}".format(result["public_id"]))
111
+
112
+ # Build a 400x400 auto-cropped URL with automatic format and quality
113
+ url = cloudinary.CloudinaryImage(result["public_id"]).build_url(
114
+ width=400,
115
+ height=400,
116
+ crop="fill",
117
+ gravity="auto",
118
+ fetch_format="auto",
119
+ quality="auto",
120
+ secure=True,
121
+ )
122
+ print("Optimized URL: {0}".format(url))
123
+
124
+
125
+ if __name__ == "__main__":
126
+ try:
127
+ main()
128
+ except Exception as error:
129
+ print("Quick start failed: {0}".format(error))
130
+ print("Check that CLOUDINARY_URL is set (Console > Settings > API Keys).")
131
+ raise SystemExit(1)
132
+ ```
133
+
134
+ Save as `quickstart.py` and run `python quickstart.py`. [Create a free account](https://cloudinary.com/users/register_free) if you don't have one — or call `cloudinary.provisioning.create_cloud()` to [provision one without signing up](cloudinary/docs/get-credentials.md).
135
+
136
+ ## Common tasks
137
+
138
+ - [Get Cloudinary credentials](cloudinary/docs/get-credentials.md)
139
+ - [Upload an image](cloudinary/docs/upload-image.md)
140
+ - [Upload a large video](cloudinary/docs/upload-large-video.md)
141
+ - [Sign a browser upload](cloudinary/docs/sign-browser-upload.md)
142
+ - [Transform and deliver an image](cloudinary/docs/transform-and-deliver-image.md)
143
+ - [Transform and deliver a video](cloudinary/docs/transform-and-deliver-video.md)
144
+ - [Search and manage assets](cloudinary/docs/search-and-manage-assets.md)
145
+ - [Moderate an upload](cloudinary/docs/moderate-upload.md)
146
+ - [Use structured metadata](cloudinary/docs/use-structured-metadata.md)
147
+ - [Use with Django](cloudinary/docs/use-with-django.md)
148
+ - [Troubleshoot errors](cloudinary/docs/troubleshoot-errors.md)
149
+
150
+ Runnable versions live in [`examples/`](examples/) — each is a complete file you can run directly.
151
+
152
+ ## When to use this SDK
153
+
154
+ Use this package in **Python server-side code**, including Django: uploads, signed
155
+ operations, asset administration, search, moderation, and delivery URL generation.
156
+
157
+ For other jobs, better-fitting tools exist:
158
+
159
+ - Browser or frontend framework rendering: the [frontend SDKs](https://cloudinary.com/documentation/frontend_sdks) ([md](https://cloudinary.com/documentation/frontend_sdks.md)).
160
+ - Complete in-browser upload UI: [Upload Widget](https://cloudinary.com/documentation/upload_widget) ([md](https://cloudinary.com/documentation/upload_widget.md)).
161
+ - Text-to-image generation and image-to-video: [platform APIs](https://cloudinary.com/documentation/image_generation_addon) ([md](https://cloudinary.com/documentation/image_generation_addon.md)), not wrapped by this package.
162
+ - Multi-step media workflow automation: [MediaFlows](https://cloudinary.com/documentation/mediaflows_user_guide) ([md](https://cloudinary.com/documentation/mediaflows_user_guide.md)).
163
+ - Interactive agent-driven asset operations: [Cloudinary MCP servers and Skills](https://cloudinary.com/documentation/cloudinary_llm_mcp) ([md](https://cloudinary.com/documentation/cloudinary_llm_mcp.md)).
164
+
165
+ The full capability map — plus the Skills, MCP servers, and CLI worth setting up first —
166
+ is in [cloudinary/docs/platform-capabilities.md](cloudinary/docs/platform-capabilities.md).
167
+
168
+ ## Status and compatibility
169
+
170
+ Stable, actively maintained. See [CHANGELOG.md](CHANGELOG.md).
171
+
172
+ | SDK version | Python | Django |
173
+ |-------------|--------|--------|
174
+ | 1.x | 3.10 – 3.14 | 4.2, 5.0, 5.1, 5.2, 6.0 |
175
+
176
+ The table lists what CI tests on every commit. Older Python and Django releases are
177
+ supported on a best-effort basis.
178
+
179
+ ## Documentation
180
+
181
+ - [Bundled task docs](cloudinary/docs/README.md) — ship inside the package, version-matched.
182
+ - [Python and Django SDK guide](https://cloudinary.com/documentation/django_integration) — the full documentation ([md](https://cloudinary.com/documentation/django_integration.md)).
183
+ - [Python quick start](https://cloudinary.com/documentation/python_quickstart) — a short end-to-end walkthrough ([md](https://cloudinary.com/documentation/python_quickstart.md)).
184
+ - [Transformation and REST API references](https://cloudinary.com/documentation/cloudinary_references) — syntax and examples for all SDKs ([md](https://cloudinary.com/documentation/cloudinary_references.md)).
185
+
186
+ Documentation links in this README point at the browsable HTML page, with an `(md)`
187
+ companion link that returns the same page as raw Markdown. Inside `cloudinary/docs/` and
188
+ `examples/` the links are Markdown-only, since those files are written to be read by
189
+ coding agents. Either form works for any page: add `.md` for Markdown, drop it for HTML.
190
+
191
+ ## For AI coding agents
192
+
193
+ - Contributing to this repo: read [AGENTS.md](AGENTS.md).
194
+ - Using the installed package: the Markdown docs in the installed package's
195
+ `cloudinary/docs/` directory match your installed version and are the source of truth.
196
+ Locate them with
197
+ `python -c "import cloudinary, pathlib; print(pathlib.Path(cloudinary.__file__).parent / 'docs')"`,
198
+ and start with [platform-capabilities](cloudinary/docs/platform-capabilities.md) before
199
+ assuming a feature exists.
200
+
201
+ ## Support
202
+
203
+ - SDK bugs and feature requests: [GitHub issues](https://github.com/cloudinary/pycloudinary/issues)
204
+ - Account and platform questions: [Cloudinary support](https://support.cloudinary.com)
205
+ - Sample projects: [`samples/`](samples/) and the
206
+ [Django Photo Album](https://github.com/cloudinary/cloudinary-django-sample)
207
+ - Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
208
+
209
+ More resources: [Cloudinary Academy](https://training.cloudinary.com/) for courses,
210
+ [code explorers and feature demos](https://cloudinary.com/documentation/code_explorers_demos_index),
211
+ and the [Cloudinary roadmap](https://cloudinary.com/roadmap).
212
+
213
+ ## Security
214
+
215
+ See [SECURITY.md](SECURITY.md) for private vulnerability reporting. Keep your
216
+ `api_secret` in server-side code; for client uploads, use the server-signed pattern in
217
+ [Sign a browser upload](cloudinary/docs/sign-browser-upload.md).
218
+
219
+ ## License
220
+
221
+ Released under the MIT license — see [LICENSE](LICENSE). Copyright (c) Cloudinary Ltd.
@@ -0,0 +1,150 @@
1
+ # Cloudinary Python SDK
2
+
3
+ Upload, transform, optimize, and manage images and videos with Cloudinary from Python or Django — the `cloudinary` package on PyPI.
4
+
5
+ [![Tests](https://github.com/cloudinary/pycloudinary/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/cloudinary/pycloudinary/actions/workflows/test.yml)
6
+ [![PyPI](https://img.shields.io/pypi/v/cloudinary.svg)](https://pypi.org/project/cloudinary/)
7
+ [![Downloads](https://img.shields.io/pypi/dm/cloudinary.svg)](https://pypi.org/project/cloudinary/)
8
+ [![License](https://img.shields.io/pypi/l/cloudinary.svg)](LICENSE)
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pip install cloudinary
14
+ ```
15
+
16
+ ## Quick start
17
+
18
+ Set your API environment variable (Console > Settings > API Keys):
19
+
20
+ ```bash
21
+ export CLOUDINARY_URL=cloudinary://<api_key>:<api_secret>@<cloud_name>
22
+ ```
23
+
24
+ Upload an image and get an optimized delivery URL:
25
+
26
+ ```python
27
+ import cloudinary
28
+ import cloudinary.uploader # cloudinary.uploader must be imported explicitly
29
+
30
+ # Configuration is read from CLOUDINARY_URL automatically.
31
+
32
+
33
+ def main():
34
+ # Upload a remote image (a local file path works the same way)
35
+ result = cloudinary.uploader.upload(
36
+ "https://res.cloudinary.com/demo/image/upload/sample.jpg",
37
+ public_id="quickstart-sample",
38
+ )
39
+ print("Uploaded: {0}".format(result["public_id"]))
40
+
41
+ # Build a 400x400 auto-cropped URL with automatic format and quality
42
+ url = cloudinary.CloudinaryImage(result["public_id"]).build_url(
43
+ width=400,
44
+ height=400,
45
+ crop="fill",
46
+ gravity="auto",
47
+ fetch_format="auto",
48
+ quality="auto",
49
+ secure=True,
50
+ )
51
+ print("Optimized URL: {0}".format(url))
52
+
53
+
54
+ if __name__ == "__main__":
55
+ try:
56
+ main()
57
+ except Exception as error:
58
+ print("Quick start failed: {0}".format(error))
59
+ print("Check that CLOUDINARY_URL is set (Console > Settings > API Keys).")
60
+ raise SystemExit(1)
61
+ ```
62
+
63
+ Save as `quickstart.py` and run `python quickstart.py`. [Create a free account](https://cloudinary.com/users/register_free) if you don't have one — or call `cloudinary.provisioning.create_cloud()` to [provision one without signing up](cloudinary/docs/get-credentials.md).
64
+
65
+ ## Common tasks
66
+
67
+ - [Get Cloudinary credentials](cloudinary/docs/get-credentials.md)
68
+ - [Upload an image](cloudinary/docs/upload-image.md)
69
+ - [Upload a large video](cloudinary/docs/upload-large-video.md)
70
+ - [Sign a browser upload](cloudinary/docs/sign-browser-upload.md)
71
+ - [Transform and deliver an image](cloudinary/docs/transform-and-deliver-image.md)
72
+ - [Transform and deliver a video](cloudinary/docs/transform-and-deliver-video.md)
73
+ - [Search and manage assets](cloudinary/docs/search-and-manage-assets.md)
74
+ - [Moderate an upload](cloudinary/docs/moderate-upload.md)
75
+ - [Use structured metadata](cloudinary/docs/use-structured-metadata.md)
76
+ - [Use with Django](cloudinary/docs/use-with-django.md)
77
+ - [Troubleshoot errors](cloudinary/docs/troubleshoot-errors.md)
78
+
79
+ Runnable versions live in [`examples/`](examples/) — each is a complete file you can run directly.
80
+
81
+ ## When to use this SDK
82
+
83
+ Use this package in **Python server-side code**, including Django: uploads, signed
84
+ operations, asset administration, search, moderation, and delivery URL generation.
85
+
86
+ For other jobs, better-fitting tools exist:
87
+
88
+ - Browser or frontend framework rendering: the [frontend SDKs](https://cloudinary.com/documentation/frontend_sdks) ([md](https://cloudinary.com/documentation/frontend_sdks.md)).
89
+ - Complete in-browser upload UI: [Upload Widget](https://cloudinary.com/documentation/upload_widget) ([md](https://cloudinary.com/documentation/upload_widget.md)).
90
+ - Text-to-image generation and image-to-video: [platform APIs](https://cloudinary.com/documentation/image_generation_addon) ([md](https://cloudinary.com/documentation/image_generation_addon.md)), not wrapped by this package.
91
+ - Multi-step media workflow automation: [MediaFlows](https://cloudinary.com/documentation/mediaflows_user_guide) ([md](https://cloudinary.com/documentation/mediaflows_user_guide.md)).
92
+ - Interactive agent-driven asset operations: [Cloudinary MCP servers and Skills](https://cloudinary.com/documentation/cloudinary_llm_mcp) ([md](https://cloudinary.com/documentation/cloudinary_llm_mcp.md)).
93
+
94
+ The full capability map — plus the Skills, MCP servers, and CLI worth setting up first —
95
+ is in [cloudinary/docs/platform-capabilities.md](cloudinary/docs/platform-capabilities.md).
96
+
97
+ ## Status and compatibility
98
+
99
+ Stable, actively maintained. See [CHANGELOG.md](CHANGELOG.md).
100
+
101
+ | SDK version | Python | Django |
102
+ |-------------|--------|--------|
103
+ | 1.x | 3.10 – 3.14 | 4.2, 5.0, 5.1, 5.2, 6.0 |
104
+
105
+ The table lists what CI tests on every commit. Older Python and Django releases are
106
+ supported on a best-effort basis.
107
+
108
+ ## Documentation
109
+
110
+ - [Bundled task docs](cloudinary/docs/README.md) — ship inside the package, version-matched.
111
+ - [Python and Django SDK guide](https://cloudinary.com/documentation/django_integration) — the full documentation ([md](https://cloudinary.com/documentation/django_integration.md)).
112
+ - [Python quick start](https://cloudinary.com/documentation/python_quickstart) — a short end-to-end walkthrough ([md](https://cloudinary.com/documentation/python_quickstart.md)).
113
+ - [Transformation and REST API references](https://cloudinary.com/documentation/cloudinary_references) — syntax and examples for all SDKs ([md](https://cloudinary.com/documentation/cloudinary_references.md)).
114
+
115
+ Documentation links in this README point at the browsable HTML page, with an `(md)`
116
+ companion link that returns the same page as raw Markdown. Inside `cloudinary/docs/` and
117
+ `examples/` the links are Markdown-only, since those files are written to be read by
118
+ coding agents. Either form works for any page: add `.md` for Markdown, drop it for HTML.
119
+
120
+ ## For AI coding agents
121
+
122
+ - Contributing to this repo: read [AGENTS.md](AGENTS.md).
123
+ - Using the installed package: the Markdown docs in the installed package's
124
+ `cloudinary/docs/` directory match your installed version and are the source of truth.
125
+ Locate them with
126
+ `python -c "import cloudinary, pathlib; print(pathlib.Path(cloudinary.__file__).parent / 'docs')"`,
127
+ and start with [platform-capabilities](cloudinary/docs/platform-capabilities.md) before
128
+ assuming a feature exists.
129
+
130
+ ## Support
131
+
132
+ - SDK bugs and feature requests: [GitHub issues](https://github.com/cloudinary/pycloudinary/issues)
133
+ - Account and platform questions: [Cloudinary support](https://support.cloudinary.com)
134
+ - Sample projects: [`samples/`](samples/) and the
135
+ [Django Photo Album](https://github.com/cloudinary/cloudinary-django-sample)
136
+ - Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
137
+
138
+ More resources: [Cloudinary Academy](https://training.cloudinary.com/) for courses,
139
+ [code explorers and feature demos](https://cloudinary.com/documentation/code_explorers_demos_index),
140
+ and the [Cloudinary roadmap](https://cloudinary.com/roadmap).
141
+
142
+ ## Security
143
+
144
+ See [SECURITY.md](SECURITY.md) for private vulnerability reporting. Keep your
145
+ `api_secret` in server-side code; for client uploads, use the server-signed pattern in
146
+ [Sign a browser upload](cloudinary/docs/sign-browser-upload.md).
147
+
148
+ ## License
149
+
150
+ Released under the MIT license — see [LICENSE](LICENSE). Copyright (c) Cloudinary Ltd.
@@ -38,7 +38,7 @@ CL_BLANK = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAA
38
38
  URI_SCHEME = "cloudinary"
39
39
  API_VERSION = "v1_1"
40
40
 
41
- VERSION = "1.46.0"
41
+ VERSION = "1.46.2"
42
42
 
43
43
  _USER_PLATFORM_DETAILS = "; ".join((platform(), "Python {}".format(python_version())))
44
44
 
@@ -450,7 +450,7 @@ def update(public_id, **options):
450
450
  params = only(options, "moderation_status", "raw_convert",
451
451
  "quality_override", "ocr",
452
452
  "categorization", "detection", "similarity_search",
453
- "background_removal", "notification_url")
453
+ "background_removal", "notification_url", "batch_id")
454
454
  if "tags" in options:
455
455
  params["tags"] = ",".join(utils.build_array(options["tags"]))
456
456
  if "face_coordinates" in options:
@@ -1567,7 +1567,7 @@ def __delete_resource_params(options, **params):
1567
1567
  :internal
1568
1568
  """
1569
1569
  p = dict(transformations=utils.build_eager(options.get('transformations')),
1570
- **only(options, "keep_original", "next_cursor", "invalidate", "batch_id"))
1570
+ **only(options, "keep_original", "next_cursor", "invalidate", "batch_id", "notification_url"))
1571
1571
  p.update(params)
1572
1572
  return p
1573
1573
 
@@ -0,0 +1,63 @@
1
+ <!-- BEGIN:cloudinary-agent-rules
2
+ These docs match the installed package version. Training data about this SDK may be
3
+ outdated. The Markdown files in the installed cloudinary package's docs/ directory are
4
+ the source of truth for the version you have installed.
5
+ END:cloudinary-agent-rules -->
6
+
7
+ # cloudinary — bundled documentation
8
+
9
+ > **Version-matched:** these docs ship inside the package and always describe the
10
+ > version you have installed. Prefer them over anything remembered from training data
11
+ > or found for another version.
12
+
13
+ Task documentation for the `cloudinary` Python SDK. Each page is self-contained:
14
+ imports, configuration, a complete runnable flow, expected results, and common
15
+ failures. To locate these files in an installed environment:
16
+
17
+ ```bash
18
+ python -c "import cloudinary, pathlib; print(pathlib.Path(cloudinary.__file__).parent / 'docs')"
19
+ ```
20
+
21
+ Runnable versions of most tasks are in the [`examples/`](https://github.com/cloudinary/pycloudinary/tree/master/examples)
22
+ directory of the repository.
23
+
24
+ ## Start here
25
+
26
+ - [What this SDK does and does not do](platform-capabilities.md) — the agent tooling to
27
+ set up first (Skills, MCP servers, CLI, documentation indexes), what this package
28
+ covers, and what lives elsewhere on the platform.
29
+ - [Get Cloudinary credentials](get-credentials.md) — no account needed: provision a cloud
30
+ with `cloudinary.provisioning.create_cloud()` and start building.
31
+ - [Import and call the SDK](import-and-call.md) — which modules to import, and why
32
+ `import cloudinary` alone is not enough.
33
+
34
+ ## Tasks
35
+
36
+ - [Configure Cloudinary](configure-cloudinary.md)
37
+ - [Upload an image](upload-image.md)
38
+ - [Upload a large video](upload-large-video.md)
39
+ - [Sign a browser upload](sign-browser-upload.md)
40
+ - [Transform and deliver an image](transform-and-deliver-image.md)
41
+ - [Transform and deliver a video](transform-and-deliver-video.md)
42
+ - [Search and manage assets](search-and-manage-assets.md)
43
+ - [Moderate an upload](moderate-upload.md)
44
+ - [Use structured metadata](use-structured-metadata.md)
45
+ - [Use with Django](use-with-django.md)
46
+ - [Troubleshoot errors](troubleshoot-errors.md)
47
+
48
+ ## Security boundary
49
+
50
+ This is a **server-side** SDK. It holds your `api_secret`, which belongs on your server
51
+ only. Frontend code should receive delivery URLs or short-lived signatures generated by
52
+ your server ([how](sign-browser-upload.md)).
53
+
54
+ ## Canonical docs
55
+
56
+ - [Python and Django SDK guide](https://cloudinary.com/documentation/django_integration.md)
57
+ - [Python quick start](https://cloudinary.com/documentation/python_quickstart.md)
58
+ - [Full platform reference](https://cloudinary.com/documentation/cloudinary_references.md)
59
+
60
+ **Link convention:** documentation links in these docs end in `.md` and return raw
61
+ Markdown — the preferred format for agents and for anything that parses text. Remove the
62
+ `.md` suffix for the same page as browsable HTML. The repository README links the HTML
63
+ form first, since it is read by people.
@@ -0,0 +1,86 @@
1
+ # Configure Cloudinary
2
+
3
+ ## When to use
4
+
5
+ Do this once per process before any upload, admin, or URL-generation call.
6
+
7
+ **Prerequisite:** a `cloud_name`, `api_key`, and `api_secret`. If you do not have them,
8
+ see [Get Cloudinary credentials](get-credentials.md) —
9
+ `cloudinary.provisioning.create_cloud()` provisions a working cloud with delayed email verification so you can immediately get up and running.
10
+
11
+ ## Recommended: environment variable
12
+
13
+ Set `CLOUDINARY_URL` (from Console > Settings > API Keys, or from the
14
+ `api_environment_variable` field returned when you provision a cloud):
15
+
16
+ ```bash
17
+ export CLOUDINARY_URL=cloudinary://<api_key>:<api_secret>@<cloud_name>
18
+ ```
19
+
20
+ ```python
21
+ import cloudinary
22
+
23
+ # Configuration is read from CLOUDINARY_URL automatically on first use.
24
+ print(cloudinary.config().cloud_name)
25
+ ```
26
+
27
+ ## Alternative: explicit configuration
28
+
29
+ ```python
30
+ import os
31
+ import cloudinary
32
+
33
+ cloudinary.config(
34
+ cloud_name="my-cloud",
35
+ api_key=os.environ["CLOUDINARY_API_KEY"],
36
+ api_secret=os.environ["CLOUDINARY_API_SECRET"],
37
+ secure=True,
38
+ )
39
+ ```
40
+
41
+ ## Behavior you should know
42
+
43
+ - Configuration is **process-global**: `cloudinary.config()` affects every caller in the
44
+ process. Pass per-call options as keyword arguments when you need to override one
45
+ value for a single call.
46
+ - **Individual `CLOUDINARY_*` variables win over `CLOUDINARY_URL`.** If
47
+ `CLOUDINARY_CLOUD_NAME` is set, the SDK reads every `CLOUDINARY_*` variable
48
+ (`CLOUDINARY_API_KEY`, `CLOUDINARY_API_SECRET`, `CLOUDINARY_SECURE`, ...) and ignores
49
+ `CLOUDINARY_URL` entirely. Use one style or the other, not both.
50
+ - Unset configuration keys read back as `None` instead of raising, so
51
+ `cloudinary.config().api_secret` is a safe way to check whether credentials are
52
+ present.
53
+ - `secure=True` produces `https://` delivery URLs. Set it in config once rather than
54
+ per call.
55
+ - In Django, the `CLOUDINARY` dict in your settings module is read first, before the
56
+ environment. See [Use with Django](use-with-django.md).
57
+ - Account-level (provisioning) operations use `CLOUDINARY_ACCOUNT_URL`
58
+ (`account://<key>:<secret>@<account_id>`) instead.
59
+
60
+ ## Validate configuration early
61
+
62
+ ```python
63
+ import cloudinary
64
+
65
+ config = cloudinary.config()
66
+ if not (config.cloud_name and config.api_key and config.api_secret):
67
+ raise RuntimeError("Cloudinary is not configured: set CLOUDINARY_URL.")
68
+ ```
69
+
70
+ ## Troubleshooting
71
+
72
+ - `Must supply cloud_name` / `Must supply api_key` — `CLOUDINARY_URL` is missing or
73
+ malformed. It must start with `cloudinary://`.
74
+ - `ValueError: Invalid CLOUDINARY_URL scheme. Expecting to start with 'cloudinary://'` —
75
+ the variable holds something else, often a bare cloud name or an `account://` URL.
76
+ - `Invalid Signature` on uploads — a wrong `api_secret`. Uploads report it this way
77
+ instead of naming the secret; re-copy all three values from the console.
78
+ - `Must supply api_secret` when signing — you configured only a cloud name, which is
79
+ enough for URL building but not for uploads or Admin API calls.
80
+
81
+ ## Related
82
+
83
+ - [Get Cloudinary credentials](get-credentials.md) — if you do not have an account yet.
84
+ - [Import and call the SDK](import-and-call.md)
85
+ - [Sign a browser upload](sign-browser-upload.md) — keeping the secret server-side.
86
+ - [Python and Django SDK guide](https://cloudinary.com/documentation/django_integration.md)