Python Based API

D

Dean.Brotzel

Hi,

I work on a project that is built entirely using python and Tkinter.
We are at the point where we would like to give access to our
functionality to others via some sort of API. People who would use
our API develop in all kinds of languages from C/C++ to Pascal.

Ideas that come to mind that allow us to build such an API are:

1) Require others to imbed the python interpreter via the c API to be
able to utilize our functionality.
2) Build an XML RPC interface around our code.
3) Rewrite our code base in C/C++, which should make it accessible to
all modern languages.

I'm looking for more and potentially better ideas that will allow us
to offer an API to our customers without having to throw away or redo
a lot of the python code that we have already written.

Thanks in advance,
Dean
 
L

Laurent Pointal

Hi,

I work on a project that is built entirely using python and Tkinter.
We are at the point where we would like to give access to our
functionality to others via some sort of API. People who would use
our API develop in all kinds of languages from C/C++ to Pascal.

Ideas that come to mind that allow us to build such an API are:

1) Require others to imbed the python interpreter via the c API to be
able to utilize our functionality.
2) Build an XML RPC interface around our code.
3) Rewrite our code base in C/C++, which should make it accessible to
all modern languages.

I'm looking for more and potentially better ideas that will allow us
to offer an API to our customers without having to throw away or redo
a lot of the python code that we have already written.

Thanks in advance,
Dean

IMHO the simplest solution is XML RPC, and unless you have huge data to
transmit or time constraint, it may be enough.
 
L

Larry Bates

Hi,

I work on a project that is built entirely using python and Tkinter.
We are at the point where we would like to give access to our
functionality to others via some sort of API. People who would use
our API develop in all kinds of languages from C/C++ to Pascal.

Ideas that come to mind that allow us to build such an API are:

1) Require others to imbed the python interpreter via the c API to be
able to utilize our functionality.
2) Build an XML RPC interface around our code.
3) Rewrite our code base in C/C++, which should make it accessible to
all modern languages.

I'm looking for more and potentially better ideas that will allow us
to offer an API to our customers without having to throw away or redo
a lot of the python code that we have already written.

Thanks in advance,
Dean

You don't say what your operating system is, so I'll give an answer in
case it is Windows:

I went through something similar recently and decided that writing a COM
wrapper around my Python API was the best answer (and it turned out to
be pretty easy). I was easily able to call from VB, Delphi and Python
COM. I haven't tried C/C++ yet, but expect no problems. I think COM is
now the way to go (unless you do .NET).

-Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top