{"id":21840264,"url":"https://github.com/zapier/jsonmask","last_synced_at":"2025-04-14T10:51:25.013Z","repository":{"id":41435421,"uuid":"146029474","full_name":"zapier/jsonmask","owner":"zapier","description":"Implements Google Partial Response dictionary pruning in Python","archived":false,"fork":false,"pushed_at":"2022-08-20T10:06:39.000Z","size":88,"stargazers_count":14,"open_issues_count":4,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-12T03:38:37.337Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zapier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-24T19:00:08.000Z","updated_at":"2024-01-18T04:44:20.000Z","dependencies_parsed_at":"2022-08-27T04:22:22.752Z","dependency_job_id":null,"html_url":"https://github.com/zapier/jsonmask","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapier%2Fjsonmask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapier%2Fjsonmask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapier%2Fjsonmask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapier%2Fjsonmask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zapier","download_url":"https://codeload.github.com/zapier/jsonmask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868843,"owners_count":21174754,"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-11-27T21:25:27.198Z","updated_at":"2025-04-14T10:51:24.982Z","avatar_url":"https://github.com/zapier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://img.shields.io/travis/zapier/jsonmask/master.svg)](https://travis-ci.org/zapier/jsonmask) [![Coverage Status](https://img.shields.io/coveralls/zapier/jsonmask/master.svg)](https://coveralls.io/r/zapier/jsonmask) [![PyPI Version](https://img.shields.io/pypi/v/jsonmask.svg)](https://pypi.org/project/jsonmask)\n\n# Overview\n\nImplements [Google Partial Response](https://developers.google.com/discovery/v1/performance#partial-response) / [`json-mask`](https://github.com/nemtsov/json-mask) in Python.\n\n## Requirements\n\n* Python 2.7\n* Python 3.6+\n\n## Installation\n\nInstall jsonmask with pip:\n\n```sh\n$ pip install jsonmask\n```\n\nor directly from the source code:\n\n```sh\n$ git clone https://github.com/zapier/jsonmask.git\n$ cd jsonmask\n$ python setup.py install\n```\n\n# Usage\n\nAfter installation, the package can imported:\n\n```sh\n$ python\n\u003e\u003e\u003e import jsonmask\n\u003e\u003e\u003e jsonmask.__version__\n```\n\nTo prune dictionaries:\n\n```py\n\u003e\u003e\u003e import jsonmask\n\u003e\u003e\u003e mask = jsonmask.parse_fields('a,b(c,d)')\n\u003e\u003e\u003e jsonmask.apply_json_mask(\n    {\n        'a': {\n            'nested_within_a': True,\n        },\n        'b' {\n            'c': True,\n            'd': {'Will get included?': 'Yes'},\n            'e': 'Tough luck here',\n        },\n        'c': 'Definitely hopeless',\n    },\n    mask,\n)\n\n{\n    'a': {\n        'nested_within_a': True,\n    },\n    'b' {\n        'c': True,\n        'd': {'Will get included?': 'Yes'},\n    },\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzapier%2Fjsonmask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzapier%2Fjsonmask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzapier%2Fjsonmask/lists"}