title: Difference between Sqlalchemy scoped_session(..) and scoped_session(..)()
body: <p>what is the difference between using <code>scoped_session</code> explicitly:</p>
  
  <pre><code>engine = create_engine(url)
  session = scoped_session(sessionmaker(bind=engine))
  
  session.add(..)
  session.commit()
  session.remove()
  
  session.add(..)
  session.commit()
  session.remove()
  </code></pre>
  
  <p>and creating instance of <code>scoped_session</code> object:</p>
  
  <pre><code>engine = create_engine(url)
  session = scoped_session(sessionmaker(bind=engine))
  
  session().add(..)
  session().commit()
  session.remove()
  
  session().add(..)
  session().commit()
  session.remove()
  </code></pre>
  
  <p>Sqlachemy always return the same session for the same thread by calling <code>session()</code>:</p>
  
  <pre><code>&gt;&gt; session() is session() 
  True
  &gt;&gt; session is session() 
  False
  </code></pre>
  
  <p>Is that a proper way to manipulate a connection in multithreaded environment? If so, why sqlalchemy allow to querying using <code>session</code> instead of <code>session()</code>?</p>