explaingit

pyeve/eve

6,738PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Eve is a Python framework that turns a config file and a MongoDB database into a fully working REST API in about three lines of code, with built-in pagination, filtering, authentication, and rate limiting.

Mindmap

mindmap
  root((eve))
    What it does
      Auto REST API
      Minimal config
      MongoDB backed
    Features
      Filtering sorting
      Pagination bulk insert
      Auth rate limiting
      File storage cache
    Tech Stack
      Python
      Flask
      MongoDB
    Use Cases
      Mobile backend
      Prototype API
      Data access layer
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a REST API for a mobile app backend by defining your data structure in a settings file and pointing Eve at MongoDB.

USE CASE 2

Add filtering, pagination, and rate limiting to a data API without writing any of that logic yourself.

USE CASE 3

Prototype a new product's API in minutes to validate the data model before building a full backend.

USE CASE 4

Connect a front-end to a MongoDB database through a live API endpoint without writing custom server code.

Tech stack

PythonFlaskMongoDBJSONXML

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a running MongoDB instance before the API server can start.

Use freely for personal or commercial projects, keep the copyright notice and license text when you redistribute it.

In plain English

Eve is a Python framework for building REST APIs, designed to require very little code to get a working API running. A REST API is a way for different applications to talk to each other over the web, typically used to read and write data. With Eve, you define your data structure in a configuration file and point it at a database, and the framework generates the full set of API endpoints automatically. The framework connects to MongoDB out of the box, and community extensions add support for SQL databases. It handles the full range of standard operations: reading, creating, updating, and deleting records. It also includes a long list of built-in features: pagination of large result sets, filtering and sorting, bulk inserts, data validation, authentication, rate limiting, file storage, caching, and cross-origin requests from web browsers. Eve is built on top of Flask, which is a widely used Python web framework. This means it inherits Flask's ecosystem and can be extended using Flask tools and patterns. Responses can be formatted as either JSON or XML. The minimal starting point is three elements: a running MongoDB instance, a settings file that describes your data, and a short Python script. The README shows the entire launch code as three lines. From that point, the API is live and accepts requests. Eve is open source under a BSD license and is a community-funded project. The author encourages businesses using it in commercial products to contribute financially to keep the project maintained.

Copy-paste prompts

Prompt 1
Show me a minimal Eve settings.py file for an API endpoint called 'tasks' that stores a title (string, required) and a done (boolean, default false), connected to a local MongoDB.
Prompt 2
My Eve API needs token authentication. Show me how to write a custom auth class that checks an incoming token against a list of valid tokens.
Prompt 3
I have an Eve REST API running on localhost:5000. Write a Python requests script that inserts a record, reads it back, and then deletes it.
Prompt 4
How do I add rate limiting to my Eve API so each client can only make 100 requests per hour, and what response does Eve return when the limit is hit?
Open on GitHub → Explain another repo

← pyeve on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.