    def __init__(self, connection=None):
        """Initialize the Bigchain instance

        A Bigchain instance has several configuration parameters (e.g. host).
        If a parameter value is passed as an argument to the Bigchain
        __init__ method, then that is the value it will have.
        Otherwise, the parameter value will come from an environment variable.
        If that environment variable isn't set, then the value
        will come from the local configuration file. And if that variable
        isn't in the local configuration file, then the parameter will have
        its default value (defined in bigchaindb.__init__).

        Args:
            connection (:class:`~bigchaindb.backend.connection.Connection`):
                A connection to the database.
        """
        config_utils.autoconfigure()
        self.mode_commit = BROADCAST_TX_COMMIT
        self.mode_list = (BROADCAST_TX_ASYNC,
                          BROADCAST_TX_SYNC,
                          self.mode_commit)
        self.tendermint_host = bigchaindb.config['tendermint']['host']
        self.tendermint_port = bigchaindb.config['tendermint']['port']
        self.endpoint = 'http://{}:{}/'.format(self.tendermint_host, self.tendermint_port)

        validationPlugin = bigchaindb.config.get('validation_plugin')

        if validationPlugin:
            self.validation = config_utils.load_validation_plugin(validationPlugin)
        else:
            self.validation = BaseValidationRules

        self.connection = connection if connection else backend.connect(**bigchaindb.config['database'])
Initialize the Bigchain instance

A Bigchain instance has several configuration parameters (e.g. host).
If a parameter value is passed as an argument to the Bigchain
__init__ method, then that is the value it will have.
Otherwise, the parameter value will come from an environment variable.
If that environment variable isn't set, then the value
will come from the local configuration file. And if that variable
isn't in the local configuration file, then the parameter will have
its default value (defined in bigchaindb.__init__).

Args:
connection (:class:`~bigchaindb.backend.connection.Connection`):
A connection to the database.
bigchaindb/lib.py