Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Disclose Dash-generated API

Hello everyone.
Can I expose some way Dash-generated API for my Python functions, to invoke these methods with my own requests?

Hi @dondublon, can you explain in more details what you would like to do? Which kind of API are you interested in?

API for methods, decorated by @app.callback -> Input, Output.
I want later to connect the engine-part (my Python methods) to another front-end, that is already implemented in another application.

Is it too complex?

Technically, it should be possible by invoking the ‘internal’ dash endpoints with a properly designed request. However, it would be a major hack, and the request design/result parsing would be a pain.

A slightly less hacky approach would be to move the logic to separate functions, which are then invoked by the callbacks. You could then add separate routes to the flask server for the other front end, which invokes the logic functions.

However, the right solution would be to host the separate routes via another flask server if possible.

@Emil this means, extracting API is too comples, if a separate Flask server is simper. Pity.
Ok, thank you!