contentful-labs / contentful.py

This project is unofficial and currently unsupported, the official SDK can be found here: https://github.com/contentful/contentful.py
Apache License 2.0
18 stars 6 forks source link

Allow for the ability to override contentful base URL #14

Closed hunt3r closed 8 years ago

hunt3r commented 8 years ago

We proxy all contentful calls through our NGINX proxies. We want to ensure that on an outage we can still serve stale copies, it also allows us to cut down on latency to the edge or to your origin across our application servers, an in data center cache really cuts down on latency for our applications.

Some of the Other SDKs allow for the ability to set the server path, the Python SDK doesn't seem to allow this based on the written documentation.

I would expect something in the instantiation of the client as an optional kwarg. e.g. client = Client('space-id', 'access-token', api_path='https://our-internal-proxy')

Chris

hunt3r commented 8 years ago

Looks like the endpoint kwarg is present.
def __init__(self, space_id, access_token, custom_entries=None, secure=True, endpoint=None, resolve_links=True):