1. A quick online search shows this tutorial on spatialiate with 
sqlalchemy:  
https://geoalchemy-2.readthedocs.io/en/latest/spatialite_tutorial.html

the author is using a SqlAlchemy event to load the spatialate extension 
into the engine/connection/pool.

2. You are going to have a small problem with this bit:

 Local database: sqlite (for spatialite)
 Remote database: postgresql

The Pyramid cookiecutter and tutorial is designed for a single database 
connection.  Here, you want two database connections .

An easy way to do that is to make a second version of the database 
create-engine, and also duplicate the bit about adding the database to the 
request.  
It's not particularly hard, but it is a fair amount of work and one of the 
more advanced use-cases.  IIRC, there is another approach where you can 
configure SqlAlchemy to shard certain tables onto a first connection, and 
shard the other tables onto a second connection.  That approach is  a bit 
more difficult.

There may be a tutorial on that somewhere.

-- 
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-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/14801cca-a6ff-4b38-913e-33f340012eb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to