title: In python, How to use singleton pattern?
body: <p>My code is :</p>
  
  <pre><code>  class Handler():
  
          # make it static
          from pymongo import MongoClient
          client = MongoClient("localhost", 27017)
          db = client.newsdb
          news = db.news
  </code></pre>
  
  <p>I want to make the client variable to be static, so is above code the correct way to do that ? I also want to use singleton pattern, because maybe the MongoClient is very large element, and I want to new() this element when I really need it....</p>
  
  <p>How can I do that in python ? As a beginner, maybe ask some stupid question, sorry for that in advance...</p>