## 1.7.2 API Reference

The `EnvironmentDriver` object is used to manipulate the environment. It is obtained from the `driver()` method of the `web.environment` module.

`driver`( | storage, [name=''], [**params])

  Used to return an `EnvironmentDriver` object.

  storage
    The storage driver to be used in the environment. Currently can only be `'database'`.

  name
    The name of the environment (used to prepend database tables if storage is `'database'`)

  **params
    Any other parameters needed by the `EnvironmentDriver` object. For example if storage is `'database'` then cursor should also be specified as a valid cursor to the database in which the environment exists.

class `EnvironmentDriver`

  `EnvironmentDriver` objects have the following methods:

  `completeEnvironment`( | )

    Returns `True` if all auth and session tables exist, `False` otherwise. XXX Does not check the structure of the tables.

  `createEnvironment`( | )

    Creates all the auth and session tables, raising an error if any already exist.

  `removeEnvironment`( | [ignoreErrors=False])

    Removes all the auth and session tables, raising an error if any don't exist unless ignoreErrors is `True`.