title: Python, SQLite and threading
body: <p>I'm working on an application that will gather data through HTTP from several places, cache the data locally and then serve it through HTTP.</p>
  
  <p>So I was looking at the following. My application will first create several threads that will gather data at a specified interval and cache that data locally into a SQLite database.   </p>
  
  <p>Then in the main thread start a CherryPy application that will query that SQLite database and serve the data.</p>
  
  <p>My problem is: how do I handle connections to the SQLite database from my threads and from the CherryPy application?</p>
  
  <p>If I'd do a connection per thread to the database will I also be able to create/use an in memory database?</p>