what type of communication you need from between Pyblish and Django
directly?

I think this is best answered by the animation and description here:
https://github.com/abstractfactory/pyblish/issues/99

instead they both communicate to the database like this:
Pyblish -→ Database ←- Django/Flask

Thanks Asi, this makes sense, but doesn’t this assume that this database is
used for other things, other than Pyblish and this web frontend?

Here is how I’m picturing communication currently.
[image: Inline images 2]

In which Pyblish doesn’t know about Flask/Django, but it’s plug-in does.
Pyblish is only running plug-ins exposed to it at run-time and has no
knowledge about what they do or how they work. This way, a plug-in can
access the surrounding pipeline, including databases.

[image: Inline images 3]

If I understood your description, you meant to have a database inbetween
plug-in and flask.

[image: Inline images 4]

The database is either unique to this particular Web Frontend for Pyblish,
but you probably meant to have Pyblish communicate with your native
pipeline database and for it to communicate with Flask.

[image: Inline images 5]

But wouldn’t that mean that you would have to “teach” your database about
Pyblish? For example, when Pyblish - or rather, a Pyblish plug-in -
connects and transmits information to your database, it would need to know
to connect to the running Flask instance.

That sounds ideal if you are building Pyblish as one of your tools that all
depend on a single database. But for a standalone application that
integrates into your pipeline, don’t you think it’s better to have your
pipeline integrate at the plug-in level, and thus not require any knowledge
at all about Flask or other Frontends supplied by Pyblish?

# Psuedo-codeimport mypipelineimport pyblish_flask
class MyPlugin(pyblish_flask.Plugin):
    def process(self):
        # In this case, Flask integration is hidden away and accepts
        # data like a dictionary or what not.
        self.notify(mypipeline.data)

Best,
Marcus
​

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODLtMG%2B9RFGqzC5FHMMoB%2BoAN%2BgQ1Dq-ph_zCXQfTDoRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to