You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will upload a Python Package using Twine when a release is created
2
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+
# This workflow uses actions that are not certified by GitHub.
5
+
# They are provided by a third-party and are governed by
6
+
# separate terms of service, privacy policy, and support
Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take care of the rest. [Read More](https://www.contentstack.com/).
10
+
Contentstack is a headless CMS with an API-first approach. It is a CMS that developers can use to build powerful
11
+
cross-platform applications in their favorite languages. Build your application frontend, and Contentstack will take
12
+
care of the rest. [Read More](https://www.contentstack.com/).
13
13
14
-
Contentstack provides Python SDK to build application on top of Python. Given below is the detailed guide and helpful resources to get started with our Python SDK.
14
+
Contentstack provides Python SDK to build application on top of Python. Given below is the detailed guide and helpful
15
+
resources to get started with our Python SDK.
15
16
16
17
### Prerequisite
17
18
18
-
You will need python 3 installed on your machine. You can install it from [here](https://www.python.org/ftp/python/3.7.4/python-3.7.4-macosx10.9.pkg).
19
+
You will need python 3 installed on your machine. You can install it
20
+
from [here](https://www.python.org/ftp/python/3.7.4/python-3.7.4-macosx10.9.pkg).
19
21
20
22
### Setup and Installation
21
23
@@ -29,48 +31,61 @@ pip install contentstack
29
31
30
32
Install latest [contentstack](https://pypi.org/project/Contentstack) package from the [PyPI](https://pypi.org)
31
33
32
-
This is the preferred method to install contentstack, as it will always install the most recent stable release. If you don't have [pip](https://pip.pypa.io/) installed, this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) can guide you through the process
34
+
This is the preferred method to install contentstack, as it will always install the most recent stable release. If you
35
+
don't have [pip](https://pip.pypa.io/) installed,
36
+
this [Python installation guide](http://docs.python-guide.org/en/latest/starting/installation/) can guide you through
37
+
the process
33
38
34
39
### Key Concepts for using Contentstack
35
40
36
41
#### Stack
37
42
38
-
A stack is like a container that holds the content of your app. Learn more about [Stacks](https://www.contentstack.com/docs/developers/set-up-stack).
43
+
A stack is like a container that holds the content of your app. Learn more
44
+
about [Stacks](https://www.contentstack.com/docs/developers/set-up-stack).
39
45
40
46
#### Content Type
41
47
42
-
Content type lets you define the structure or blueprint of a page or a section of your digital property. It is a form-like page that gives Content Managers an interface to input and upload content. [Read more](https://www.contentstack.com/docs/developers/create-content-types).
48
+
Content type lets you define the structure or blueprint of a page or a section of your digital property. It is a
49
+
form-like page that gives Content Managers an interface to input and upload
An entry is the actual piece of content created using one of the defined content types. Learn more about [Entries](https://www.contentstack.com/docs/content-managers/work-with-entries).
54
+
An entry is the actual piece of content created using one of the defined content types. Learn more
55
+
about [Entries](https://www.contentstack.com/docs/content-managers/work-with-entries).
47
56
48
57
#### Asset
49
58
50
-
Assets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded to Contentstack. These files can be used in multiple entries. Read more about [Assets](https://www.contentstack.com/docs/content-managers/work-with-assets).
59
+
Assets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded to Contentstack. These files
60
+
can be used in multiple entries. Read more
61
+
about [Assets](https://www.contentstack.com/docs/content-managers/work-with-assets).
51
62
52
63
#### Environment
53
64
54
-
A publishing environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published. Learn how to work with [Environments](https://www.contentstack.com/docs/developers/set-up-environments).
65
+
A publishing environment corresponds to one or more deployment servers or a content delivery destination where the
66
+
entries need to be published. Learn how to work
67
+
with [Environments](https://www.contentstack.com/docs/developers/set-up-environments).
55
68
56
69
### Contentstack Python SDK: 5-minute Quickstart
57
70
58
71
#### Initializing your SDK
59
72
60
-
To initialize the SDK, specify application API key, access token, and environment name of the stack as shown in the snippet given below, You can provide optional parameters for config:
73
+
To initialize the SDK, specify application API key, access token, and environment name of the stack as shown in the
74
+
snippet given below, You can provide optional parameters for config:
To get the API credentials mentioned above, log in to your Contentstack account and then in your top panel navigation, go to Settings > Stack to view the API Key and Access Token.
80
+
To get the API credentials mentioned above, log in to your Contentstack account and then in your top panel navigation,
81
+
go to Settings > Stack to view the API Key and Access Token.
67
82
68
83
#### Querying content from your stack
69
84
70
85
To retrieve a single entry from a content type use the code snippet given below:
@@ -94,9 +109,12 @@ You can query for content types, entries, assets and more using our Python API R
94
109
95
110
### Working with Images
96
111
97
-
We have introduced Image Delivery APIs that let you retrieve images and then manipulate and optimize them for your digital properties. It lets you perform a host of other actions such as crop, trim, resize, rotate, overlay, and so on.
112
+
We have introduced Image Delivery APIs that let you retrieve images and then manipulate and optimize them for your
113
+
digital properties. It lets you perform a host of other actions such as crop, trim, resize, rotate, overlay, and so on.
98
114
99
-
For example, if you want to crop an image (with width as 300 and height as 400), you simply need to append query parameters at the end of the image URL, such as, `https://images.contentstack.io/v3/assets/download?crop=300,400`. There are several more parameters that you can use for your images.
115
+
For example, if you want to crop an image (with width as 300 and height as 400), you simply need to append query
116
+
parameters at the end of the image URL, such as, `https://images.contentstack.io/v3/assets/download?crop=300,400`. There
117
+
are several more parameters that you can use for your images.
100
118
101
119
[Read Image Delivery API documentation](https://www.contentstack.com/docs/platforms/python/api-reference/).
The Sync API takes care of syncing your Contentstack data with your application and ensures that the data is always up-to-date by providing delta updates. Contentstack’s Python SDK supports Sync API, which you can use to build powerful applications.
131
+
The Sync API takes care of syncing your Contentstack data with your application and ensures that the data is always
132
+
up-to-date by providing delta updates. Contentstack’s Python SDK supports Sync API, which you can use to build powerful
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
157
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
158
+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
159
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
160
+
persons to whom the Software is furnished to do so, subject to the following conditions:
138
161
139
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
162
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
163
+
Software.
140
164
141
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
165
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
166
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
167
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
168
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
142
169
143
170
-[Content Delivery API Docs](https://contentstack.com/docs/apis/content-delivery-api/)
Contentstack takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations.
4
+
5
+
If you believe you have found a security vulnerability in any Contentstack-owned repository, please report it to us as described below.
6
+
7
+
## Reporting Security Issues
8
+
9
+
**Please do not report security vulnerabilities through public GitHub issues.**
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
14
+
15
+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
16
+
17
+
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
18
+
- Full paths of source file(s) related to the manifestation of the issue
19
+
- The location of the affected source code (tag/branch/commit or direct URL)
20
+
- Any special configuration required to reproduce the issue
21
+
- Step-by-step instructions to reproduce the issue
22
+
- Proof-of-concept or exploit code (if possible)
23
+
- Impact of the issue, including how an attacker might exploit the issue
24
+
25
+
This information will help us triage your report more quickly.
0 commit comments