tundri


Nametundri JSON
Version 1.3.2 PyPI version JSON
download
home_pageNone
SummaryDrop, create and alter Snowflake objects and set permissions with Permifrost
upload_time2025-08-15 11:06:08
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords database ddl permifrost snowflake
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  <img src="docs/images/logo.jpg" alt="tundri Logo" width="200">
</div>

**tundri** is a Python package to declaratively create, drop, and alter Snowflake objects and manage their permissions with [Permifrost](https://gitlab.com/gitlab-data/permifrost).

## Motivation

Permifrost is great at managing permissions, but it doesn't create or alter objects. As [GitLab's data team handbook](https://handbook.gitlab.com/handbook/enterprise-data/platform/permifrost/) states:
> Object creation and deletion is not managed by permifrost

With only Permifrost, one would have to manually create the objects and then run Permifrost to set the permissions. This is error prone and time consuming. That is where tundri comes in.

### In a nutshell
**tundri** reads the [Permifrost spec file](https://gitlab.com/gitlab-data/permifrost#spec_file) and compares with the current state of the Snowflake account. It then creates, drops, and alters the objects to match. It leverages Permifrost's YAML `meta` tags to set attributes like `default_role` for users and `warehouse_size` for warehouses. Once the objects are created, tundri runs Permifrost to set the permissions.

## Getting started

### Prerequisites

- Credentials to a Snowflake account with the `securityadmin` role
- A Permifrost spec file

### Install

```bash
pip install tundri
```

### Configure

#### Permifrost
Add a valid [Permifrost spec file](https://gitlab.com/gitlab-data/permifrost#spec_file) to your repository. You can use the files in the `examples` folder as reference.

#### Snowflake
Set up your Snowflake connection details in the environment variables listed below.

> [!TIP]
> You can use a `.env` file to store your credentials. Place it in the same folder as the Permifrost spec file.

```bash
PERMISSION_BOT_ACCOUNT=abc134.west-europe.azure  # Your account identifier
PERMISSION_BOT_USER=PERMIFROST
PERMISSION_BOT_PASSWORD=...
PERMISSION_BOT_ROLE=SECURITYADMIN    # Permifrost requires it to be `SECURITYADMIN`
PERMISSION_BOT_DATABASE=PERMIFROST
PERMISSION_BOT_WAREHOUSE=ADMIN
```

### Usage
The `run` subcommand is going to drop/create objects and run Permifrost.

#### Dry run
```bash
tundri run --permifrost_spec_path examples/permifrost.yml --dry
```

#### Normal run
```bash
tundri run --permifrost_spec_path examples/permifrost.yml
```

#### Getting help
```bash
tundri --help
```

## Development
### Local setup
Install the development dependencies

```bash
uv sync
```

### Run tests
Run the tests
```bash
uv run pytest -v
```

### Formatting
Run the command below to format the code
```bash
uv run black .
```

### Testing locally
Dry run with the example spec file
```bash
uv run tundri run --dry -p examples/permifrost.yml
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tundri",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "database, ddl, permifrost, snowflake",
    "author": null,
    "author_email": "Gemma Analytics <bijan.soltani@gemmaanalytics.com>",
    "download_url": "https://files.pythonhosted.org/packages/ee/10/37c2e1912e855160c278130ae23f72d3c2deb75425cc9aac4789672de1bf/tundri-1.3.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  <img src=\"docs/images/logo.jpg\" alt=\"tundri Logo\" width=\"200\">\n</div>\n\n**tundri** is a Python package to declaratively create, drop, and alter Snowflake objects and manage their permissions with [Permifrost](https://gitlab.com/gitlab-data/permifrost).\n\n## Motivation\n\nPermifrost is great at managing permissions, but it doesn't create or alter objects. As [GitLab's data team handbook](https://handbook.gitlab.com/handbook/enterprise-data/platform/permifrost/) states:\n> Object creation and deletion is not managed by permifrost\n\nWith only Permifrost, one would have to manually create the objects and then run Permifrost to set the permissions. This is error prone and time consuming. That is where tundri comes in.\n\n### In a nutshell\n**tundri** reads the [Permifrost spec file](https://gitlab.com/gitlab-data/permifrost#spec_file) and compares with the current state of the Snowflake account. It then creates, drops, and alters the objects to match. It leverages Permifrost's YAML `meta` tags to set attributes like `default_role` for users and `warehouse_size` for warehouses. Once the objects are created, tundri runs Permifrost to set the permissions.\n\n## Getting started\n\n### Prerequisites\n\n- Credentials to a Snowflake account with the `securityadmin` role\n- A Permifrost spec file\n\n### Install\n\n```bash\npip install tundri\n```\n\n### Configure\n\n#### Permifrost\nAdd a valid [Permifrost spec file](https://gitlab.com/gitlab-data/permifrost#spec_file) to your repository. You can use the files in the `examples` folder as reference.\n\n#### Snowflake\nSet up your Snowflake connection details in the environment variables listed below.\n\n> [!TIP]\n> You can use a `.env` file to store your credentials. Place it in the same folder as the Permifrost spec file.\n\n```bash\nPERMISSION_BOT_ACCOUNT=abc134.west-europe.azure  # Your account identifier\nPERMISSION_BOT_USER=PERMIFROST\nPERMISSION_BOT_PASSWORD=...\nPERMISSION_BOT_ROLE=SECURITYADMIN    # Permifrost requires it to be `SECURITYADMIN`\nPERMISSION_BOT_DATABASE=PERMIFROST\nPERMISSION_BOT_WAREHOUSE=ADMIN\n```\n\n### Usage\nThe `run` subcommand is going to drop/create objects and run Permifrost.\n\n#### Dry run\n```bash\ntundri run --permifrost_spec_path examples/permifrost.yml --dry\n```\n\n#### Normal run\n```bash\ntundri run --permifrost_spec_path examples/permifrost.yml\n```\n\n#### Getting help\n```bash\ntundri --help\n```\n\n## Development\n### Local setup\nInstall the development dependencies\n\n```bash\nuv sync\n```\n\n### Run tests\nRun the tests\n```bash\nuv run pytest -v\n```\n\n### Formatting\nRun the command below to format the code\n```bash\nuv run black .\n```\n\n### Testing locally\nDry run with the example spec file\n```bash\nuv run tundri run --dry -p examples/permifrost.yml\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Drop, create and alter Snowflake objects and set permissions with Permifrost",
    "version": "1.3.2",
    "project_urls": {
        "Homepage": "https://github.com/Gemma-Analytics/tundri",
        "Issues": "https://github.com/Gemma-Analytics/tundri/issues",
        "Repository": "https://github.com/Gemma-Analytics/tundri"
    },
    "split_keywords": [
        "database",
        " ddl",
        " permifrost",
        " snowflake"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b0cd37734432c20142064429fb80aa6e49cf3028b749be17ad5f459e4639e633",
                "md5": "162884df2f01e626516da8a5040ddccd",
                "sha256": "9a2d681c526bed7eaa6b3fbc96694cd8b8eaf3b77807aa1bf2caad162b39db45"
            },
            "downloads": -1,
            "filename": "tundri-1.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "162884df2f01e626516da8a5040ddccd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13624,
            "upload_time": "2025-08-15T11:06:07",
            "upload_time_iso_8601": "2025-08-15T11:06:07.345648Z",
            "url": "https://files.pythonhosted.org/packages/b0/cd/37734432c20142064429fb80aa6e49cf3028b749be17ad5f459e4639e633/tundri-1.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ee1037c2e1912e855160c278130ae23f72d3c2deb75425cc9aac4789672de1bf",
                "md5": "acd7d43eae0143b708e8e74d2cccb880",
                "sha256": "3689ae6b111b7b49e971470daef5d821cc95e586c1a4651db13255f2689244c3"
            },
            "downloads": -1,
            "filename": "tundri-1.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "acd7d43eae0143b708e8e74d2cccb880",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 431173,
            "upload_time": "2025-08-15T11:06:08",
            "upload_time_iso_8601": "2025-08-15T11:06:08.747031Z",
            "url": "https://files.pythonhosted.org/packages/ee/10/37c2e1912e855160c278130ae23f72d3c2deb75425cc9aac4789672de1bf/tundri-1.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-15 11:06:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Gemma-Analytics",
    "github_project": "tundri",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tundri"
}
        
Elapsed time: 1.48500s