Show HN: Publish API endpoints in seconds (PoC)

2 points by eneuman ↗ HN
Hi HN! I'm Elias, here to present Camarere (PROOF OF CONCEPT):

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!

2 comments

[ 3.1 ms ] story [ 16.5 ms ] thread
Interesting idea! Even though I became pretty fast with spitting out Flask APIs it remains cumbersome.

You say my "computer serves as the server", would I be able to scale beyond that as well?

Yes! The idea is any computer under your control can act as a server, and you can have multiple workers pointing to the same endpoint.