Using "opentargets-py" for an unofficial Python SDK

Hi! I’m building a Python SDK for the GraphQL API. Would you be okay with the name opentargets-py? I’ll make sure to note it’s unofficial. Thanks!

Hi @goknurarican,

We really appreciate you asking! Apologies for the late reply.

It’s fine for you to use opentargets-py, as long as it’s clear that it’s unofficial.

Thanks!

goknurarican Are you considering building a CLI as well? I suspect some users might consider it in the context of agentic frameworks as an alternative to the official MCP.

Otargen by @amirfeizi and @kamalika_ray in R is the closest I’ve seen on this kind of effort in the public domain

Is the ongoing work available on GitHub? I suspect others in this forum might be happy to provide some feedback.

We have update the otargen to migrate from open target genetics api, to the open target after the genetic portal got merged with the open target api. We also made a otargenpy which we did not updated it as most people were using otargen R package. Happy to share the github page for otargenpy if someone would likes to update the its graphql endpoints as well as query functions. Best, Amir

ok, spent few weekends now, and the otargenpy is functional as its sister otargen R package for python users.
otargenpy · PyPI

Hi all, thanks so much for the thoughtful replies!

Quick update: opentargets-py is now on PyPI and GitHub.

GitHub: https://github.com/goknurarican/opentargets-py PyPI: pip install opentargets-py

@ochoa, to your question about a CLI: yes, it’s in there now. Every command has a --json flag so it works in scripts and agent workflows. I also added an MCP server (opentargets-mcp) that drops into Claude Desktop or Cursor, so an agent can query the platform directly. That felt like a natural fit given your point about agentic frameworks.

@amirfeizi nice to see otargenpy is alive again! Mine targets the current unified Platform GraphQL API, so I think they complement each other well. Happy to compare notes sometime.