Metadata-Version: 2.1
Name: marshmallow-mongoengine-query-schema
Version: 1.2
Summary: Marshmallow schema for generating mongoengine filters in url query.
Home-page: https://github.com/VerdeQuar/marshmallow_mongoengine_query_schema
Author: Damian Komorowski
Author-email: verdequar@gmail.com
License: MIT
Download-URL: https://github.com/VerdeQuar/marshmallow_mongoengine_query_schema/archive/refs/tags/v1.2.tar.gz
Description: # Marshmallow Mongoengine Query Schema
        ## _Mongoengine filters in your API with no effort!_
        
        A marshmallow schema for use in url query which checks for possible mongoengine [query filters](https://docs.mongoengine.org/guide/querying.html) (as well as `only` and `order_by` args)
        and converts their types based on requirements for filters (eg. ints for number comparition operators)
        and fields themselves (eg. list inner type when using for example `list__0`)
        
        Supports all mongoengine filters except [geo queries](https://docs.mongoengine.org/guide/querying.html#geo-queries)
        
        > *Note: This has nothing to do with [marshmallow-mongoengine](https://pypi.org/project/marshmallow-mongoengine/), I just couldn't think of better name*
        
        ### Usage:
        ```py
        from marshmallow_mongoengine_query_schema import QuerySchema
        
        
        class SomeQuerySchema(QuerySchema):
            __query_fields__ = SomeSchema().declared_fields
            class Meta:  # optional settings
                query_enable_filters = False
                query_enable_only = True
                query_enable_order_by = False
                query_allowed_infixes = ['__']
        ```
        
        ### Usage in url:
        ```
        example.com/someendpoint?no_comments=5&name__startswith=b&list__size=2&list__0=somestring
        ```
        Every type is converted automatically but there's couple of things to point out:
        > When list type is needed, comma delimited list is used in url: `?list=a,b,c,d`
        
        > `match` operator and `__raw__` are expecting a dictionary(json): `?__raw__={"name": "hello"}`
        
        ### Installation
        Very complicated black magic stuff:
        ```sh
        pip3 install marshmallow_mongoengine_query_schema
        ```
        
        ### License
        
        MIT
        
Keywords: mongoengine,marshmallow,schema
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
