docs: def db(cls, dbname=None):
          """Retrieve the database
  
          Args:
              dbname: Specify the name of the database to retrieve. If set to `None`, take the name
                  from the configuration (see :ref:`configuration <eop-dbname>`)
          Return:
              object
          """
  
          cls._load_entry_points()
  
          dbname = dbname or config.get('eop', 'dbname', fallback=cls.DEFAULT_DBNAME)
  
          if dbname not in cls._dbs.keys():
              raise EopError("Unknown database '%s'" % dbname)
  
          if isclass(cls._dbs[dbname]):
              # Instanciation
              try:
                  cls._dbs[dbname] = cls._dbs[dbname]()
              except Exception as e:
                  # Keep the exception in cache in order to not retry instanciation
                  # every single time EopDb.db() is called, as instanciation
                  # of database is generally a time consumming operation.
                  # If it failed once, it will most probably fail again
                  cls._dbs[dbname] = e
  
          if isinstance(cls._dbs[dbname], Exception):
              raise EopError("Problem at database instanciation") from cls._dbs[dbname]
  
          return cls._dbs[dbname]