Hi,

thanks for the answer. I saw this tutorial many time on my google research, 
but I don't know how to integrate this in pyramid and specifically for 
Windows.

I probably not clear on that one, but I'm going to have only one database 
at the time. The sqlite (spatialite) is used for my local development and 
for unit test. Postgresql will be used for production environment.

Le mardi 9 juillet 2019 17:34:18 UTC-4, Jonathan Vanasco a écrit :
>
> 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/d2274ce5-1c2f-4369-86f2-9c012453b1db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to