Does MongoDB have a native REST interface?

后端 未结 7 1241
你的背包
你的背包 2020-12-03 01:13

I am currently evaluating Mongo and CouchDB for storing data points (analytics).

During my earlier interaction with CouchDB, I loved its JSONP based interface. I cou

7条回答
  •  [愿得一人]
    2020-12-03 01:27

    Edit

    Python Eve is a fantastic solution for this. I have found it very easy to use and highly configurable.

    Eve is an open source Python REST API framework designed for human beings. It allows to effortlessly build and deploy highly customizable, fully featured RESTful Web Services.

    Eve is powered by Flask, Redis, Cerberus, Events and offers support for both MongoDB and SQL backends [*].

    The codebase is thoroughly tested under Python 2.6, 2.7, 3.3, 3.4 and PyPy.

    It is as simple to get started as:

    from eve import Eve
    
    app = Eve()
    app.run()
    

    and to use as

    $ curl -i http://example.com/people
      HTTP/1.1 200 OK
    

    REST endpoint schemas are easily defined in a settings file.

    Original

    I haven't used it yet, but RESTHeart looks like an answer to this.

    From the documentation it looks easy to set up and use.

提交回复
热议问题