# What's the Jinja (dbt-utils) alternative of dbt-Python models?

**URL:** <https://discourse.getdbt.com/t/whats-the-jinja-dbt-utils-alternative-of-dbt-python-models/9275>\
**Category:** Help\
**Tags:** jinja, python-models\
**Created:** [July 24, 2023, 10:11pm UTC](https://discourse.getdbt.com/t/whats-the-jinja-dbt-utils-alternative-of-dbt-python-models/9275 "2023-07-24T22:11:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![markcruz](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@markcruz](https://discourse.getdbt.com/u/markcruz)\
**Post date:** [July 24, 2023, 10:11pm UTC](https://discourse.getdbt.com/t/whats-the-jinja-dbt-utils-alternative-of-dbt-python-models/9275/1 "2023-07-24T22:11:41Z")

</div>

## The problem I’m having

How do I go about using dbt-utils macros within Python models? Is this even possible? What is the alternative?

## The context of why I’m trying to do this

I would like to reuse the macros already implemented in dbt-utils.

## What I’ve already tried

I’ve tried calling dbt-utils within session.sql()

## Some example code or error messages

Got an error saying “No jinja in python model code is allowed”
