fakesnow
Fake Snowflake Connector for Python. Run, mock and test Snowflake DB locally.
What it is and what it does
fakesnow provides a local, in-memory Snowflake database mock for development and testing. It intercepts calls to the Snowflake Connector for Python via context-manager patching, redirecting them to a fake backend built on duckdb, pyarrow, and sqlglot. This lets you write and test code that uses Snowflake without needing a real account or cloud connection.
The package offers two modes: in-process patching for Python code (including pytest integration) and a standalone HTTP server for non-Python clients or subprocesses. Databases are in-memory by default but can be persisted to disk. It supports standard SQL operations, cursors, information schema queries, parameter binding, pandas integration (including write_pandas), and result batch retrieval. Some features like access control and stored procedures are not yet implemented.
Use it for:
- Unit test Python code that queries Snowflake without provisioning a test database or credentials.
- Mock Snowflake in CI/CD pipelines to run fast, isolated integration tests without cloud costs.
- Develop and debug Snowflake queries locally before deploying to production.
- Test pandas-to-Snowflake workflows (write_pandas) in isolation during development.
- Run pytest fixtures that automatically patch Snowflake Connector for test suites.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Runs a fake Snowflake database locally for testing, either by patching the Snowflake Connector in-process or via an HTTP server for non-Python clients.
Yes, if you write Python code against Snowflake and want fast, cost-free local testing. The package is actively maintained, has low install friction, and covers the most common Snowflake operations. Be aware that some advanced features (access control, stored procedures) are not yet implemented, and you should verify that your specific SQL patterns are supported before relying on it for comprehensive integration testing.
Install
fakesnow on PyPI
pip
pip install fakesnowuv
uv add fakesnowpoetry
poetry add fakesnowInstalling fakesnow
Before you install
Low install friction with a pure Python wheel. Active maintenance with a recent release and 202 repository stars. Requires duckdb, pyarrow, snowflake-connector-python, and sqlglot as runtime dependencies.
License in practice
Licensed under Apache License 2.0, a permissive license allowing commercial use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
pip install fakesnow
import fakesnow
import snowflake.connector
with fakesnow.patch():
conn = snowflake.connector.connect()
result = conn.cursor().execute("SELECT 'Hello fake world!'").fetchone()
print(result)
Requires Python 3.10 or later. The patch() context manager only affects the current process; subprocesses or non-Python clients require the server mode instead.
Verify before relying
- Whether all Snowflake SQL dialects and functions are fully compatible with the fake implementation
- Performance characteristics when handling large datasets or complex queries compared to real Snowflake
- Completeness of partially-supported features (date functions, regex, semi-structured data, tags, user management, stages, COPY INTO)
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — duckdb, pyarrow, snowflake-connector-python, sqlglot |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,963,658/month — #3,406 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fakesnow-0.11.13-py3-none-any.whl
Keywords: snowflake, snowflakedb, fake, local, mock, testing
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
django-snowflakeProvides a Django database backend that…
permissive · top 15,000 on PyPI
snowfakerySnowfakery generates fake relational data from…
permissive · top 15,000 on PyPI
snowflake-cliSnowflake CLI is a command-line tool for…
permissive · top 5,000 on PyPI
snowflake-sqlalchemySnowflake SQLAlchemy is a SQLAlchemy dialect…
permissive · top 1,000 on PyPI
pyfakefspyfakefs mocks the Python file system modules…
permissive · top 5,000 on PyPI
pytest-httpbinProvides a pytest fixture that runs a local…
permissive · top 15,000 on PyPI
snowflake-labs-mcpA deprecated MCP server that previously…
unclear · top 15,000 on PyPI
snowflake.coreProvides Python access to Snowflake entity…
permissive · top 5,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
cvdupdateDownloads and maintains a local ClamAV…
permissive · top 5,000 on PyPI