--- id: fakesnow version: "0.11.13" 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) license_treatment: permissive maintenance: active --- # fakesnow — Fake Snowflake Connector for Python. Run, mock and test Snowflake DB locally. License: permissive · Maintenance: active · Downloads: 2.0M/mo ## 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 above — 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 pip install fakesnow uv add fakesnow poetry add fakesnow ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 2.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags snowflake mock testing, fake snowflake connector, local snowflake database, snowflake unit testing, snowflake test fixture, snowflake emulator, test snowflake queries locally, snowflake-testing, database-mocking, local-development [View on SkillFed](https://skillfed.io/packages/fakesnow) · [View on PyPI](https://pypi.org/project/fakesnow/)