-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path__init__.py
More file actions
47 lines (41 loc) · 1.58 KB
/
__init__.py
File metadata and controls
47 lines (41 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""
The __init__.py files are required to make Python treat the directories as containing
packages; this is done to prevent directories with a common name, such as string,
from unintentionally hiding valid modules that occur later on the module search path
"""
from .entry import Entry
from .asset import Asset
from .contenttype import ContentType
from .endpoint import Endpoint
from .https_connection import HTTPSConnection
from contentstack.stack import Stack
from .utility import Utils
__all__ = (
"Entry",
"Asset",
"ContentType",
"Endpoint",
"HTTPSConnection",
"Stack",
"Utils"
)
def get_contentstack_endpoint(region='us', service='', omit_https=False):
"""
Resolve a Contentstack service endpoint URL for a given region.
Proxy to :class:`Endpoint.get_contentstack_endpoint` for convenience —
mirrors ``Contentstack::getContentstackEndpoint()`` in the PHP SDK.
:param region: Region ID or alias ('us', 'eu', 'azure-na', 'gcp-eu', ...).
:param service: Service key ('contentDelivery', 'contentManagement', ...).
When empty, returns a dict of all endpoints for the region.
:param omit_https: When True, strips 'https://' from the returned URL(s).
:returns: str when service is provided, dict[str,str] otherwise.
"""
return Endpoint.get_contentstack_endpoint(region, service, omit_https)
__title__ = 'contentstack-delivery-python'
__author__ = 'contentstack'
__status__ = 'debug'
__version__ = 'v2.6.0'
__endpoint__ = 'cdn.contentstack.io'
__email__ = 'support@contentstack.com'
__developer_email__ = 'mobile@contentstack.com'
__license__ = "MIT"