TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Sondra – A Different ORM and REST Framework for Flask and RethinkDB

21 pointsby jeffheardover 9 years ago

1 comment

jeffheardover 9 years ago
Author here.<p>Not all RESTful APIs will fit into a framework like this, and the choice of RethinkDB limits its applicability to a narrower community, but I intend on supporting other document-based DBs in the future. I really like RethinkDB&#x27;s API and ReQL in particular, and it seems like a solid foundation to build something a little out of the ordinary on.<p>What makes it different from other ORMs? It&#x27;s a rethinking of ORM mechanics for a &quot;document-based&quot; backend system.<p>* JSON documents are validated using JSON-Schema (<a href="http:&#x2F;&#x2F;json-schema.org" rel="nofollow">http:&#x2F;&#x2F;json-schema.org</a>).<p>* It tries to make the exposure of non-CRUD operations relate as a method to a logical server-side object and have a consistent endpoint syntax. It also uses Python function annotations to generate request and response schemas for methods.<p>All API endpoints exist within a four-tiered path hierarchy of<p>* Suite - base level, serves as a collection of applications and repo for basic shared schemas<p>* Application - a bundle of collections representing a logical set of functionality, methods that bind at this level act like &quot;library functions&quot;<p>* Collection - a collection of documents sharing a common schema. Methods that bind at this level act like &quot;class methods&quot;<p>* Document - a single instance of a document schema, representing concrete data. Methods that bind at this level act like &quot;instance methods&quot; in traditional OO programming.<p>What helper features does it have?<p>* Reusable apps &#x2F; collections.<p>* JWT based sample authentication app, auth.<p>* Automatically generated help from schema descriptions and python docstrings<p>* Self-describing schema endpoints for suites, applications, collections, documents, and their methods.<p>This is pre-release stuff, to be sure. I&#x27;m using it on personal projects, but it needs:<p>* More tests<p>* More docs for the Python side of things (I&#x27;m working on this first)<p>* A solid example application<p>* Automatic generation of JS API connectors