Ask Your Question
0

Call Sage functions from Node.js or other web app/service

asked 2012-02-04 04:01:25 +0100

MichelTem gravatar image

updated 2012-02-04 04:11:21 +0100

Hi, I have a Node.js app that needs to use a few of Sagemath's functions. I have no idea at all how I can call into Sage from a js backend, or even if it's possible to call it from an external process. Obviously being able to call Sage to plot a graph and receiving the result as a stream or saved to disk would be optimal. But so far, I would be happy if I could call factor() from a web page and display the results. Anyone has an idea how to accomplish this? I don't mind having a Python layer around Sage if thats what it takes, but any code snippets or pointers to existing libraries would be highly appreciated. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-02-04 09:24:25 +0100

Jason Grout gravatar image

The Sage Cell server acts as a web service to perform computations and return results, plots, etc. The iphone and android apps use it as a backend, for example.

We're working on good documentation for it. Here are some examples, though:

http://aleph.sagemath.org (see the bottom of the page for messages sent back and forth to the web service).

Code: https://github.com/sagemath/sagecell

Embedding documentation: https://github.com/sagemath/sagecell/... (see the bottom for a small example)

Another example: http://utmost.aimath.org/ (see bottom of page)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-02-04 04:01:25 +0100

Seen: 1,701 times

Last updated: Feb 04 '12