Skip to main content

A simple and feature complete REST API framework designed for speed.

Project description

fasteve logo

PyPi Test coverage Lint image black

Fasteve is a rebuild of Eve using FastAPI as a base.

Fasteve is Simple

Create a file main.py with:

from fasteve import Fasteve, BaseSchema, Resource

class People(BaseSchema):
    name: str

people = Resource(schema=People)
resources = [people]

app = Fasteve(resources=resources)

Start a database (mongodb default):

$ docker run --rm -p 27017:27017 mongo

Run the server with:

$ uvicorn main:app --reload

The API is now live, ready to be consumed:

$ curl -i http://localhost:8000/people
HTTP/1.1 200
...
{
    "_data": [],
    "_meta": {"max_results": 25, "total": 0, "page": 1},
    "_links": {
        "self": {"href": "/people", "title": "people"},
        "parent": {"href": "/", "title": "home"},
    },
}

Features (TODO)

  • Emphasis on REST ✅
  • Full range of CRUD operations ✅
  • Customizable resource endpoints ✅
  • Sub Resources ✅
  • Customizable, multiple item endpoints
  • Filtering and Sorting
  • Pagination ✅
  • HATEOAS ✅
  • JSON and XML Rendering
  • Conditional Requests
  • Data Integrity and Concurrency Control
  • Bulk Inserts ✅
  • Data Validation ✅
  • Extensible Data Validation ✅
  • Unique Fields ✅
  • Resource-level Cache Control
  • API Versioning
  • Document Versioning
  • Authentication
  • CORS Cross-Origin Resource Sharing ✅
  • JSONP
  • Read-only by default ✅
  • Default Values ✅
  • Predefined Database Filters
  • Projections
  • Embedded Resource Serialization ✅
  • Event Hooks ✅
  • Rate Limiting
  • Custom ID Fields ✅
  • Alternative ID Fields ✅
  • File Storage
  • GeoJSON
  • Internal Resources
  • Enhanced Logging
  • Operations Log
  • Interactive API docs (provided by Swagger UI) ✅
  • Alternative API docs (provided by ReDoc) ✅
  • Repeated Background Tasks ✅
  • MongoDB Aggregation Framework
  • MongoDB Support ✅
  • SQL Support
  • Powered by FastAPI ✅

License

Fasteve is a open source project, distributed under the BSD license

Latest Changes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fasteve-0.1.2.tar.gz (20.5 kB view hashes)

Uploaded Source

Built Distribution

fasteve-0.1.2-py3-none-any.whl (27.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page