Install & Compatibility
Where this runs
tested against v5.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
build_error
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 8.2s · import 0.000s · 138MB
130MB installed
● package 130MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ENGINE setting
✓ DATABASES = {'default': {'ENGINE': 'django_snowflake', ...}}
✗ DATABASES = {'default': {'ENGINE': 'django_snowflake.base', ...}}
The correct engine path is simply 'django_snowflake', not a deeper internal module path.
Configure your `settings.py` `DATABASES` entry. It's recommended to use environment variables for sensitive credentials and connection details. The `NAME` parameter typically refers to the database in Snowflake. You can provide connection details via individual `OPTIONS` or a full `DSN` string.
import os
DATABASES = {
"default": {
"ENGINE": "django_snowflake",
"NAME": os.environ.get("SNOWFLAKE_DATABASE", "mydb"),
"USER": os.environ.get("SNOWFLAKE_USER", "my_user"),
"OPTIONS": {
"ACCOUNT": os.environ.get("SNOWFLAKE_ACCOUNT", "myaccount"),
"PASSWORD": os.environ.get("SNOWFLAKE_PASSWORD", ""),
"WAREHOUSE": os.environ.get("SNOWFLAKE_WAREHOUSE", "my_warehouse"),
"ROLE": os.environ.get("SNOWFLAKE_ROLE", "my_role"),
# Optional: Specify the schema if not using a DSN that includes it
"SCHEMA": os.environ.get("SNOWFLAKE_SCHEMA", "public")
# For key-pair authentication, provide PRIVATE_KEY instead of PASSWORD:
# "PRIVATE_KEY": os.environ.get("SNOWFLAKE_PRIVATE_KEY", ""),
# "PRIVATE_KEY_PASSPHRASE": os.environ.get("SNOWFLAKE_PRIVATE_KEY_PASSPHRASE", "")
},
}
}
# Example of using a DSN (Data Source Name) instead of separate options:
# DATABASES = {
# "default": {
# "ENGINE": "django_snowflake",
# "NAME": os.environ.get("SNOWFLAKE_DATABASE", "mydb"),
# "OPTIONS": {
# "DSN": os.environ.get(
# "SNOWFLAKE_DSN",
# "snowflake://{user}:{password}@{account}.snowflakecomputing.com/{database}/{schema}?warehouse={warehouse}&role={role}"
# ).format(
# user=os.environ.get("SNOWFLAKE_USER", "my_user"),
# password=os.environ.get("SNOWFLAKE_PASSWORD", ""),
# account=os.environ.get("SNOWFLAKE_ACCOUNT", "myaccount"),
# database=os.environ.get("SNOWFLAKE_DATABASE", "mydb"),
# schema=os.environ.get("SNOWFLAKE_SCHEMA", "public"),
# warehouse=os.environ.get("SNOWFLAKE_WAREHOUSE", "my_warehouse"),
# role=os.environ.get("SNOWFLAKE_ROLE", "my_role")
# )
# },
# }
# }
Upgrade
Version history
6.0latest on PyPI · released Dec 6, 2025
Audit
Dependencies
DjangorequiredThis is a database backend for Django applications. Version 6.0 requires Django 5.x.
snowflake-connector-pythonrequiredUnderlying Python connector for Snowflake.