# Can't use pydantic library in lookup plugin

**URL:** <https://forum.ansible.com/t/cant-use-pydantic-library-in-lookup-plugin/33926>\
**Category:** Ansible Developer\
**Created:** [September 30, 2020, 12:09am UTC](https://forum.ansible.com/t/cant-use-pydantic-library-in-lookup-plugin/33926 "2020-09-30T00:09:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thlanzer](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@thlanzer](https://forum.ansible.com/u/thlanzer)\
**Post date:** [September 30, 2020, 12:09am UTC](https://forum.ansible.com/t/cant-use-pydantic-library-in-lookup-plugin/33926/1 "2020-09-30T00:09:35Z")

</div>

Hi there

I tried to embed some python code as a plugin that uses pydantic library.

Seems that this does not work in combination with Ansible.

Did anybody have similiar issues?

I would really appreciate if you can give me a hint how to solve it.

Thank you very much in advance!

sample plugin code (copied from ‘file’ plugin)

> **(attachments)**
>
> ![2020-09-30 02_01_54-pydantic-in-ansible-plugin.png](https://us1.discourse-cdn.com/ansible/original/2X/7/775c0498b1c7f3ef638b0c45eedd9d93f63c3c8f.png)
