Skip to content

Commit 8af73c7

Browse files
shaileshmishrashaileshmishra
authored andcommitted
✨ supercharged rte added
1 parent de6fb2b commit 8af73c7

File tree

4 files changed

+51
-20
lines changed

4 files changed

+51
-20
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2020 Contentstack
1+
Copyright 2021 Contentstack
22

33
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:
44

README.md

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you are using Contentstack Python SDK in your project by running the followin
3131
## For the specific version
3232

3333
```python
34-
pip install Contentstack==1.3.0
34+
pip install Contentstack==1.4.0
3535
```
3636

3737
## Usage
@@ -64,15 +64,15 @@ Contentstack Utils SDK lets you interact with the Content Delivery APIs and retr
6464
To get an embedded item of a single entry, you need to provide the stack API key, environment name, content type’s UID, and entry’s UID. Then, use the `entry.fetch` function as shown below:
6565

6666
```python
67-
import contentstack
67+
import contentstack
6868

69-
stack = contentstack.Stack('api_key','delivery_token','environment')
70-
content_type = stack.content_type("content_type_uid")
71-
entry = content_type.entry("entry_uid")
72-
result = entry.fetch()
73-
if result is not None:
74-
entry = result['entries']
75-
Utils.render(entry, ['rich_text_editor', 'some_other_text'], Option())
69+
stack = contentstack.Stack('api_key','delivery_token','environment')
70+
content_type = stack.content_type("content_type_uid")
71+
entry = content_type.entry("entry_uid")
72+
result = entry.fetch()
73+
if result is not None:
74+
entry = result['entries']
75+
Utils.render(entry, ['rich_text_editor', 'some_other_text'], Option())
7676

7777
```
7878

@@ -81,13 +81,32 @@ To get an embedded item of a single entry, you need to provide the stack API key
8181
To get embedded items from multiple entries, you need to provide the stack API key, delivery token, environment name, and content type’s UID.
8282

8383
```python
84-
import contentstack
85-
86-
stack = contentstack.Stack('api_key','delivery_token','environment')
87-
query = stack.content_type("content_type_uid").query()
88-
result = query.find()
89-
if result is not None and 'entries' in result:
90-
entry = result['entries']
91-
for item in range:
92-
Utils.render(item, ['rich_text_editor', 'some_other_text'], Option())
84+
import contentstack
85+
86+
stack = contentstack.Stack('api_key','delivery_token','environment')
87+
query = stack.content_type("content_type_uid").query()
88+
result = query.find()
89+
if result is not None and 'entries' in result:
90+
entry = result['entries']
91+
for item in range:
92+
option = Option()
93+
Utils.render(item, ['rich_text_editor', 'some_other_text'], option)
94+
```
95+
96+
97+
## Supercharged
98+
99+
To get supercharged items from multiple entries, you need to provide the stack API key, delivery token, environment name, and content type’s UID.
100+
101+
```python
102+
import contentstack
103+
104+
stack = contentstack.Stack('api_key','delivery_token','environment')
105+
query = stack.content_type("content_type_uid").query()
106+
result = query.find()
107+
if result is not None and 'entries' in result:
108+
entry = result['entries']
109+
for item in range:
110+
option = Option()
111+
Utils.json_to_html(item, ['paragraph_text'], option)
93112
```

changelog.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
**CHANGELOG**
33
================
44

5+
NEW FEATURE: Supercharged RTE
6+
7+
- jsonToHtml function support added
8+
9+
*v0.2.0*
10+
============
11+
12+
**Date: 02-Sept-2021**
13+
14+
- Initial release of contentstack utility package
15+
16+
517
ENHANCEMENT, NEW FEATURE, BUG RESOLVE
618

719
*v0.1.0*

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
long_description_content_type="text/markdown",
1616
url="https://github.com/contentstack/contentstack-utils-python",
1717
license='MIT',
18-
version='1.0.0',
18+
version='0.2.0',
1919
install_requires=[
2020

2121
],

0 commit comments

Comments
 (0)