A proxy server + python package combo to publish API endpoints in very few lines of code:
(CLI) $ pip install camarere
(python)
# Import the camarere client
from camarere import Cmrr
# Instantiate the client to authenticate
cmrr = Cmrr('https://cmrr.es')
#> Using temporary user_id="pPh4nVeAu", token="zs5j9rKJR6bLT4bD6PU"
#> Head over to https://cmrr.es to create a permanent user.
# Create a new endpoint (your computer acts as the server)
cmrr.serve(lambda name='World': 'Hello ' + name, 'hello')
#>serving <lambda> at https://cmrr.es/call/pPh4nVeAu/hello?name=World
print('\nCall this from another notebook (anywhere in the world):\n', "cmrr.call('hello', kwargs={'name': 'stranger'}, user_id='"+cmrr.user_id+"')")
----
I'm building this to scratch my own itch in two areas:
- Prototype web app backends faster
- Quickly distribute compute in cases with complicated dependencies
If this interests you, please visit https://github.com/e-neuman/camarere or register your email at https://cmrr.es and I’ll select the first group for a closed beta.
As always, all feedback is welcome!