title: Using multiple database with same model in flask-sqlalchemy
body: <p>So I have multiple database. <code>DB_US</code> and <code>DB_UK</code>. They have the exact same structure but they hold data for different countries. I have an api with flask_restful. The endpoint accept a country to retrieve the data of this specific country.</p>
  
  <p>My problem is I can't figure out how to select the database per request. I've read the bind method, but you have to specify a <code>__bind_key</code> per model and all my model are in both databases. </p>
  
  <p>I've tried to initialize the database within the <code>@before_request</code>, but you can't call the <code>init_db</code> method (or any setup method) after the first request has been handled.</p>
  
  <p>This is a particular case because the database are identical so it seems like it would make sense to have it in the same database, but it's part of a larger system and needs to be that way.</p>
  
  <p>How could I select the database on a per request basis?</p>