Contentstack 1.8.2__tar.gz → 1.9.0__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.
- {Contentstack-1.8.2 → contentstack-1.9.0}/Contentstack.egg-info/PKG-INFO +1 -1
- {Contentstack-1.8.2 → contentstack-1.9.0}/LICENSE +1 -1
- {Contentstack-1.8.2 → contentstack-1.9.0}/PKG-INFO +1 -1
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/__init__.py +1 -1
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/stack.py +3 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/tests/test_stack.py +5 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/Contentstack.egg-info/SOURCES.txt +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/Contentstack.egg-info/dependency_links.txt +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/Contentstack.egg-info/not-zip-safe +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/Contentstack.egg-info/requires.txt +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/Contentstack.egg-info/top_level.txt +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/README.md +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/asset.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/assetquery.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/basequery.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/contenttype.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/controller.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/deep_merge_lp.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/entry.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/entryqueryable.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/https_connection.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/image_transform.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/query.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/contentstack/utility.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/setup.cfg +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/setup.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/tests/test_assets.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/tests/test_entry.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/tests/test_live_preview.py +0 -0
- {Contentstack-1.8.2 → contentstack-1.9.0}/tests/test_query.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2012 -
|
|
3
|
+
Copyright (c) 2012 - 2024 Contentstack. All rights reserved.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -22,7 +22,7 @@ __all__ = (
|
|
|
22
22
|
__title__ = 'contentstack-delivery-python'
|
|
23
23
|
__author__ = 'contentstack'
|
|
24
24
|
__status__ = 'debug'
|
|
25
|
-
__version__ = 'v1.
|
|
25
|
+
__version__ = 'v1.9.0'
|
|
26
26
|
__endpoint__ = 'cdn.contentstack.io'
|
|
27
27
|
__email__ = 'mobile@contentstack.com'
|
|
28
28
|
__developer_email__ = 'shailesh.mishra@contentstack.com'
|
|
@@ -21,6 +21,7 @@ class ContentstackRegion(enum.Enum):
|
|
|
21
21
|
EU = 'eu'
|
|
22
22
|
AZURE_NA = 'azure-na'
|
|
23
23
|
AZURE_EU = 'azure-eu'
|
|
24
|
+
GCP_NA = 'gcp-na'
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
class Stack:
|
|
@@ -116,6 +117,8 @@ class Stack:
|
|
|
116
117
|
self.host = 'azure-na-cdn.contentstack.com'
|
|
117
118
|
elif self.region.value == 'azure-eu' and self.host == DEFAULT_HOST:
|
|
118
119
|
self.host = 'azure-eu-cdn.contentstack.com'
|
|
120
|
+
elif self.region.value == 'gcp-na' and self.host == DEFAULT_HOST:
|
|
121
|
+
self.host = 'gcp-na-cdn.contentstack.com'
|
|
119
122
|
elif self.region.value != 'us':
|
|
120
123
|
self.host = f'{self.region.value}-{DEFAULT_HOST}'
|
|
121
124
|
self.endpoint = f'https://{self.host}/{self.version}'
|
|
@@ -28,6 +28,11 @@ class TestStack(unittest.TestCase):
|
|
|
28
28
|
API_KEY, DELIVERY_TOKEN, ENVIRONMENT, region=ContentstackRegion.EU)
|
|
29
29
|
self.assertEqual('eu-cdn.contentstack.com', stack_region.host)
|
|
30
30
|
|
|
31
|
+
def test_02_stack_gcp_na_region(self):
|
|
32
|
+
stack_region = contentstack.Stack(
|
|
33
|
+
API_KEY, DELIVERY_TOKEN, ENVIRONMENT, region=ContentstackRegion.GCP_NA)
|
|
34
|
+
self.assertEqual('gcp-na-cdn.contentstack.com', stack_region.host)
|
|
35
|
+
|
|
31
36
|
def test_03_stack_endpoint(self):
|
|
32
37
|
self.assertEqual(f"https://{config.HOST}/v3",
|
|
33
38
|
self.stack.endpoint)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|