Metadata-Version: 2.5
Name: snowcap
Version: 1.0.27
Summary: Snowcap: Snowflake infrastructure as code
Project-URL: Homepage, https://github.com/datacoves/snowcap
Author: Datacoves
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: SQL
Classifier: Topic :: Database
Requires-Python: >=3.10
Requires-Dist: click<8.2
Requires-Dist: inflection==0.5.1
Requires-Dist: jinja2
Requires-Dist: pathspec
Requires-Dist: pyopenssl>=22.1.0
Requires-Dist: pyparsing==3.0.9
Requires-Dist: pyyaml
Requires-Dist: rich-click==1.8.9
Requires-Dist: snowflake-connector-python>=3.12.3
Requires-Dist: snowflake-snowpark-python>=1.24.0
Description-Content-Type: text/markdown

# `snowcap` - Snowflake infrastructure as code

[![PyPI](https://img.shields.io/pypi/v/snowcap)](https://pypi.org/project/snowcap/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)

## Brought to you by Datacoves

<a href="https://datacoves.com">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/datacoves/snowcap/main/images/datacoves-dark.png">
    <img alt="Datacoves" src="https://raw.githubusercontent.com/datacoves/snowcap/main/images/datacoves-light.png" width="150">
  </picture>
</a>

Snowcap helps you provision, deploy, and secure resources in Snowflake. Datacoves takes it further: a managed DataOps platform for dbt and Airflow where governance and best practices are built into every layer.

- **Private cloud or SaaS** – your data, your choice
- **Managed dbt + Airflow** – production-ready from day one
- **In-browser VS Code** – onboard developers in minutes
- **Bring your own tools** – integrates with your existing stack, no lock-in
- **AI-assisted development** – connect your organization's approved LLM (Anthropic, OpenAI, Azure, Gemini, and more)
- **Built-in governance** – CI/CD, guardrails, and best practices included

Snowcap is the power tools. Datacoves is the workshop.

[Explore the platform →](https://datacoves.com)

---

## Why Snowcap?

Snowcap replaces Terraform, Schemachange, or Permifrost with a single, purpose-built tool for Snowflake.

| Feature | Snowcap | Terraform | SnowDDL | Permifrost |
|---------|---------|-----------|---------|------------|
| Snowflake-native | ✅ | ❌ | ✅ | ✅ |
| No state file | ✅ | ❌ | ✅ | ✅ |
| YAML + Python | ✅ | HCL only | YAML only | YAML only |
| Speed | 50%+ faster | Baseline | Fast | Slow |
| 60+ resource types | ✅ | Most | Most | Grants only |
| Templating / loops | ✅ | ✅ | Limited | ❌ |
| Export existing resources | ✅ | Import only | ❌ | ❌ |
| Actively maintained | ✅ Datacoves | ✅ Snowflake | ⚠️ Single maintainer | ⚠️ Infrequent |

## Key Features

- **Declarative** — Generates the right SQL to make your config match your account
- **Comprehensive** — 60+ Snowflake resource types supported
- **Flexible** — Write configuration in YAML or Python
- **Fast** — 50%+ faster than Terraform and Permifrost
- **Migration-friendly** — Export existing resources with the CLI

## Quick Start

Run with [uv](https://docs.astral.sh/uv/) (no install needed):

```sh
uvx snowcap plan --config snowcap.yml
```

Or install from PyPI:

```sh
pip install snowcap
```

Create `snowcap.yml`:

```yaml
warehouses:
  - name: analytics
    warehouse_size: xsmall
    auto_suspend: 60
```

Run:

```sh
# Set credentials
export SNOWFLAKE_ACCOUNT=my-account
export SNOWFLAKE_USER=my-user
export SNOWFLAKE_PASSWORD=my-password
export SNOWFLAKE_ROLE=SYSADMIN

# Preview changes
snowcap plan --config snowcap.yml

# Apply changes
snowcap apply --config snowcap.yml
```

## Documentation

Full documentation, examples, and resource reference at **[snowcap.datacoves.com](https://snowcap.datacoves.com)**

- [Getting Started](https://snowcap.datacoves.com/getting-started/)
- [Why Snowcap?](https://snowcap.datacoves.com/why-snowcap/)

## Development

Contributor setup uses [uv](https://docs.astral.sh/uv/). One command creates `.venv`, installs snowcap editable, and installs the pinned dev dependencies from `uv.lock`:

```sh
make install-dev
```

This removes stale `pip install -e .` metadata (which would shadow the uv-managed install) and runs `uv sync`. Run tools through uv so the environment can never drift from the checkout:

```sh
uv run pytest          # unit tests
make lint              # black --check, codespell, ruff
make typecheck         # mypy
```

See [TESTING.md](TESTING.md) for integration test setup.

## Background

Snowcap is a fork of [Titan Core](https://github.com/Titan-Systems/titan). The original project appeared unmaintained, so Datacoves forked it to continue active development, fix bugs, and add new features. We're grateful to the Titan Systems team for creating and open-sourcing the original project under the Apache 2.0 license.

## Support

- [Documentation](https://snowcap.datacoves.com)
- [GitHub Issues](https://github.com/datacoves/snowcap/issues)
