## lamindb.connect

lamindb.connect(instance=None, **kwargs)

 Connect the default database.

 Alternatively, to use a database client, create a "DB" object.

 Parameters:
| **instance** ("str" | "None", default: "None") -- Pass a slug |
 ("account/name") or URL ("https://lamin.ai/account/name"). If
 "None", looks for an environment variable
 "LAMIN_CURRENT_INSTANCE" to get the database instance
 identifier. If it doesn't find this variable, it checks for a
 local marker created by "lamin connect --here" (nearest parent-
 first), and finally falls back to the global instance connected
 via "lamin connect".

 Return type:
| "str" | "tuple" | "None" |

 See also:

 To set a default database for auto-connection in your environment
 via the CLI, see here.