Pyramid, Dart, setuptools


I’m starting to develop a web application in python 3 in the Pyramid framework and I would really like to use Dart instead of js. However, dart must be compiled to js in order to run in all browsers.

My question: what is a good workflow for developing a pyramid web app using dart? Should I develop the Dart code completely separate and just copy the built product into my Pyramid project? Or should I have it all in one right form the start and somehow manage it inside the package? Pyramid (more or less) forces the usage of setuptools/distutils and I relly don’t know how should I deal with compiling the dart code in the setuptools/distutils context.

Or is there a completely differend workflow which didn’t come to my mind?

I am right at the start and I am very open to possibilites.

Thanks for any answers/advice/whatever helps me.

Note: I’m using PyCharm IDE professional (i.e. with pyramid support) so a solution which works well in PyCharm is highly appreciated.


To trigger a compilation of Dart resources you could use “Before launch” tasks of every PyCharm Run/Debug configuration as shown in a screenshot of a tutorial. There you would call pub build and build into an output directory that is picked up by your pyramid application.

Another handy feature during development is reloading. Pyramid has an option for reloading chameleon/jinja/mako templates. It think Dart Tools provide same feature to developers.

Good luck with your project. Just try if it works for you.

Answered By – Sascha Gottfried

Answer Checked By – Pedro (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *