is it possible to 'nest' a pyramid application within a larger library?

25 views
Skip to first unread message

Jonathan Vanasco

unread,
Jan 27, 2020, 3:37:26 PM1/27/20
to pylons-discuss
does anyone know if it possible to nest a pyramid application within a larger library?

for example, I would like a Pyramid application's root to be `myapp.web`, instead of `myapp`.  

I don't think this is possible, which is fine - I can just split the pyramid app into a separate package.

Theron Luhn

unread,
Jan 27, 2020, 3:44:11 PM1/27/20
to 'Peter Lada' via pylons-discuss
This is totally possible.  I actually have a live application that’s set up in much the same way.  (Pyramid app nested inside another Pyramid app.)

It was pretty straightforward when I did it, I don’t think there’s any assumptions made about where the application lives.  What particular troubles you’re having?

— Theron



--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/66bd44da-f33b-44db-b479-b5d060091067%40googlegroups.com.

Jonathan Vanasco

unread,
Jan 27, 2020, 5:37:10 PM1/27/20
to pylons-discuss
wow. it would be great if I can get this to work then.  this package started out as a pyramid app, but now the pyramid/web usage is 1/3 of typical usage patterns (it also has a terminal console and a python developer library).  i'd prefer to restructure the distribution so the pyramid-only stuff is reorganized under "web".

I can't match up the right combo of these 2 things into something that will install/run.  i assume these are what I need to configure:

environment.ini
      [app:main]
      use = egg:myapp.web

setup.py
      [paste.app_factory]
      main =  myapp.web:main



On Monday, January 27, 2020 at 3:44:11 PM UTC-5, Theron Luhn wrote:
This is totally possible.  I actually have a live application that’s set up in much the same way.  (Pyramid app nested inside another Pyramid app.)

It was pretty straightforward when I did it, I don’t think there’s any assumptions made about where the application lives.  What particular troubles you’re having?

— Theron



On Jan 27, 2020, at 12:37 PM, Jonathan Vanasco <jona...@findmeon.com> wrote:

does anyone know if it possible to nest a pyramid application within a larger library?

for example, I would like a Pyramid application's root to be `myapp.web`, instead of `myapp`.  

I don't think this is possible, which is fine - I can just split the pyramid app into a separate package.


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-...@googlegroups.com.

Theron Luhn

unread,
Jan 27, 2020, 5:41:42 PM1/27/20
to 'Peter Lada' via pylons-discuss
Your setup.py is correct.

In the ini file, `use` points not to a module but an entry point.  So it should be `use = egg:myapp#main`

— Theron



To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/ba721314-be8b-481e-a686-8dfe05f2ef25%40googlegroups.com.

Jonathan Vanasco

unread,
Jan 28, 2020, 4:31:05 PM1/28/20
to pylons-discuss
thank you! 
Reply all
Reply to author
Forward
0 new messages