https://github.com/stanwood/gae-contentful-proxy
Contenful Proxy based on GAE: https://cloud.google.com/appengine/docs/standard/python/
https://github.com/stanwood/gae-contentful-proxy
contentful google-app-engine python27 webapp2
Last synced: 3 months ago
JSON representation
Contenful Proxy based on GAE: https://cloud.google.com/appengine/docs/standard/python/
- Host: GitHub
- URL: https://github.com/stanwood/gae-contentful-proxy
- Owner: stanwood
- License: mit
- Created: 2018-07-31T09:19:16.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-28T10:22:53.000Z (about 6 years ago)
- Last Synced: 2025-01-09T08:15:16.765Z (4 months ago)
- Topics: contentful, google-app-engine, python27, webapp2
- Language: Python
- Homepage:
- Size: 50.8 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://gae-contentful-proxy.readthedocs.io/en/latest/)
# Contentful proxy module
Module based on top of Google Cloud Platform which creates simple proxy for
[Contentful API](https://www.contentful.com/developers/docs/references/content-delivery-api/).## Dependencies
- Google App Engine Standard Environment (runtime: python2.7)
- Google Cloud Storage
- Webapp2## Example code and usage
1. Requirements:
```
pip install -r requirements.txt
```2. Example file with handlers:
```
from contentful_proxy import routes
app = webapp2.WSGIApplication(
routes.contentful_routes + routes.cron_routes,
debug=True
)
```3. Example App Engine settings file (app.yaml):
```
api_version: 1
builtins:
- deferred: true
env_variables:
CONTENTFUL_SPACE: {CONTENTFUL_SPACE}
CONTENTFUL_SPACE_ID: {CONTENTFUL_SPACE_ID}
CONTENTFUL_MANAGEMENT_TOKEN: {CONTENTFUL_MANAGEMENT_TOKEN}
handlers:
- url: /_ah/queue/deferred
login: admin
script: google.appengine.ext.deferred.deferred.application
- url: /ah/cron/.*
login: admin
script: main.app
- url: .*
script: main.app
instance_class: F1
libraries:
- name: webapp2
version: 2.5.2
- name: ssl
version: 2.7.11
- name: webob
version: latest
runtime: python27
threadsafe: true
```4. Example cron:
```
cron:
- description: Delete old cached files
url: /_ah/cron/clean-up-files
schedule: every day 2:00
timezone: Europe/Berlin
```## Documentation
Auto generate documentation
```bash
cd docs/
sphinx-apidoc -o ./source/_modules/ ../contentful_proxy/
make html
```