Questions tagged [eve]

Eve is a Python REST API framework powered by Flask and MongoDB.

Eve is a Python REST API framework powered by Flask and MomngoDB. Allows to effortlessly build and deploy highly customizable, fully featured RESTful Web Services.

Eve is Simple

from eve import Eve

app = Eve()
app.run()

The API is now live, ready to be consumed:

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

All you need to bring your API online is a database, a configuration file (defaults to settings.py) and a launch script. Overall, you will find that configuring and fine-tuning your API is a very simple process.

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

Philosophy

You have data stored somewhere and you want to expose it to your users through a RESTful Web API. Eve is the tool that allows you to do so.

Eve provides a robust, feature rich, REST-centered API implementation, and you just need to configure your API settings and behavior, plug in your datasource, and you’re good to go. See Features for a list of features available to Eve-powered APIs.

API settings are stored in a standard Python module (defaults to settings.py), which makes customization quite a trivial task. It is also possible to extend some key features, namely Authentication and Authorization, Data Validation and Data Access, by providing the Eve engine with custom objects.

Documentation

See the Eve Website.

483 questions
17
votes
3 answers

good use case of HATEOAS

may I have some example/typical use case of HATEOAS? I agree it can be a very powerful concept provide great flexibility but I am not sure how to properly get benefit from HATEOAS. would be great if you can share your experience/use case.
John
  • 2,107
  • 3
  • 22
  • 39
10
votes
1 answer

EVE - define custom flask controllers

I'm using EVE for couple of days to create my own REST API but I want to have custom Flask Controller integrated with EVE is there any possibility to do this? Thanks.
slaveq
  • 393
  • 2
  • 10
9
votes
2 answers

Python Eve - Query Embedded Data Relation

I have the following resource defined: item = { 'wrapper': { 'type': 'dict', 'schema': { 'element': { 'type': 'objectid', 'data_relation': { 'resource': 'code', …
fullerja
  • 143
  • 1
  • 11
9
votes
3 answers

How to add to a list type in Python Eve without replacing old values

I have a very similar setup to the person in this question: How do I update a list data_relation in Python Eve with a users resource and a friends sub-resource of list type. users = { … ‘friends’: { 'type': 'list’, 'schema': { …
Amy Eubanks
  • 138
  • 7
8
votes
2 answers

is it good to make Data Access Layer a separate layer from service layer

I am having a question about the architecture I am working with. we have a backend restful service, a data layer(which is implemented by python eve and also a restful service), and the database. The data (access) layer itself is a independent…
Acton
  • 255
  • 4
  • 13
7
votes
1 answer

Can't reach Eve REST API

I'm using Eve to create a REST API for MongoDB. It's all working fine, except for the fact that I can't reach the API from any other computer (in the same network), or even a different URL (e.g.: if I set SERVER_NAME = 'localhost:29000', I will not…
Timon
  • 362
  • 4
  • 10
6
votes
1 answer

How to model schema for list of embedded dictionaires in python eve

I have a Document where a user has 2 addresses such as below. How would I create a schema for this in python-eve? Also, How would I create an API request to allow a user to update only the zipcode. Do they have to repost the entire document? { …
CraigH
  • 2,041
  • 3
  • 30
  • 48
6
votes
2 answers

Adding mongoDB document-array-element using Python Eve

Background: (using Eve and Mongo) I'm working in Python using the Eve REST provider library connecting and to a mongoDB to expose a number of REST endpoints from the database. I've had good luck using Eve so far, but I've run into a problem that…
Mike Lutz
  • 1,812
  • 1
  • 10
  • 17
6
votes
3 answers

Using Eve's DB layer without HTTP

In my application, the MongoDB collections need to be updated by a server-side script job (IE: a cron job that scrapes/pulls from other APIs every 30minutes). What I really want to do is make updates to the MongoDB collections, but have the data be…
KFunk
  • 2,956
  • 22
  • 33
6
votes
3 answers

Python Sql Alchemy - How to jsonify a class object result from a database query

Basically, I just want to json encode the results of my sql query. x = db.session.query(User).filter_by(username = request.form['username'], password = request.form['password']).first() print vars(x) return jsonify(x) raise TypeError(repr(o) + "…
olleh
  • 1,248
  • 5
  • 16
  • 43
6
votes
1 answer

how to upload image through python-eve to some external storage server e.g. S3?

I know we now can upload/post a media type field to the python-eve REST-API framework and it will be stored in mongodb. Is there a way we can change the storage of those media? E.g. a remote storage server e.g. amazon S3? So that we only store the…
John
  • 2,107
  • 3
  • 22
  • 39
5
votes
3 answers

Flask-sentinel /oauth/token endpoint CORS issue

I'm having issues trying to get a token from my flask-sentinel app with my front-end. To make the AJAX requests from my front-end to my Python Eve API server I use the superagent module. While using a Basic Authentication I don't have any issue…
Andrea Silvestri
  • 1,082
  • 4
  • 14
  • 41
5
votes
0 answers

Python-eve: Combine role based and user-restricted access?

I have a fairly simple use case but can't figure out how to stitch it together. Basically I want to use user-restricted access for regular users, i.e. they can upload files via an API and other users cannot touch those files via the API. At the same…
5
votes
1 answer

Adding not validated dictionary with python eve along with an image

I want to import images in mongoDB along with any dictionary. The dictionary should provide image tags, of which types, numbers and names I can't know at the moment I define the schema. I'm trying to add a dictionary in eve without success: curl…
Valentin H
  • 7,240
  • 12
  • 61
  • 111
5
votes
1 answer

How to process data before storing to database in python eve

I'm currently learning python eve framework and mongoDB database for restful API development. In eve, basic CRUD operations are done only by defining the schema in settings.py file. Client can send GET/POST methods and data is automatically stored…
Min Htet Oo
  • 188
  • 4
  • 16
1
2 3
32 33