The Sage Cell Server provides a Sage computation web service. The documentation gives instructions for setting up your own server, or you can use the flagship server at aleph.sagemath.org.
You can easily embed Sage into any webpage. Here is a short example:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Sage Cell Server</title>
<script src="http://aleph.sagemath.org/static/jquery.min.js"></script>
<script src="http://aleph.sagemath.org/embedded_sagecell.js"></script>
<script>
$(function () {
sagecell.makeSagecell({inputLocation: '#mycell',
template: sagecell.templates.minimal,
evalButtonText: 'Activate'});
sagecell.makeSagecell({inputLocation: '#mycell2',
evalButtonText: 'Evaluate'});
});
</script>
</head>
<body>
<h1>Embedded Sage Cells</h1>
<h2>Factorial</h2>
Click the "Activate" button below to calculate factorials.
<div id="mycell"><script type="text/x-sage">
@interact
def _(a=(1, 10)):
print factorial(a)
</script>
</div>
<h2>Your own computation</h2>
Type your own Sage computation below and click “Evaluate”.
<div id="mycell2"><script type="text/x-sage">plot(sin(x), (x, 0, 2*pi))</script></div>
</body>
</html>
The Sage Cell Server is based upon work supported by the National Science Foundation (DUE-1022574). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.