Skip to main content
Drowsy

Build Status Coverage Status Docs

GraphQL type features in a REST API using SQLAlchemy and Marshmallow.

Drowsy aims to provide a similar feature set to GraphQL, and shares some similarities with projects like Django-Tastypie and Flask-RESTful while also being web framework agnostic.

Get started by visiting our Docs and checking out the Quickstart section.

Key Features

Given a series of SQLAlchemy models, corresponding Marshmallow schemas and Drowsy resources based off those models can be easily defined (or dynamically generated). By using those resources, the following features are made available:

  • Filter any resource collection by any field or nested resource field. Filters are not limited to an equality check, but can also handle >, >=, <=, and <, along with simple like text searches.

  • Optionally embed nested resources within a result, enabling getting all child resources along with the parent resource in a single database query.

  • Filter any embedded nested resource to get back only the child objects you want.

  • Complex conditional filters may be applied to resources or nested resources as well using MQLAlchemy style syntax.

  • Easily override fields to prevent them from being queried, or define specific query whitelist rules and permissions.

  • Sort and paginate resource collections.

  • Create or update resources, including their own nested resources, all in one API call and database transaction.

  • Parse filters, sorts, and pagination info from query params.

  • Dynamically route all API requests to the appropriate resource.

Requirements

The project is largely built around Marshmallow and SQLAlchemy. There has been an explicit attempt to keep things modular and extensible, but if you want to use a different ORM or different schema toolkit it’ll take a good bit of manual effort.

Drowsy is however web framework agnostic, and is capable of working with Flask, CherryPy, Bottle.py, Falcon, or any other Python web framework.

Contributing

Submit a pull request to the dev branch and make sure to include an updated AUTHORS with your name along with an updated CHANGES.rst.

License

MIT

Release files for Drowsy 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Drowsy 1.0.0
File Size Uploaded
drowsy-1.0.0.tar.gz 88.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Drowsy 1.0.0
File Interpreter ABI Platform
drowsy-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 159.8 kB

Release files / drowsy-1.0.0.tar.gz

Download URL drowsy-1.0.0.tar.gz
Size 88.6 kB
Tags Source
SHA-256 checksum
How to use checksums
77a17d7013d3f64735e29abcc7832e21de6eeaad588c42b58aacff1bbba6b110
BLAKE2b-256 checksum
How to use checksums
332fbde27f5c420d00dbe7c714ab5b63c97122029f4b100fb6540d51a90fcc66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / drowsy-1.0.0-py3-none-any.whl

Download URL drowsy-1.0.0-py3-none-any.whl
Size 71.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b5fbfac3d071b69cae195ffc08ab2e7c11b13771bf9a032af4975208f75092b
BLAKE2b-256 checksum
How to use checksums
b9403219ae0902a63120f222b0136e0487e297cddc54d6b4e54f6b75a5ed0106
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page