# Julia code/package to read and write RDF/OWL turtle files

**URL:** <https://discourse.julialang.org/t/julia-code-package-to-read-and-write-rdf-owl-turtle-files/128350>\
**Category:** Graphs\
**Created:** [April 24, 2025, 4:25am UTC](https://discourse.julialang.org/t/julia-code-package-to-read-and-write-rdf-owl-turtle-files/128350 "2025-04-24T04:25:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [April 24, 2025, 4:25am UTC](https://discourse.julialang.org/t/julia-code-package-to-read-and-write-rdf-owl-turtle-files/128350/1 "2025-04-24T04:25:33Z")

</div>

Does anyone know where to find a package or example code to read and write turtle files containing RDF or OWL ontologies? There is a package ([JuliaPackageMirrors/RDF.jl: Julia package mirror.](https://github.com/JuliaPackageMirrors/RDF.jl/tree/master)), but it has not been updated recently.

Something equivalent to the Python rdflib.

The idea is to read these files into a julia Graph or save from a Graph object.

---

<div class="post-metadata">

**Author:** ![TheCedarPrince](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thecedarprince/32/17323_2.png) [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Post date:** [April 24, 2025, 3:13pm UTC](https://discourse.julialang.org/t/julia-code-package-to-read-and-write-rdf-owl-turtle-files/128350/2 "2025-04-24T15:13:32Z")

</div>

@kobusherbst , could this help a bit better: [GitHub - epatters/Serd.jl: Julia bindings to Serd RDF library](https://github.com/epatters/Serd.jl) ?

This is from @epatters who I know is extremely active in Julia world.

---

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [April 25, 2025, 3:56am UTC](https://discourse.julialang.org/t/julia-code-package-to-read-and-write-rdf-owl-turtle-files/128350/3 "2025-04-25T03:56:56Z")

</div>

Thank you, I will definitely give it a try. Serd is being actively maintained as well. It is certainly a cleaner option for me than using Python’s rdflib.

---

<div class="post-metadata">

**Author:** ![TheCedarPrince](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thecedarprince/32/17323_2.png) [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Post date:** [April 25, 2025, 4:10am UTC](https://discourse.julialang.org/t/julia-code-package-to-read-and-write-rdf-owl-turtle-files/128350/4 "2025-04-25T04:10:59Z")

</div>

Glad to hear it! Feel free to share how you end up using it or any examples you think or fun – I’d love to see what you get up to here! 😃

---

<div class="post-metadata">

**Author:** ![kobusherbst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kobusherbst/32/19682_2.png) [@kobusherbst](https://discourse.julialang.org/u/kobusherbst)\
**Post date:** [April 28, 2025, 6:09am UTC](https://discourse.julialang.org/t/julia-code-package-to-read-and-write-rdf-owl-turtle-files/128350/5 "2025-04-28T06:09:26Z")

</div>

I have delved a bit deeper into the Serd.jl package. Unfortunately, it is stuck at an old version of the Serd C library, which is still being updated regularly. I have looked at what it would take to update Serd.jl myself, but the C library build manager have changed, and after wrestling with it, I was unable to build the updated \_jll package to incorporate the latest version of the package.

Serd.jl itself requires updates as well, e.g. currently it doesn’t support xsd:Date type, this fix I can do myself, but I prefer doing that against the latest version of the C library.

I would be grateful if anyone could help me to build the Serd\_jll package using the latest version of the [C library](https://github.com/drobilla/serd.git)
