Question Can I use Python libraries in a .NET AI app? Is this approach feasible and performant?

riddhi

New member
Joined
Apr 25, 2025
Messages
1
Programming Experience
Beginner
Hi all,
I’m planning to build an AI-driven application where I’d prefer to write the main logic and structure in .NET (C#) for better control and integration with existing systems.
However, some of the functionalities I need are available in Python libraries, such as:
  • azure-cognitiveservices-vision-computervision (for image analysis)
  • openai (for LLMs and generative AI)
  • pymupdf and reportlab (for PDF processing and generation)
  • python-multipart, Pillow, and weasyprint (for file uploads, image processing, and document rendering)

My questions:​

  • Is it feasible to use these Python libraries within a .NET application using interop tools like pythonnet or IronPython?
  • Can this setup work well for production-level AI applications?
  • Are there any performance drawbacks, integration challenges, or better alternatives for this hybrid approach?
  • Would you recommend this model or suggest switching entirely to a Python or .NET stack depending on the use case?
I’d really appreciate any insights or real-world experiences from those who’ve tried combining Python and .NET in similar projects.
 
Back
Top Bottom