# \[ANN\] Opine 0.1.0 - Python source code transformations in OCaml

**URL:** <https://discuss.ocaml.org/t/ann-opine-0-1-0-python-source-code-transformations-in-ocaml/11365>\
**Category:** Community\
**Tags:** announce\
**Created:** [February 8, 2023, 6:35am UTC](https://discuss.ocaml.org/t/ann-opine-0-1-0-python-source-code-transformations-in-ocaml/11365 "2023-02-08T06:35:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Arul](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/arul/32/1604_2.png) [@Arul](https://discuss.ocaml.org/u/Arul)\
**Post date:** [February 8, 2023, 6:35am UTC](https://discuss.ocaml.org/t/ann-opine-0-1-0-python-source-code-transformations-in-ocaml/11365/1 "2023-02-08T06:35:27Z")

</div>

[pyre-ast](https://github.com/grievejia/pyre-ast) is an OCaml library that provides python AST representation in OCaml.

I had a need to do python source code transformations in OCaml. I made [Opine](https://github.com/ArulselvanMadhavan/opine) to do transformations on the AST and convert it back to python. So, in OCaml, you can write python code now, if you ever need to.

P.S. It still doesn’t support the entire python syntax 100%. I haven’t added support for things like for-comprehension but it should be fairly easy to add it. I plan to add support for the missing ones as I need it for my projects.

---

_[View the full topic](https://discuss.ocaml.org/t/ann-opine-0-1-0-python-source-code-transformations-in-ocaml/11365)._
