# Wrap Julia package in Python: which is the best option?

**URL:** <https://discourse.julialang.org/t/wrap-julia-package-in-python-which-is-the-best-option/79344>\
**Category:** Package Management\
**Tags:** python\
**Created:** [April 11, 2022, 1:46pm UTC](https://discourse.julialang.org/t/wrap-julia-package-in-python-which-is-the-best-option/79344 "2022-04-11T13:46:54Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [August 20, 2022, 3:51pm UTC](https://discourse.julialang.org/t/wrap-julia-package-in-python-which-is-the-best-option/79344/14 "2022-08-20T15:51:30Z")

</div>

There’s one more new option. Not sure It’s been announced, but it installs from Python (and its Julia sub-module TyPython.jl was recently registered too):

> **[GitHub - Suzhou-Tongyuan/jnumpy: Writing Python C extensions in Julia within 5...](https://github.com/Suzhou-Tongyuan/jnumpy)**
>
> Writing Python C extensions in Julia within 5 minutes.

That should work for all Julia code (also juliacall, part of PythonCall.jl). There’s also, but still only for special Julia code:

> [@Successful Static Compilation of Julia Code for use in Production](https://discourse.julialang.org/t/successful-static-compilation-of-julia-code-for-use-in-production/79318):
>
> The [StaticCompiler](https://github.com/tshort/StaticCompiler.jl) package was recently registered. This post records a successful experiment to statically compile a piece of Julia code into a small .so library on Linux, which is then loaded from Python and used in training of a deep learning model. TLDR Static compilation to a stand-alone library does work on Linux but has rather significant restrictions on the functionality available. It is mostly useful for core computational routines. Roughly speaking, if it could be implemented in plai…

one of its limitations:

> Doesn’t currently work on Windows.

and building on it (with same (above) limitations):

> [@\[ANN\] StaticTools.jl: Enabling StaticCompiler.jl-based compilation of Julia code to standalone native binaries by avoiding GC allocations and \`llvmcall\`-ing all the things](https://discourse.julialang.org/t/ann-statictools-jl-enabling-staticcompiler-jl-based-compilation-of-julia-code-to-standalone-native-binaries-by-avoiding-gc-allocations-and-llvmcall-ing-all-the-things/80398):
>
> Technically this one has been registered for a couple months already, but we never made an announcement, so here goes! [GitHub - brenhinkeller/StaticTools.jl: Enabling StaticCompiler.jl-based compilation of (some) Julia code to standalone native binaries by avoiding GC allocations and llvmcall-ing all the things!](https://github.com/brenhinkeller/StaticTools.jl) I’ve just released version 0.3, which brings a lot of major changes. While it’s still a somewhat experimental package, I think it’s at least to some extent ready for other folks to use,…

> Calling compiled Julia library from Python

---

_[View the full topic](https://discourse.julialang.org/t/wrap-julia-package-in-python-which-is-the-best-option/79344)._
