> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# connect_from_env

> connect_from_env — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[sqlx\_support](https://docs.kinetica.com/content/api/rust/sqlx_support/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/sqlx_support.rs#L1460-L1467)&#x20;

<pre>`pub async fn connect_from_env() -> Result<KineticaPool, Error>`</pre>

Connect to Kinetica using environment variables.See [`connection_url_from_env`](https://docs.kinetica.com/content/api/rust/sqlx_support/fn.connection_url_from_env) for the expected environment variables.

## Example

```rust theme={null}
use gpudb_api::sqlx_support::connect_from_env;

let pool = connect_from_env().await?;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.