Skip to content

Commit ef7ae2e

Browse files
committed
doc: add license & twitter badge to readme
1 parent 4b76061 commit ef7ae2e

File tree

1 file changed

+56
-53
lines changed

1 file changed

+56
-53
lines changed

README.md

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Python SDK for ImageKit
22

3+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4+
[![Twitter Follow](https://img.shields.io/twitter/follow/imagekitio?label=Follow&style=social)](https://twitter.com/ImagekitIo)
5+
36
Python SDK for [ImageKit](https://imagekit.io/) that implements the new APIs and interface for performing different file
47
operations.
58

@@ -90,16 +93,16 @@ https://ik.imagekit.io/your_imagekit_id/endpoint/default-image.jpg?tr=h-300%2Cw-
9093

9194
The ```.url()``` method accepts the following parameters
9295

93-
| Option | Description |
94-
| :----------------| :----------------------------- |
95-
| url_endpoint | Optional. The base URL to be appended before the path of the image. If not specified, the URL Endpoint specified at the time of SDK initialization is used. For example, https://ik.imagekit.io/your_imagekit_id/endpoint/ |
96-
| path | Conditional. This is the path at which the image exists. For example, `/path/to/image.jpg`. Either the `path` or `src` parameter need to be specified for URL generation. |
97-
| src | Conditional. This is the complete URL of an image already mapped to ImageKit. For example, `https://ik.imagekit.io/your_imagekit_id/endpoint/path/to/image.jpg`. Either the `path` or `src` parameter need to be specified for URL generation. |
98-
| transformation | Optional. An array of objects specifying the transformation to be applied in the URL. The transformation name and the value should be specified as a key-value pair in the object. Different steps of a [chained transformation](https://docs.imagekit.io/imagekit-docs/chained-transformations) can be specified as different objects of the array. The complete list of supported transformations in the SDK and some examples of using them are given later. If you use a transformation name that is not specified in the SDK, it gets applied as it is in the URL. |
99-
| transformation_position | Optional. Default value is `path` that places the transformation string as a path parameter in the URL. Can also be specified as `query` which adds the transformation string as the query parameter `tr` in the URL. If you use `src` parameter to create the URL, then the transformation string is always added as a query parameter. |
100-
| query_parameters | Optional. These are the other query parameters that you want to add to the final URL. These can be any query parameters and not necessarily related to ImageKit. Especially useful, if you want to add some versioning parameter to your URLs. |
101-
| signed | Optional. Boolean. Default is `false`. If set to `true`, the SDK generates a signed image URL adding the image signature to the image URL. This can only be used if you are creating the URL with the `url_endpoint` and `path` parameters, and not with the `src` parameter. |
102-
| expire_seconds | Optional. Integer. Meant to be used along with the `signed` parameter to specify the time in seconds from now when the URL should expire. If specified, the URL contains the expiry timestamp in the URL and the image signature is modified accordingly. |
96+
| Option | Description |
97+
| :---------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
98+
| url_endpoint | Optional. The base URL to be appended before the path of the image. If not specified, the URL Endpoint specified at the time of SDK initialization is used. For example, https://ik.imagekit.io/your_imagekit_id/endpoint/ |
99+
| path | Conditional. This is the path at which the image exists. For example, `/path/to/image.jpg`. Either the `path` or `src` parameter need to be specified for URL generation. |
100+
| src | Conditional. This is the complete URL of an image already mapped to ImageKit. For example, `https://ik.imagekit.io/your_imagekit_id/endpoint/path/to/image.jpg`. Either the `path` or `src` parameter need to be specified for URL generation. |
101+
| transformation | Optional. An array of objects specifying the transformation to be applied in the URL. The transformation name and the value should be specified as a key-value pair in the object. Different steps of a [chained transformation](https://docs.imagekit.io/imagekit-docs/chained-transformations) can be specified as different objects of the array. The complete list of supported transformations in the SDK and some examples of using them are given later. If you use a transformation name that is not specified in the SDK, it gets applied as it is in the URL. |
102+
| transformation_position | Optional. Default value is `path` that places the transformation string as a path parameter in the URL. Can also be specified as `query` which adds the transformation string as the query parameter `tr` in the URL. If you use `src` parameter to create the URL, then the transformation string is always added as a query parameter. |
103+
| query_parameters | Optional. These are the other query parameters that you want to add to the final URL. These can be any query parameters and not necessarily related to ImageKit. Especially useful, if you want to add some versioning parameter to your URLs. |
104+
| signed | Optional. Boolean. Default is `false`. If set to `true`, the SDK generates a signed image URL adding the image signature to the image URL. This can only be used if you are creating the URL with the `url_endpoint` and `path` parameters, and not with the `src` parameter. |
105+
| expire_seconds | Optional. Integer. Meant to be used along with the `signed` parameter to specify the time in seconds from now when the URL should expire. If specified, the URL contains the expiry timestamp in the URL and the image signature is modified accordingly. |
103106

104107

105108
## Examples of generating URLs
@@ -180,49 +183,49 @@ If a transformation is supported in ImageKit, but a name for it cannot be found
180183
transformation code from ImageKit docs as the name when using in the ```url``` function.
181184

182185
| Supported Transformation Name | Translates to parameter |
183-
|-------------------------------|-------------------------|
184-
| height | h |
185-
| width | w |
186-
| aspect_ratio | ar |
187-
| quality | q |
188-
| crop | c |
189-
| crop_mode | cm |
190-
| x | x |
191-
| y | y |
192-
| focus | fo |
193-
| format | f |
194-
| radius | r |
195-
| background | bg |
196-
| border | bo |
197-
| rotation | rt |
198-
| blur | bl |
199-
| named | n |
200-
| overlay_image | oi |
201-
| overlay_x | ox |
202-
| overlay_y | oy |
203-
| overlay_focus | ofo |
204-
| overlay_height | oh |
205-
| overlay_width | ow |
206-
| overlay_text | ot |
207-
| overlay_text_font_size | ots |
208-
| overlay_text_font_family | otf |
209-
| overlay_text_color | otc |
210-
| overlay_alpha | oa |
211-
| overlay_text_typography | ott |
212-
| overlay_background | obg |
213-
| overlay_image_trim | oit |
214-
| progressive | pr |
215-
| lossless | lo |
216-
| trim | t |
217-
| metadata | md |
218-
| color_profile | cp |
219-
| default_image | di |
220-
| dpr | dpr |
221-
| effect_sharpen | e-sharpen |
222-
| effect_usm | e-usm |
223-
| effect_contrast | e-contrast |
224-
| effect_gray | e-grayscale |
225-
| original | orig |
186+
| ----------------------------- | ----------------------- |
187+
| height | h |
188+
| width | w |
189+
| aspect_ratio | ar |
190+
| quality | q |
191+
| crop | c |
192+
| crop_mode | cm |
193+
| x | x |
194+
| y | y |
195+
| focus | fo |
196+
| format | f |
197+
| radius | r |
198+
| background | bg |
199+
| border | bo |
200+
| rotation | rt |
201+
| blur | bl |
202+
| named | n |
203+
| overlay_image | oi |
204+
| overlay_x | ox |
205+
| overlay_y | oy |
206+
| overlay_focus | ofo |
207+
| overlay_height | oh |
208+
| overlay_width | ow |
209+
| overlay_text | ot |
210+
| overlay_text_font_size | ots |
211+
| overlay_text_font_family | otf |
212+
| overlay_text_color | otc |
213+
| overlay_alpha | oa |
214+
| overlay_text_typography | ott |
215+
| overlay_background | obg |
216+
| overlay_image_trim | oit |
217+
| progressive | pr |
218+
| lossless | lo |
219+
| trim | t |
220+
| metadata | md |
221+
| color_profile | cp |
222+
| default_image | di |
223+
| dpr | dpr |
224+
| effect_sharpen | e-sharpen |
225+
| effect_usm | e-usm |
226+
| effect_contrast | e-contrast |
227+
| effect_gray | e-grayscale |
228+
| original | orig |
226229

227230
## File Upload
228231

0 commit comments

Comments
 (0)