Skip to content

Commit 6d951be

Browse files
committed
initial commit
1 parent a3ba77c commit 6d951be

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

app.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "DocuSign Python Recipes",
3+
"description": "www.docusign.com/dev-center/recipes",
4+
"keywords": ["python"],
5+
"addons": [],
6+
"env": {
7+
"DS_OAUTH_CLIENT_ID": {
8+
"required": false,
9+
"description": "Optional: your OAuth client_id (Integration Key)."
10+
},
11+
"DS_OAUTH_SECRET": {
12+
"required": false,
13+
"description": "Optional: your OAuth secret. You must add an OAuth redirect uri of <server>/auth_redirect"
14+
}
15+
}
16+
}

app/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
from app import ds_config
3+
from flask import Flask
4+
5+
session_path = '/tmp/python_recipe_sessions'
6+
7+
app = Flask(__name__)
8+
app.config.from_pyfile('config.py')
9+
app.secret_key = ds_config.DS_CONFIG['session_secret']
10+
11+
if 'DYNO' in os.environ: # On Heroku?
12+
import logging
13+
stream_handler = logging.StreamHandler()
14+
app.logger.addHandler(stream_handler)
15+
app.logger.setLevel(logging.INFO)
16+
app.logger.info('Recipe example startup')
17+
app.config.update(dict(PREFERRED_URL_SCHEME = 'https'))
18+
19+
from app import views

0 commit comments

Comments
 (0)