Metadata-Version: 2.4
Name: Drowsy
Version: 1.0.0
Summary: GraphQL type features in a REST API
Author-email: Nick Repole <n.repole@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/repole/drowsy
Project-URL: Bug Reports, https://github.com/repole/drowsy/issues
Project-URL: Source, https://github.com/repole/drowsy
Project-URL: Documentation, https://drowsy.readthedocs.io/
Project-URL: Changelog, https://github.com/repole/drowsy/blob/master/CHANGELOG.rst
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: mqlalchemy>=1.0
Requires-Dist: marshmallow>=4.0
Requires-Dist: marshmallow-sqlalchemy>=1.4
Requires-Dist: inflection
Provides-Extra: test
Requires-Dist: coverage[toml]; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: psycopg2; extra == "test"
Requires-Dist: pyodbc; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=8.1; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=3.0; extra == "docs"
Requires-Dist: flask>=3.1; extra == "docs"
Requires-Dist: werkzeug>=3.1; extra == "docs"
Requires-Dist: swagger-ui-py>=25.7; extra == "docs"
Requires-Dist: apispec>=6.8; extra == "docs"
Provides-Extra: dev
Requires-Dist: drowsy[docs,test]; extra == "dev"

.. title:: Drowsy
  
.. image:: https://raw.githubusercontent.com/repole/drowsy/refs/heads/master/docs/_static/drowsy-logo.png
   :width: 50 %
   :align: center
   :alt: 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

.. |Build Status| image:: https://github.com/repole/drowsy/actions/workflows/ci-cd.yml/badge.svg
   :target: https://github.com/repole/drowsy/actions/workflows/ci-cd.yml
.. |Coverage Status| image:: https://coveralls.io/repos/repole/drowsy/badge.svg?branch=master
   :target: https://coveralls.io/r/repole/drowsy?branch=master
.. |Docs| image:: https://readthedocs.org/projects/drowsy/badge/?version=latest
   :target: http://drowsy.readthedocs.org/en/latest/
.. _MQLAlchemy: http://mqlalchemy.readthedocs.org/
.. _SQLAlchemy: https://www.sqlalchemy.org/
.. _Marshmallow: https://marshmallow.readthedocs.io/
.. _Docs: https://readthedocs.org/projects/drowsy/badge/?version=latest
