{"id":15893469,"url":"https://github.com/multimeric/marshmallow-jsonapi-webargs","last_synced_at":"2025-04-02T17:43:02.343Z","repository":{"id":85377253,"uuid":"213288522","full_name":"multimeric/marshmallow-jsonapi-webargs","owner":"multimeric","description":"Schemas for JSON API request parameters. Works along with marshmallow-jsonapi, which parses JSON request bodies","archived":false,"fork":false,"pushed_at":"2019-10-10T06:14:12.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T05:23:34.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multimeric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-07T03:38:07.000Z","updated_at":"2019-10-10T06:14:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"740f0af3-4f87-475b-9e84-aa3c50b216ad","html_url":"https://github.com/multimeric/marshmallow-jsonapi-webargs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2Fmarshmallow-jsonapi-webargs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2Fmarshmallow-jsonapi-webargs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2Fmarshmallow-jsonapi-webargs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2Fmarshmallow-jsonapi-webargs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multimeric","download_url":"https://codeload.github.com/multimeric/marshmallow-jsonapi-webargs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246863842,"owners_count":20846322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T08:10:56.830Z","updated_at":"2025-04-02T17:43:02.318Z","avatar_url":"https://github.com/multimeric.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Marshmallow JSON API Webargs\n\n## Installation\n```bash\npip install marshmallow-jsonapi-webargs\n```\n\n## Usage\nCreate a parser that adds in an improved query string logic:\n```python\nimport marshmallow_jsonapi_webargs as jaw\nfrom webargs.flaskparser import FlaskParser\n\nclass FlaskJsonApiParser(jaw.NestedQueryParserMixin, FlaskParser):\n    pass\nparser = FlaskJsonApiParser()\n```\n\nCreate the schema using some combination of the provided fields, according to which fields your API supports:\n```python\nfrom marshmallow import Schema\nimport marshmallow_jsonapi_webargs as jaw\n\nclass JsonApiRequestSchema(Schema):\n    sort = jaw.Sort()\n    include = jaw.Include()\n    fields = jaw.Fields()\n    page = jaw.PagePagination()\n    filter = jaw.Filter()\n```\n\nUse the schema to define your request format\n```python\n@parser.use_args(JsonApiRequestSchema())\ndef greet(args):\n    return 'You requested to include these relationships: ' + ', '.join(args['include'])\n```\n\n## Tests\nTo run the tests:\n\n* Clone the repo: \n    ```\n    git clone git@github.com:TMiguelT/marshmallow-jsonapi-webargs.git\n    cd marshmallow-jsonapi-webargs\n    ```\n* Install the test dependencies:\n    ```bash\n    pip install '.[dev]'\n    ```\n* Run the tests:\n    ```bash\n    pytest test.py\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Fmarshmallow-jsonapi-webargs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultimeric%2Fmarshmallow-jsonapi-webargs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Fmarshmallow-jsonapi-webargs/lists"}