Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK dependency upgrades #26

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/python:3.7-slim as base
FROM docker.io/python:3.12-slim as base

WORKDIR /app

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
from dash import Dash, html
import os
import pollination_dash_io
import dash
from dash import html
from dash.dependencies import Input, Output
import dash_renderjson

app = Dash(__name__)
app.title = "Hello Pollination"
base_path = os.getenv('POLLINATION_API_URL', 'https://api.pollination.cloud')

app = dash.Dash(__name__)
server = app.server

api_key = pollination_dash_io.ApiKey()


app.layout = html.Div([
html.Div(children='Welcome! Start writing your Pollination app here.')
api_key.component,
html.Div(children='Welcome! Start writing your Pollination app here.'),
pollination_dash_io.AuthUser(id='auth-user', basePath=base_path),
pollination_dash_io.SelectProject(id='po-select-project',
projectOwner='antoinedao',
basePath=base_path),
html.Div(id='output-form')
])

api_key.create_api_key_callback(app=app, component_ids=['auth-user', 'po-select-project'])

@app.callback(
Output(component_id='output-form',
component_property='children'),
Input(component_id='po-select-project',
component_property='project')
)
def get_value_from_recipe_form(data):
return dash_renderjson.DashRenderjson(id='json-out',
data={ 'project': data })

if __name__ == '__main__':
app.run_server(debug=True)
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dash
gunicorn
pollination-dash-io>=1.13.0
Loading
Loading