# PackagesPolicy

[Snowflake Documentation](https://docs.snowflake.com/en/sql-reference/sql/create-packages-policy)

A Packages Policy defines a set of rules for allowed and blocked packages that are applied to user-defined functions and stored procedures.

## Examples

### Python

```python
packages_policy = PackagesPolicy(
    name="some_packages_policy",
    allowlist=["numpy", "pandas"],
    blocklist=["os", "sys"],
    comment="Policy for data processing packages."
)
```

### YAML

```yaml
packages_policy:
  - name: some_packages_policy
    allowlist:
      - numpy
      - pandas
    blocklist:
      - os
      - sys
    comment: Policy for data processing packages.
```

## Fields

* `name` (string, required) - The name of the packages policy.
* `language` (string or [Language](https://github.com/Titan-Systems/titan/blob/main/docs/resources/language.md)) - The programming language for the packages. Defaults to PYTHON.
* `allowlist` (list) - A list of package specifications that are explicitly allowed.
* `blocklist` (list) - A list of package specifications that are explicitly blocked.
* `additional_creation_blocklist` (list) - A list of package specifications that are blocked during creation.
* `comment` (string) - A comment or description for the packages policy.
* `owner` (string or [Role](/titan-core/resources/role.md)) - The owner role of the packages policy. Defaults to SYSADMIN.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://titan-core.gitbook.io/titan-core/resources/packages_policy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
