# Pass around object instances between Mathematica and Python

**URL:** <https://community.wolfram.com/t/pass-around-object-instances-between-mathematica-and-python/15263>\
**Category:** Ideas\
**Tags:** external-interfaces, interface-construction\
**Created:** [January 18, 2020, 11:13am UTC](https://community.wolfram.com/t/pass-around-object-instances-between-mathematica-and-python/15263 "2020-01-18T11:13:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernhardliebl](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/bernhardliebl/32/3568_2.png) [@bernhardliebl](https://community.wolfram.com/u/bernhardliebl)\
**Post date:** [January 18, 2020, 11:13am UTC](https://community.wolfram.com/t/pass-around-object-instances-between-mathematica-and-python/15263/1 "2020-01-18T11:13:46Z")

</div>

Hello there,

I recently ran into some limitations of the current 12.0 Python session and wrote a small workaround that allows one to use Python objects in a more versatile way:

 ![docs2.png](https://global.discourse-cdn.com/wolfram/original/3X/8/7/8761c35626717516a1814713c08483b29850dabd.png)

This intended for usage inside notebooks, where the occurring memory leakage is not an issue.

Hope this might be useful for others:

[https://github.com/poke1024/mathematica-py](https://github.com/poke1024/mathematica-py)
