Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8375869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:17:14+00:00 2026-06-09T15:17:14+00:00

I have a custom business logic written in python – there are various reasons

  • 0

I have a custom business logic written in python – there are various reasons I can’t write it directly in C#/.Net (time constraints etc.).

I tried integrating the python program into .Net using IronPython but cannot (lxml being one of the reasons).

I’m turning to the simpler solution of exposing this python logic as a
web service which .Net can call.

–

First I thought I’d have to host my python code on a separate domain..
But I realized, I can install python on the same server & run this python service !!

The functionality is simple –
.Net passes a URL & the python program returns data as a long string.

1.) What would be the simplest way to do this ?
2.) Do I need to use a framework like web2py/werkzeug or is there something built in I can use ?!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:17:16+00:00Added an answer on June 9, 2026 at 3:17 pm

    I think I would give Tornado a try. I have been using it in the past, and it was extremely easy to learn.

    Anyway, I think I would suggest you to prepare a small webservice running locally (using Tornado). This webservice could be then easily accessed by any code running on the same machine, and if there is a need – from another machine as well.

    Oh, and Tornado is much lighter than Django…

    (The sample code below is a Hello-World sample from Tornado website – I’ve just copied it here to show how easy it is to use Tornado):

    import tornado.ioloop
    import tornado.web
    
    class MainHandler(tornado.web.RequestHandler):
        def get(self):
            # put your calculation logic in here (instead of "Hello World"
            self.write("Hello, world")
    
    application = tornado.web.Application([
        (r"/", MainHandler),
    ])
    
    if __name__ == "__main__":
        application.listen(8888)
        tornado.ioloop.IOLoop.instance().start()
    

    One of the great advantages of Tornado is that it is simple to do simple task but just in case you need something more sophisticated – it is easy to use them.

    Oh, and another thing to bear in mind – I don’t know what your code is actually doing but I think it could be a good idea to consider designing your webservice’ API with REST in mind.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a custom request handler in solr to meet my business requirements.
I have a custom collection (a thread-safe ObservableQueue). I implemented the business logic inside
I have custom gallery. Gallery represents items that are frame layout. There are one
I have custom component that I can place in my layout file (XML) for
I have two web applications in ASP.NET which are quite the same (same business
I'm building a custom Sharepoint 2010 activity which does some business logic, and at
I have some functions that work on strings for some business logic. Should I
I am looking for tools to aid in the visualization of custom business logic
I have an asp.net webforms project. What is the standard way of adding business
I have an existing ASP.NET website with some custom routing, within a Solution that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.