Quick Start
Ask your AI assistant:“Add a Database called ‘details’ to my project”Or add it directly to your
neptune.json:
neptune.json
“Provision my resources and deploy”
How It Works
When you provision a database, Neptune:- Creates a managed Postgres database
- Stores the connection string securely as a secret
- Exposes the connection string to your app as an environment variable
- You update your application to read that environment variable (and redeploy if necessary)
For the time being, you cannot connect to the database directly from your local machine. We will be releasing tooling that lets you query your database from your AI assistant.
Using in Your Application
The connection string is available as an environment variable:DATABASE_URL_{RESOURCE_NAME}.
For example, if your database resource is named details, you’ll get DATABASE_URL_DETAILS.
If you name your database my-app-db, you’ll get DATABASE_URL_MY_APP_DB.
If you want to use a different name for your database, you can specify it in your neptune.json:
- Python
Configuration Options
| Field | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | Must be "Database" |
name | string | Yes | Name of the database. |