jqpy


Namejqpy JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryJQpy is Python binding for JQ (JSON processing language) that simply works on any platform (even Windows) and does not require compilation.
upload_time2023-12-07 16:47:05
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords jq json query binding processor
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **[JQpy](https://pypi.org/project/jqpy/)** is Python binding for [JQ](https://jqlang.github.io/jq/) (JSON processing language) that simply works on any platform (even Windows) and does not require compilation.

[Read the documentation](https://baterflyrity.github.io/jqpy/)

----

<!-- TOC -->
* [Tutorial](#tutorial)
* [Installation](#installation)
<!-- TOC -->

# Tutorial

GitHub has a JSON API, so let's play with that. This URL gets us the last 5 commits from the jq repo.

```ipython
>>> import requests
>>> data = requests.get('https://api.github.com/repos/jqlang/jq/commits',{'per_page':5}).json()
>>> data
```

<details>
  	<summary>Show result</summary>

	[
		{
			'sha': 'bfb7fd570f521ef832fe1c3bca0e05abd398284c',
			'node_id': 
	'C_kwDOAE3WVdoAKGJmYjdmZDU3MGY1MjFlZjgzMmZlMWMzYmNhMGUwNWFiZDM5ODI4NGM',
			'commit': {
				'author': {
					'name': 'David Korczynski',
					'email': 'david@adalogics.com',
					'date': '2023-11-30T13:33:01Z'
				},
				'committer': {
					'name': 'Emanuele Torre',
					'email': 'torreemanuele6@gmail.com',
					'date': '2023-11-30T13:40:36Z'
				},
				'message': 'jq_fuzz_execute: cleanup un-needed 
	extern\n\nSigned-off-by: David Korczynski <david@adalogics.com>',
				'tree': {
					'sha': '47b08e6bc3e47c9ab13092d613bda7e4cf35bba0',
					'url': 
	'https://api.github.com/repos/jqlang/jq/git/trees/47b08e6bc3e47c9ab13092d613bda
	7e4cf35bba0'
				},
				'url': 
	'https://api.github.com/repos/jqlang/jq/git/commits/bfb7fd570f521ef832fe1c3bca0
	e05abd398284c',
				'comment_count': 0,
				'verification': {
					'verified': False,
					'reason': 'unsigned',
					'signature': None,
					'payload': None
				}
			},
			'url': 
	'https://api.github.com/repos/jqlang/jq/commits/bfb7fd570f521ef832fe1c3bca0e05a
	bd398284c',
			'html_url': 
	'https://github.com/jqlang/jq/commit/bfb7fd570f521ef832fe1c3bca0e05abd398284c',
			'comments_url': 
	'https://api.github.com/repos/jqlang/jq/commits/bfb7fd570f521ef832fe1c3bca0e05a
	bd398284c/comments',
			'author': {
				'login': 'DavidKorczynski',
				'id': 657617,
				'node_id': 'MDQ6VXNlcjY1NzYxNw==',
				'avatar_url': 'https://avatars.githubusercontent.com/u/657617?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/DavidKorczynski',
				'html_url': 'https://github.com/DavidKorczynski',
				'followers_url': 
	'https://api.github.com/users/DavidKorczynski/followers',
				'following_url': 
	'https://api.github.com/users/DavidKorczynski/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/DavidKorczynski/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/DavidKorczynski/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/DavidKorczynski/subscriptions',
				'organizations_url': 
	'https://api.github.com/users/DavidKorczynski/orgs',
				'repos_url': 'https://api.github.com/users/DavidKorczynski/repos',
				'events_url': 
	'https://api.github.com/users/DavidKorczynski/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/DavidKorczynski/received_events',
				'type': 'User',
				'site_admin': False
			},
			'committer': {
				'login': 'emanuele6',
				'id': 20175435,
				'node_id': 'MDQ6VXNlcjIwMTc1NDM1',
				'avatar_url': 
	'https://avatars.githubusercontent.com/u/20175435?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/emanuele6',
				'html_url': 'https://github.com/emanuele6',
				'followers_url': 
	'https://api.github.com/users/emanuele6/followers',
				'following_url': 
	'https://api.github.com/users/emanuele6/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/emanuele6/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/emanuele6/subscriptions',
				'organizations_url': 'https://api.github.com/users/emanuele6/orgs',
				'repos_url': 'https://api.github.com/users/emanuele6/repos',
				'events_url': 
	'https://api.github.com/users/emanuele6/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/emanuele6/received_events',
				'type': 'User',
				'site_admin': False
			},
			'parents': [
				{
					'sha': '252ab244cead3670a11d06bc3110f3a4577a2341',
					'url': 
	'https://api.github.com/repos/jqlang/jq/commits/252ab244cead3670a11d06bc3110f3a
	4577a2341',
					'html_url': 
	'https://github.com/jqlang/jq/commit/252ab244cead3670a11d06bc3110f3a4577a2341'
				}
			]
		},
		{
			'sha': '252ab244cead3670a11d06bc3110f3a4577a2341',
			'node_id': 
	'C_kwDOAE3WVdoAKDI1MmFiMjQ0Y2VhZDM2NzBhMTFkMDZiYzMxMTBmM2E0NTc3YTIzNDE',
			'commit': {
				'author': {
					'name': 'David Korczynski',
					'email': 'david@adalogics.com',
					'date': '2023-11-30T13:22:27Z'
				},
				'committer': {
					'name': 'Emanuele Torre',
					'email': 'torreemanuele6@gmail.com',
					'date': '2023-11-30T13:40:36Z'
				},
				'message': 'Add fuzzer targeting jq_next\n\nSigned-off-by: David 
	Korczynski <david@adalogics.com>',
				'tree': {
					'sha': '7c6832a4b7376e7793d1239bd0abe0d580c69ee3',
					'url': 
	'https://api.github.com/repos/jqlang/jq/git/trees/7c6832a4b7376e7793d1239bd0abe
	0d580c69ee3'
				},
				'url': 
	'https://api.github.com/repos/jqlang/jq/git/commits/252ab244cead3670a11d06bc311
	0f3a4577a2341',
				'comment_count': 0,
				'verification': {
					'verified': False,
					'reason': 'unsigned',
					'signature': None,
					'payload': None
				}
			},
			'url': 
	'https://api.github.com/repos/jqlang/jq/commits/252ab244cead3670a11d06bc3110f3a
	4577a2341',
			'html_url': 
	'https://github.com/jqlang/jq/commit/252ab244cead3670a11d06bc3110f3a4577a2341',
			'comments_url': 
	'https://api.github.com/repos/jqlang/jq/commits/252ab244cead3670a11d06bc3110f3a
	4577a2341/comments',
			'author': {
				'login': 'DavidKorczynski',
				'id': 657617,
				'node_id': 'MDQ6VXNlcjY1NzYxNw==',
				'avatar_url': 'https://avatars.githubusercontent.com/u/657617?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/DavidKorczynski',
				'html_url': 'https://github.com/DavidKorczynski',
				'followers_url': 
	'https://api.github.com/users/DavidKorczynski/followers',
				'following_url': 
	'https://api.github.com/users/DavidKorczynski/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/DavidKorczynski/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/DavidKorczynski/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/DavidKorczynski/subscriptions',
				'organizations_url': 
	'https://api.github.com/users/DavidKorczynski/orgs',
				'repos_url': 'https://api.github.com/users/DavidKorczynski/repos',
				'events_url': 
	'https://api.github.com/users/DavidKorczynski/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/DavidKorczynski/received_events',
				'type': 'User',
				'site_admin': False
			},
			'committer': {
				'login': 'emanuele6',
				'id': 20175435,
				'node_id': 'MDQ6VXNlcjIwMTc1NDM1',
				'avatar_url': 
	'https://avatars.githubusercontent.com/u/20175435?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/emanuele6',
				'html_url': 'https://github.com/emanuele6',
				'followers_url': 
	'https://api.github.com/users/emanuele6/followers',
				'following_url': 
	'https://api.github.com/users/emanuele6/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/emanuele6/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/emanuele6/subscriptions',
				'organizations_url': 'https://api.github.com/users/emanuele6/orgs',
				'repos_url': 'https://api.github.com/users/emanuele6/repos',
				'events_url': 
	'https://api.github.com/users/emanuele6/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/emanuele6/received_events',
				'type': 'User',
				'site_admin': False
			},
			'parents': [
				{
					'sha': '13353515bd3aedf84c6e6ebfb726563ae84db778',
					'url': 
	'https://api.github.com/repos/jqlang/jq/commits/13353515bd3aedf84c6e6ebfb726563
	ae84db778',
					'html_url': 
	'https://github.com/jqlang/jq/commit/13353515bd3aedf84c6e6ebfb726563ae84db778'
				}
			]
		},
		{
			'sha': '13353515bd3aedf84c6e6ebfb726563ae84db778',
			'node_id': 
	'C_kwDOAE3WVdoAKDEzMzUzNTE1YmQzYWVkZjg0YzZlNmViZmI3MjY1NjNhZTg0ZGI3Nzg',
			'commit': {
				'author': {
					'name': 'David Korczynski',
					'email': 'david@adalogics.com',
					'date': '2023-11-30T13:22:07Z'
				},
				'committer': {
					'name': 'Emanuele Torre',
					'email': 'torreemanuele6@gmail.com',
					'date': '2023-11-30T13:40:36Z'
				},
				'message': 'jq_fuzz_compile: dump disassembly\n\nSigned-off-by: 
	David Korczynski <david@adalogics.com>',
				'tree': {
					'sha': 'a4fe1a9f424352a5f989b629ba666ccacd3ebd61',
					'url': 
	'https://api.github.com/repos/jqlang/jq/git/trees/a4fe1a9f424352a5f989b629ba666
	ccacd3ebd61'
				},
				'url': 
	'https://api.github.com/repos/jqlang/jq/git/commits/13353515bd3aedf84c6e6ebfb72
	6563ae84db778',
				'comment_count': 0,
				'verification': {
					'verified': False,
					'reason': 'unsigned',
					'signature': None,
					'payload': None
				}
			},
			'url': 
	'https://api.github.com/repos/jqlang/jq/commits/13353515bd3aedf84c6e6ebfb726563
	ae84db778',
			'html_url': 
	'https://github.com/jqlang/jq/commit/13353515bd3aedf84c6e6ebfb726563ae84db778',
			'comments_url': 
	'https://api.github.com/repos/jqlang/jq/commits/13353515bd3aedf84c6e6ebfb726563
	ae84db778/comments',
			'author': {
				'login': 'DavidKorczynski',
				'id': 657617,
				'node_id': 'MDQ6VXNlcjY1NzYxNw==',
				'avatar_url': 'https://avatars.githubusercontent.com/u/657617?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/DavidKorczynski',
				'html_url': 'https://github.com/DavidKorczynski',
				'followers_url': 
	'https://api.github.com/users/DavidKorczynski/followers',
				'following_url': 
	'https://api.github.com/users/DavidKorczynski/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/DavidKorczynski/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/DavidKorczynski/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/DavidKorczynski/subscriptions',
				'organizations_url': 
	'https://api.github.com/users/DavidKorczynski/orgs',
				'repos_url': 'https://api.github.com/users/DavidKorczynski/repos',
				'events_url': 
	'https://api.github.com/users/DavidKorczynski/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/DavidKorczynski/received_events',
				'type': 'User',
				'site_admin': False
			},
			'committer': {
				'login': 'emanuele6',
				'id': 20175435,
				'node_id': 'MDQ6VXNlcjIwMTc1NDM1',
				'avatar_url': 
	'https://avatars.githubusercontent.com/u/20175435?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/emanuele6',
				'html_url': 'https://github.com/emanuele6',
				'followers_url': 
	'https://api.github.com/users/emanuele6/followers',
				'following_url': 
	'https://api.github.com/users/emanuele6/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/emanuele6/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/emanuele6/subscriptions',
				'organizations_url': 'https://api.github.com/users/emanuele6/orgs',
				'repos_url': 'https://api.github.com/users/emanuele6/repos',
				'events_url': 
	'https://api.github.com/users/emanuele6/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/emanuele6/received_events',
				'type': 'User',
				'site_admin': False
			},
			'parents': [
				{
					'sha': '98a206964d59143c6ed9189b91cdb34af1ae5071',
					'url': 
	'https://api.github.com/repos/jqlang/jq/commits/98a206964d59143c6ed9189b91cdb34
	af1ae5071',
					'html_url': 
	'https://github.com/jqlang/jq/commit/98a206964d59143c6ed9189b91cdb34af1ae5071'
				}
			]
		},
		{
			'sha': '98a206964d59143c6ed9189b91cdb34af1ae5071',
			'node_id': 
	'C_kwDOAE3WVdoAKDk4YTIwNjk2NGQ1OTE0M2M2ZWQ5MTg5YjkxY2RiMzRhZjFhZTUwNzE',
			'commit': {
				'author': {
					'name': 'Mattias Wadman',
					'email': 'mattias.wadman@gmail.com',
					'date': '2023-11-29T08:36:33Z'
				},
				'committer': {
					'name': 'GitHub',
					'email': 'noreply@github.com',
					'date': '2023-11-29T08:36:33Z'
				},
				'message': 'Convert decnum to binary64 (double) instead of 
	decimal64\n\nThis is what the JSON spec suggests and will also be less 
	confusing compared to other jq implementations and langauges.\r\n\r\nRelated to
	#2939',
				'tree': {
					'sha': 'e8055db585b3fa602b289b1fc2e725e293600a17',
					'url': 
	'https://api.github.com/repos/jqlang/jq/git/trees/e8055db585b3fa602b289b1fc2e72
	5e293600a17'
				},
				'url': 
	'https://api.github.com/repos/jqlang/jq/git/commits/98a206964d59143c6ed9189b91c
	db34af1ae5071',
				'comment_count': 0,
				'verification': {
					'verified': True,
					'reason': 'valid',
					'signature': '-----BEGIN PGP 
	SIGNATURE-----\n\nwsBcBAABCAAQBQJlZvgRCRBK7hj4Ov3rIwAAe+MIAB0NJnboF3tHVY+d6VqlY
	Fxe\nA4RP/9ZjFlUrRLCe5jwQU9irhDQuPICjvYa/K0xrIc3oaAnTE4AEM7HxJku9sGdj\ngfRZI1BV
	XKMTpGz0cWX7HpDCJsz9oGIR4myNXyJdsHSgaMeE8/QnedGt2PTGyFoV\nAdH6bj8XyirrPEvJtnhlo
	NS7GMrTfWjVIBRhP5OqIsSN4MgRbxGBHdLTB+g+V/Vq\nRHji3DUdD6HyWrdmwJ3zAlMkyjcfvtgkyY
	OHj9qYWFNXDWtfB1nlhbqW+MVGScOD\nOkZguRVV3xgRa6EFjn32ltzcwB1B5XsoQF+PWfX1pfEseEO
	HVyTFdo/kufADLQM=\n=fC+V\n-----END PGP SIGNATURE-----\n',
					'payload': 'tree 
	e8055db585b3fa602b289b1fc2e725e293600a17\nparent 
	16170910332b51f1ff497ef566d6a525acdb5b43\nauthor Mattias Wadman 
	<mattias.wadman@gmail.com> 1701246993 +0100\ncommitter GitHub 
	<noreply@github.com> 1701246993 +0100\n\nConvert decnum to binary64 (double) 
	instead of decimal64\n\nThis is what the JSON spec suggests and will also be 
	less confusing compared to other jq implementations and 
	langauges.\r\n\r\nRelated to #2939'
				}
			},
			'url': 
	'https://api.github.com/repos/jqlang/jq/commits/98a206964d59143c6ed9189b91cdb34
	af1ae5071',
			'html_url': 
	'https://github.com/jqlang/jq/commit/98a206964d59143c6ed9189b91cdb34af1ae5071',
			'comments_url': 
	'https://api.github.com/repos/jqlang/jq/commits/98a206964d59143c6ed9189b91cdb34
	af1ae5071/comments',
			'author': {
				'login': 'wader',
				'id': 185566,
				'node_id': 'MDQ6VXNlcjE4NTU2Ng==',
				'avatar_url': 'https://avatars.githubusercontent.com/u/185566?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/wader',
				'html_url': 'https://github.com/wader',
				'followers_url': 'https://api.github.com/users/wader/followers',
				'following_url': 
	'https://api.github.com/users/wader/following{/other_user}',
				'gists_url': 'https://api.github.com/users/wader/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/wader/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/wader/subscriptions',
				'organizations_url': 'https://api.github.com/users/wader/orgs',
				'repos_url': 'https://api.github.com/users/wader/repos',
				'events_url': 
	'https://api.github.com/users/wader/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/wader/received_events',
				'type': 'User',
				'site_admin': False
			},
			'committer': {
				'login': 'web-flow',
				'id': 19864447,
				'node_id': 'MDQ6VXNlcjE5ODY0NDQ3',
				'avatar_url': 
	'https://avatars.githubusercontent.com/u/19864447?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/web-flow',
				'html_url': 'https://github.com/web-flow',
				'followers_url': 'https://api.github.com/users/web-flow/followers',
				'following_url': 
	'https://api.github.com/users/web-flow/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/web-flow/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/web-flow/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/web-flow/subscriptions',
				'organizations_url': 'https://api.github.com/users/web-flow/orgs',
				'repos_url': 'https://api.github.com/users/web-flow/repos',
				'events_url': 
	'https://api.github.com/users/web-flow/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/web-flow/received_events',
				'type': 'User',
				'site_admin': False
			},
			'parents': [
				{
					'sha': '16170910332b51f1ff497ef566d6a525acdb5b43',
					'url': 
	'https://api.github.com/repos/jqlang/jq/commits/16170910332b51f1ff497ef566d6a52
	5acdb5b43',
					'html_url': 
	'https://github.com/jqlang/jq/commit/16170910332b51f1ff497ef566d6a525acdb5b43'
				}
			]
		},
		{
			'sha': '16170910332b51f1ff497ef566d6a525acdb5b43',
			'node_id': 
	'C_kwDOAE3WVdoAKDE2MTcwOTEwMzMyYjUxZjFmZjQ5N2VmNTY2ZDZhNTI1YWNkYjViNDM',
			'commit': {
				'author': {
					'name': 'Emanuele Torre',
					'email': 'torreemanuele6@gmail.com',
					'date': '2023-11-29T05:12:25Z'
				},
				'committer': {
					'name': 'Emanuele Torre',
					'email': 'torreemanuele6@gmail.com',
					'date': '2023-11-29T08:35:36Z'
				},
				'message': 'website: use https URLs instead of http URLs in 
	download page\n\nAlso add markdown formatting for decNumber URL so it gets 
	rendered as a\nlink in the html page.',
				'tree': {
					'sha': 'ff8b801f14994e4a177ee22b3c9b649281ec8af6',
					'url': 
	'https://api.github.com/repos/jqlang/jq/git/trees/ff8b801f14994e4a177ee22b3c9b6
	49281ec8af6'
				},
				'url': 
	'https://api.github.com/repos/jqlang/jq/git/commits/16170910332b51f1ff497ef566d
	6a525acdb5b43',
				'comment_count': 0,
				'verification': {
					'verified': False,
					'reason': 'unsigned',
					'signature': None,
					'payload': None
				}
			},
			'url': 
	'https://api.github.com/repos/jqlang/jq/commits/16170910332b51f1ff497ef566d6a52
	5acdb5b43',
			'html_url': 
	'https://github.com/jqlang/jq/commit/16170910332b51f1ff497ef566d6a525acdb5b43',
			'comments_url': 
	'https://api.github.com/repos/jqlang/jq/commits/16170910332b51f1ff497ef566d6a52
	5acdb5b43/comments',
			'author': {
				'login': 'emanuele6',
				'id': 20175435,
				'node_id': 'MDQ6VXNlcjIwMTc1NDM1',
				'avatar_url': 
	'https://avatars.githubusercontent.com/u/20175435?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/emanuele6',
				'html_url': 'https://github.com/emanuele6',
				'followers_url': 
	'https://api.github.com/users/emanuele6/followers',
				'following_url': 
	'https://api.github.com/users/emanuele6/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/emanuele6/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/emanuele6/subscriptions',
				'organizations_url': 'https://api.github.com/users/emanuele6/orgs',
				'repos_url': 'https://api.github.com/users/emanuele6/repos',
				'events_url': 
	'https://api.github.com/users/emanuele6/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/emanuele6/received_events',
				'type': 'User',
				'site_admin': False
			},
			'committer': {
				'login': 'emanuele6',
				'id': 20175435,
				'node_id': 'MDQ6VXNlcjIwMTc1NDM1',
				'avatar_url': 
	'https://avatars.githubusercontent.com/u/20175435?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/emanuele6',
				'html_url': 'https://github.com/emanuele6',
				'followers_url': 
	'https://api.github.com/users/emanuele6/followers',
				'following_url': 
	'https://api.github.com/users/emanuele6/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/emanuele6/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/emanuele6/subscriptions',
				'organizations_url': 'https://api.github.com/users/emanuele6/orgs',
				'repos_url': 'https://api.github.com/users/emanuele6/repos',
				'events_url': 
	'https://api.github.com/users/emanuele6/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/emanuele6/received_events',
				'type': 'User',
				'site_admin': False
			},
			'parents': [
				{
					'sha': 'd14393f5522531f57b8e3a83c04b7990c64a249e',
					'url': 
	'https://api.github.com/repos/jqlang/jq/commits/d14393f5522531f57b8e3a83c04b799
	0c64a249e',
					'html_url': 
	'https://github.com/jqlang/jq/commit/d14393f5522531f57b8e3a83c04b7990c64a249e'
				}
			]
		}
	]

</details>

We can use jq to extract just the first commit.

```ipython
>>> from jqpy import jq
>>> jq(r'.[0]', data)
```

<details>
  	<summary>Show result</summary>

	[
		{
			'sha': 'bfb7fd570f521ef832fe1c3bca0e05abd398284c',
			'node_id': 
	'C_kwDOAE3WVdoAKGJmYjdmZDU3MGY1MjFlZjgzMmZlMWMzYmNhMGUwNWFiZDM5ODI4NGM',
			'commit': {
				'author': {
					'name': 'David Korczynski',
					'email': 'david@adalogics.com',
					'date': '2023-11-30T13:33:01Z'
				},
				'committer': {
					'name': 'Emanuele Torre',
					'email': 'torreemanuele6@gmail.com',
					'date': '2023-11-30T13:40:36Z'
				},
				'message': 'jq_fuzz_execute: cleanup un-needed 
	extern\n\nSigned-off-by: David Korczynski <david@adalogics.com>',
				'tree': {
					'sha': '47b08e6bc3e47c9ab13092d613bda7e4cf35bba0',
					'url': 
	'https://api.github.com/repos/jqlang/jq/git/trees/47b08e6bc3e47c9ab13092d613bda
	7e4cf35bba0'
				},
				'url': 
	'https://api.github.com/repos/jqlang/jq/git/commits/bfb7fd570f521ef832fe1c3bca0
	e05abd398284c',
				'comment_count': 0,
				'verification': {
					'verified': False,
					'reason': 'unsigned',
					'signature': None,
					'payload': None
				}
			},
			'url': 
	'https://api.github.com/repos/jqlang/jq/commits/bfb7fd570f521ef832fe1c3bca0e05a
	bd398284c',
			'html_url': 
	'https://github.com/jqlang/jq/commit/bfb7fd570f521ef832fe1c3bca0e05abd398284c',
			'comments_url': 
	'https://api.github.com/repos/jqlang/jq/commits/bfb7fd570f521ef832fe1c3bca0e05a
	bd398284c/comments',
			'author': {
				'login': 'DavidKorczynski',
				'id': 657617,
				'node_id': 'MDQ6VXNlcjY1NzYxNw==',
				'avatar_url': 'https://avatars.githubusercontent.com/u/657617?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/DavidKorczynski',
				'html_url': 'https://github.com/DavidKorczynski',
				'followers_url': 
	'https://api.github.com/users/DavidKorczynski/followers',
				'following_url': 
	'https://api.github.com/users/DavidKorczynski/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/DavidKorczynski/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/DavidKorczynski/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/DavidKorczynski/subscriptions',
				'organizations_url': 
	'https://api.github.com/users/DavidKorczynski/orgs',
				'repos_url': 'https://api.github.com/users/DavidKorczynski/repos',
				'events_url': 
	'https://api.github.com/users/DavidKorczynski/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/DavidKorczynski/received_events',
				'type': 'User',
				'site_admin': False
			},
			'committer': {
				'login': 'emanuele6',
				'id': 20175435,
				'node_id': 'MDQ6VXNlcjIwMTc1NDM1',
				'avatar_url': 
	'https://avatars.githubusercontent.com/u/20175435?v=4',
				'gravatar_id': '',
				'url': 'https://api.github.com/users/emanuele6',
				'html_url': 'https://github.com/emanuele6',
				'followers_url': 
	'https://api.github.com/users/emanuele6/followers',
				'following_url': 
	'https://api.github.com/users/emanuele6/following{/other_user}',
				'gists_url': 
	'https://api.github.com/users/emanuele6/gists{/gist_id}',
				'starred_url': 
	'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',
				'subscriptions_url': 
	'https://api.github.com/users/emanuele6/subscriptions',
				'organizations_url': 'https://api.github.com/users/emanuele6/orgs',
				'repos_url': 'https://api.github.com/users/emanuele6/repos',
				'events_url': 
	'https://api.github.com/users/emanuele6/events{/privacy}',
				'received_events_url': 
	'https://api.github.com/users/emanuele6/received_events',
				'type': 'User',
				'site_admin': False
			},
			'parents': [
				{
					'sha': '252ab244cead3670a11d06bc3110f3a4577a2341',
					'url': 
	'https://api.github.com/repos/jqlang/jq/commits/252ab244cead3670a11d06bc3110f3a
	4577a2341',
					'html_url': 
	'https://github.com/jqlang/jq/commit/252ab244cead3670a11d06bc3110f3a4577a2341'
				}
			]
		}
	]

</details>

Here we invoke `jq` function to process JSON compatible `data` with `r'.[0]'` filtration expression. Function `jq` always returns list of JSON compatible results. In the most cases there will be only one result.

> [!NOTE]  
> Raw-string literal (prefixed with *r* symbol) is not necessary here but be careful about mixing pythonic escape sequences with jq formatting expression.

There's a lot of info we don't care about there, so we'll restrict it down to the most interesting fields.

```ipython
>>> jq(r'.[0] | {message: .commit.message, name: .commit.committer.name}', data)
```

<details>
  	<summary>Show result</summary>

	[
		{
			'message': 'jq_fuzz_execute: cleanup un-needed extern\n\nSigned-off-by:
	David Korczynski <david@adalogics.com>',
			'name': 'Emanuele Torre'
		}
	]

</details>

The `|` operator in jq feeds the output of one filter (`.[0]` which gets the first element of the array in the response) into the input of another (`{...}` which builds an object out of those fields). You can access nested attributes, such as `.commit.message`.

Now let's get the rest of the commits.

```ipython
>>> jq(r'.[] | {message: .commit.message, name: .commit.committer.name}', data)
```

<details>
  	<summary>Show result</summary>

	[
		{
			'message': 'jq_fuzz_execute: cleanup un-needed extern\n\nSigned-off-by:
	David Korczynski <david@adalogics.com>',
			'name': 'Emanuele Torre'
		},
		{
			'message': 'Add fuzzer targeting jq_next\n\nSigned-off-by: David 
	Korczynski <david@adalogics.com>',
			'name': 'Emanuele Torre'
		},
		{
			'message': 'jq_fuzz_compile: dump disassembly\n\nSigned-off-by: David 
	Korczynski <david@adalogics.com>',
			'name': 'Emanuele Torre'
		},
		{
			'message': 'Convert decnum to binary64 (double) instead of 
	decimal64\n\nThis is what the JSON spec suggests and will also be less 
	confusing compared to other jq implementations and langauges.\r\n\r\nRelated to
	#2939',
			'name': 'GitHub'
		},
		{
			'message': 'website: use https URLs instead of http URLs in download 
	page\n\nAlso add markdown formatting for decNumber URL so it gets rendered as 
	a\nlink in the html page.',
			'name': 'Emanuele Torre'
		}
	]

</details>

`.[]` returns each element of the array returned in the response, one at a time, which are all fed into `{message: .commit.message, name: .commit.committer.name}`.

If you want to get the output as a single array, you can tell jq to "collect" all the answers by wrapping the filter in square brackets:

```ipython
>>> jq(r'[.[] | {message: .commit.message, name: .commit.committer.name}]', data)
```

<details>
  	<summary>Show result</summary>

	[
		[
			{
				'message': 'jq_fuzz_execute: cleanup un-needed 
	extern\n\nSigned-off-by: David Korczynski <david@adalogics.com>',
				'name': 'Emanuele Torre'
			},
			{
				'message': 'Add fuzzer targeting jq_next\n\nSigned-off-by: David 
	Korczynski <david@adalogics.com>',
				'name': 'Emanuele Torre'
			},
			{
				'message': 'jq_fuzz_compile: dump disassembly\n\nSigned-off-by: 
	David Korczynski <david@adalogics.com>',
				'name': 'Emanuele Torre'
			},
			{
				'message': 'Convert decnum to binary64 (double) instead of 
	decimal64\n\nThis is what the JSON spec suggests and will also be less 
	confusing compared to other jq implementations and langauges.\r\n\r\nRelated to
	#2939',
				'name': 'GitHub'
			},
			{
				'message': 'website: use https URLs instead of http URLs in 
	download page\n\nAlso add markdown formatting for decNumber URL so it gets 
	rendered as a\nlink in the html page.',
				'name': 'Emanuele Torre'
			}
		]
	]

</details>

Next, let's try getting the URLs of the parent commits out of the API results as well. In each commit, the GitHub API includes information about "parent" commits. There can be one or many.

	"parents": [
	  {
		"sha": "f2ad9517c72f6267ae317639ab56bbfd4a8653d4",
		"url": "https://api.github.com/repos/jqlang/jq/commits/f2ad9517c72f6267ae317639ab56bbfd4a8653d4",
		"html_url": "https://github.com/jqlang/jq/commit/f2ad9517c72f6267ae317639ab56bbfd4a8653d4"
	  }
	]

We want to pull out all the "html_url" fields inside that array of parent commits and make a simple list of strings to go along with the "message" and "author" fields we already have.

```ipython
>>> jq(r'[.[] | {message: .commit.message, name: .commit.committer.name, parents: [.parents[].html_url]}]', data)
```

<details>
  	<summary>Show result</summary>

	[
		[
			{
				'message': 'jq_fuzz_execute: cleanup un-needed 
	extern\n\nSigned-off-by: David Korczynski <david@adalogics.com>',
				'name': 'Emanuele Torre',
				'parents': [
					'https://github.com/jqlang/jq/commit/252ab244cead3670a11d06bc31
	10f3a4577a2341'
				]
			},
			{
				'message': 'Add fuzzer targeting jq_next\n\nSigned-off-by: David 
	Korczynski <david@adalogics.com>',
				'name': 'Emanuele Torre',
				'parents': [
					'https://github.com/jqlang/jq/commit/13353515bd3aedf84c6e6ebfb7
	26563ae84db778'
				]
			},
			{
				'message': 'jq_fuzz_compile: dump disassembly\n\nSigned-off-by: 
	David Korczynski <david@adalogics.com>',
				'name': 'Emanuele Torre',
				'parents': [
					'https://github.com/jqlang/jq/commit/98a206964d59143c6ed9189b91
	cdb34af1ae5071'
				]
			},
			{
				'message': 'Convert decnum to binary64 (double) instead of 
	decimal64\n\nThis is what the JSON spec suggests and will also be less 
	confusing compared to other jq implementations and langauges.\r\n\r\nRelated to
	#2939',
				'name': 'GitHub',
				'parents': [
					'https://github.com/jqlang/jq/commit/16170910332b51f1ff497ef566
	d6a525acdb5b43'
				]
			},
			{
				'message': 'website: use https URLs instead of http URLs in 
	download page\n\nAlso add markdown formatting for decNumber URL so it gets 
	rendered as a\nlink in the html page.',
				'name': 'Emanuele Torre',
				'parents': [
					'https://github.com/jqlang/jq/commit/d14393f5522531f57b8e3a83c0
	4b7990c64a249e'
				]
			}
		]
	]

</details>

Here we're making an object as before, but this time the parents field is being set to `[.parents[].html_url]`, which collects all the parent commit URLs defined in the parents object.



> [!NOTE]  
> Visit original tutorial [website](https://jqlang.github.io/jq/manual/) to see more examples and read about JQ filtration language.

# Installation

1. Install JQ binary for your platform and include it to `PATH` environment variable (should be included by default).

   [JQ download page](https://jqlang.github.io/jq/download/)

   Quick commands:

	* Windows + [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/): `winget install jqlang.jq`
	* Windows + [scoop](https://scoop.sh/): `scoop install jq`
	* Windows + [choco](https://chocolatey.org/): `choco install jq`
	* Windows + [exe](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-windows-amd64.exe)
	* [Ubuntu](https://packages.ubuntu.com/jq): `sudo apt-get install jq`
	* [Arch](https://archlinux.org/packages/?q=jq): `sudo pacman -S jq`
	* macOS + [brew](https://brew.sh/): `brew install jq`

2. Install JQpy python binding via [pip](https://pip.pypa.io/en/stable/) or your favourite python package manager:

   `pip install jqpy`




            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jqpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "jq,json,query,binding,processor",
    "author": null,
    "author_email": "baterflyrity <baterflyrity@yandex.ru>",
    "download_url": "https://files.pythonhosted.org/packages/ae/0f/4a6b4a3f66c7ea47e6a8fdefabd3ca586e555a48afc1f6133bbb9a336362/jqpy-1.0.0.tar.gz",
    "platform": null,
    "description": "**[JQpy](https://pypi.org/project/jqpy/)** is Python binding for [JQ](https://jqlang.github.io/jq/) (JSON processing language) that simply works on any platform (even Windows) and does not require compilation.\n\n[Read the documentation](https://baterflyrity.github.io/jqpy/)\n\n----\n\n<!-- TOC -->\n* [Tutorial](#tutorial)\n* [Installation](#installation)\n<!-- TOC -->\n\n# Tutorial\n\nGitHub has a JSON API, so let's play with that. This URL gets us the last 5 commits from the jq repo.\n\n```ipython\n>>> import requests\n>>> data = requests.get('https://api.github.com/repos/jqlang/jq/commits',{'per_page':5}).json()\n>>> data\n```\n\n<details>\n  \t<summary>Show result</summary>\n\n\t[\n\t\t{\n\t\t\t'sha': 'bfb7fd570f521ef832fe1c3bca0e05abd398284c',\n\t\t\t'node_id': \n\t'C_kwDOAE3WVdoAKGJmYjdmZDU3MGY1MjFlZjgzMmZlMWMzYmNhMGUwNWFiZDM5ODI4NGM',\n\t\t\t'commit': {\n\t\t\t\t'author': {\n\t\t\t\t\t'name': 'David Korczynski',\n\t\t\t\t\t'email': 'david@adalogics.com',\n\t\t\t\t\t'date': '2023-11-30T13:33:01Z'\n\t\t\t\t},\n\t\t\t\t'committer': {\n\t\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t\t'email': 'torreemanuele6@gmail.com',\n\t\t\t\t\t'date': '2023-11-30T13:40:36Z'\n\t\t\t\t},\n\t\t\t\t'message': 'jq_fuzz_execute: cleanup un-needed \n\textern\\n\\nSigned-off-by: David Korczynski <david@adalogics.com>',\n\t\t\t\t'tree': {\n\t\t\t\t\t'sha': '47b08e6bc3e47c9ab13092d613bda7e4cf35bba0',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/trees/47b08e6bc3e47c9ab13092d613bda\n\t7e4cf35bba0'\n\t\t\t\t},\n\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/commits/bfb7fd570f521ef832fe1c3bca0\n\te05abd398284c',\n\t\t\t\t'comment_count': 0,\n\t\t\t\t'verification': {\n\t\t\t\t\t'verified': False,\n\t\t\t\t\t'reason': 'unsigned',\n\t\t\t\t\t'signature': None,\n\t\t\t\t\t'payload': None\n\t\t\t\t}\n\t\t\t},\n\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/bfb7fd570f521ef832fe1c3bca0e05a\n\tbd398284c',\n\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/bfb7fd570f521ef832fe1c3bca0e05abd398284c',\n\t\t\t'comments_url': \n\t'https://api.github.com/repos/jqlang/jq/commits/bfb7fd570f521ef832fe1c3bca0e05a\n\tbd398284c/comments',\n\t\t\t'author': {\n\t\t\t\t'login': 'DavidKorczynski',\n\t\t\t\t'id': 657617,\n\t\t\t\t'node_id': 'MDQ6VXNlcjY1NzYxNw==',\n\t\t\t\t'avatar_url': 'https://avatars.githubusercontent.com/u/657617?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/DavidKorczynski',\n\t\t\t\t'html_url': 'https://github.com/DavidKorczynski',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/DavidKorczynski/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/DavidKorczynski/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/DavidKorczynski/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/DavidKorczynski/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/DavidKorczynski/subscriptions',\n\t\t\t\t'organizations_url': \n\t'https://api.github.com/users/DavidKorczynski/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/DavidKorczynski/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/DavidKorczynski/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/DavidKorczynski/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'committer': {\n\t\t\t\t'login': 'emanuele6',\n\t\t\t\t'id': 20175435,\n\t\t\t\t'node_id': 'MDQ6VXNlcjIwMTc1NDM1',\n\t\t\t\t'avatar_url': \n\t'https://avatars.githubusercontent.com/u/20175435?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/emanuele6',\n\t\t\t\t'html_url': 'https://github.com/emanuele6',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/emanuele6/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/emanuele6/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/emanuele6/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/emanuele6/subscriptions',\n\t\t\t\t'organizations_url': 'https://api.github.com/users/emanuele6/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/emanuele6/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/emanuele6/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/emanuele6/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'parents': [\n\t\t\t\t{\n\t\t\t\t\t'sha': '252ab244cead3670a11d06bc3110f3a4577a2341',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/252ab244cead3670a11d06bc3110f3a\n\t4577a2341',\n\t\t\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/252ab244cead3670a11d06bc3110f3a4577a2341'\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t'sha': '252ab244cead3670a11d06bc3110f3a4577a2341',\n\t\t\t'node_id': \n\t'C_kwDOAE3WVdoAKDI1MmFiMjQ0Y2VhZDM2NzBhMTFkMDZiYzMxMTBmM2E0NTc3YTIzNDE',\n\t\t\t'commit': {\n\t\t\t\t'author': {\n\t\t\t\t\t'name': 'David Korczynski',\n\t\t\t\t\t'email': 'david@adalogics.com',\n\t\t\t\t\t'date': '2023-11-30T13:22:27Z'\n\t\t\t\t},\n\t\t\t\t'committer': {\n\t\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t\t'email': 'torreemanuele6@gmail.com',\n\t\t\t\t\t'date': '2023-11-30T13:40:36Z'\n\t\t\t\t},\n\t\t\t\t'message': 'Add fuzzer targeting jq_next\\n\\nSigned-off-by: David \n\tKorczynski <david@adalogics.com>',\n\t\t\t\t'tree': {\n\t\t\t\t\t'sha': '7c6832a4b7376e7793d1239bd0abe0d580c69ee3',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/trees/7c6832a4b7376e7793d1239bd0abe\n\t0d580c69ee3'\n\t\t\t\t},\n\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/commits/252ab244cead3670a11d06bc311\n\t0f3a4577a2341',\n\t\t\t\t'comment_count': 0,\n\t\t\t\t'verification': {\n\t\t\t\t\t'verified': False,\n\t\t\t\t\t'reason': 'unsigned',\n\t\t\t\t\t'signature': None,\n\t\t\t\t\t'payload': None\n\t\t\t\t}\n\t\t\t},\n\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/252ab244cead3670a11d06bc3110f3a\n\t4577a2341',\n\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/252ab244cead3670a11d06bc3110f3a4577a2341',\n\t\t\t'comments_url': \n\t'https://api.github.com/repos/jqlang/jq/commits/252ab244cead3670a11d06bc3110f3a\n\t4577a2341/comments',\n\t\t\t'author': {\n\t\t\t\t'login': 'DavidKorczynski',\n\t\t\t\t'id': 657617,\n\t\t\t\t'node_id': 'MDQ6VXNlcjY1NzYxNw==',\n\t\t\t\t'avatar_url': 'https://avatars.githubusercontent.com/u/657617?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/DavidKorczynski',\n\t\t\t\t'html_url': 'https://github.com/DavidKorczynski',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/DavidKorczynski/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/DavidKorczynski/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/DavidKorczynski/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/DavidKorczynski/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/DavidKorczynski/subscriptions',\n\t\t\t\t'organizations_url': \n\t'https://api.github.com/users/DavidKorczynski/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/DavidKorczynski/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/DavidKorczynski/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/DavidKorczynski/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'committer': {\n\t\t\t\t'login': 'emanuele6',\n\t\t\t\t'id': 20175435,\n\t\t\t\t'node_id': 'MDQ6VXNlcjIwMTc1NDM1',\n\t\t\t\t'avatar_url': \n\t'https://avatars.githubusercontent.com/u/20175435?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/emanuele6',\n\t\t\t\t'html_url': 'https://github.com/emanuele6',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/emanuele6/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/emanuele6/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/emanuele6/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/emanuele6/subscriptions',\n\t\t\t\t'organizations_url': 'https://api.github.com/users/emanuele6/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/emanuele6/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/emanuele6/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/emanuele6/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'parents': [\n\t\t\t\t{\n\t\t\t\t\t'sha': '13353515bd3aedf84c6e6ebfb726563ae84db778',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/13353515bd3aedf84c6e6ebfb726563\n\tae84db778',\n\t\t\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/13353515bd3aedf84c6e6ebfb726563ae84db778'\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t'sha': '13353515bd3aedf84c6e6ebfb726563ae84db778',\n\t\t\t'node_id': \n\t'C_kwDOAE3WVdoAKDEzMzUzNTE1YmQzYWVkZjg0YzZlNmViZmI3MjY1NjNhZTg0ZGI3Nzg',\n\t\t\t'commit': {\n\t\t\t\t'author': {\n\t\t\t\t\t'name': 'David Korczynski',\n\t\t\t\t\t'email': 'david@adalogics.com',\n\t\t\t\t\t'date': '2023-11-30T13:22:07Z'\n\t\t\t\t},\n\t\t\t\t'committer': {\n\t\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t\t'email': 'torreemanuele6@gmail.com',\n\t\t\t\t\t'date': '2023-11-30T13:40:36Z'\n\t\t\t\t},\n\t\t\t\t'message': 'jq_fuzz_compile: dump disassembly\\n\\nSigned-off-by: \n\tDavid Korczynski <david@adalogics.com>',\n\t\t\t\t'tree': {\n\t\t\t\t\t'sha': 'a4fe1a9f424352a5f989b629ba666ccacd3ebd61',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/trees/a4fe1a9f424352a5f989b629ba666\n\tccacd3ebd61'\n\t\t\t\t},\n\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/commits/13353515bd3aedf84c6e6ebfb72\n\t6563ae84db778',\n\t\t\t\t'comment_count': 0,\n\t\t\t\t'verification': {\n\t\t\t\t\t'verified': False,\n\t\t\t\t\t'reason': 'unsigned',\n\t\t\t\t\t'signature': None,\n\t\t\t\t\t'payload': None\n\t\t\t\t}\n\t\t\t},\n\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/13353515bd3aedf84c6e6ebfb726563\n\tae84db778',\n\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/13353515bd3aedf84c6e6ebfb726563ae84db778',\n\t\t\t'comments_url': \n\t'https://api.github.com/repos/jqlang/jq/commits/13353515bd3aedf84c6e6ebfb726563\n\tae84db778/comments',\n\t\t\t'author': {\n\t\t\t\t'login': 'DavidKorczynski',\n\t\t\t\t'id': 657617,\n\t\t\t\t'node_id': 'MDQ6VXNlcjY1NzYxNw==',\n\t\t\t\t'avatar_url': 'https://avatars.githubusercontent.com/u/657617?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/DavidKorczynski',\n\t\t\t\t'html_url': 'https://github.com/DavidKorczynski',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/DavidKorczynski/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/DavidKorczynski/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/DavidKorczynski/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/DavidKorczynski/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/DavidKorczynski/subscriptions',\n\t\t\t\t'organizations_url': \n\t'https://api.github.com/users/DavidKorczynski/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/DavidKorczynski/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/DavidKorczynski/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/DavidKorczynski/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'committer': {\n\t\t\t\t'login': 'emanuele6',\n\t\t\t\t'id': 20175435,\n\t\t\t\t'node_id': 'MDQ6VXNlcjIwMTc1NDM1',\n\t\t\t\t'avatar_url': \n\t'https://avatars.githubusercontent.com/u/20175435?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/emanuele6',\n\t\t\t\t'html_url': 'https://github.com/emanuele6',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/emanuele6/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/emanuele6/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/emanuele6/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/emanuele6/subscriptions',\n\t\t\t\t'organizations_url': 'https://api.github.com/users/emanuele6/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/emanuele6/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/emanuele6/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/emanuele6/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'parents': [\n\t\t\t\t{\n\t\t\t\t\t'sha': '98a206964d59143c6ed9189b91cdb34af1ae5071',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/98a206964d59143c6ed9189b91cdb34\n\taf1ae5071',\n\t\t\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/98a206964d59143c6ed9189b91cdb34af1ae5071'\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t'sha': '98a206964d59143c6ed9189b91cdb34af1ae5071',\n\t\t\t'node_id': \n\t'C_kwDOAE3WVdoAKDk4YTIwNjk2NGQ1OTE0M2M2ZWQ5MTg5YjkxY2RiMzRhZjFhZTUwNzE',\n\t\t\t'commit': {\n\t\t\t\t'author': {\n\t\t\t\t\t'name': 'Mattias Wadman',\n\t\t\t\t\t'email': 'mattias.wadman@gmail.com',\n\t\t\t\t\t'date': '2023-11-29T08:36:33Z'\n\t\t\t\t},\n\t\t\t\t'committer': {\n\t\t\t\t\t'name': 'GitHub',\n\t\t\t\t\t'email': 'noreply@github.com',\n\t\t\t\t\t'date': '2023-11-29T08:36:33Z'\n\t\t\t\t},\n\t\t\t\t'message': 'Convert decnum to binary64 (double) instead of \n\tdecimal64\\n\\nThis is what the JSON spec suggests and will also be less \n\tconfusing compared to other jq implementations and langauges.\\r\\n\\r\\nRelated to\n\t#2939',\n\t\t\t\t'tree': {\n\t\t\t\t\t'sha': 'e8055db585b3fa602b289b1fc2e725e293600a17',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/trees/e8055db585b3fa602b289b1fc2e72\n\t5e293600a17'\n\t\t\t\t},\n\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/commits/98a206964d59143c6ed9189b91c\n\tdb34af1ae5071',\n\t\t\t\t'comment_count': 0,\n\t\t\t\t'verification': {\n\t\t\t\t\t'verified': True,\n\t\t\t\t\t'reason': 'valid',\n\t\t\t\t\t'signature': '-----BEGIN PGP \n\tSIGNATURE-----\\n\\nwsBcBAABCAAQBQJlZvgRCRBK7hj4Ov3rIwAAe+MIAB0NJnboF3tHVY+d6VqlY\n\tFxe\\nA4RP/9ZjFlUrRLCe5jwQU9irhDQuPICjvYa/K0xrIc3oaAnTE4AEM7HxJku9sGdj\\ngfRZI1BV\n\tXKMTpGz0cWX7HpDCJsz9oGIR4myNXyJdsHSgaMeE8/QnedGt2PTGyFoV\\nAdH6bj8XyirrPEvJtnhlo\n\tNS7GMrTfWjVIBRhP5OqIsSN4MgRbxGBHdLTB+g+V/Vq\\nRHji3DUdD6HyWrdmwJ3zAlMkyjcfvtgkyY\n\tOHj9qYWFNXDWtfB1nlhbqW+MVGScOD\\nOkZguRVV3xgRa6EFjn32ltzcwB1B5XsoQF+PWfX1pfEseEO\n\tHVyTFdo/kufADLQM=\\n=fC+V\\n-----END PGP SIGNATURE-----\\n',\n\t\t\t\t\t'payload': 'tree \n\te8055db585b3fa602b289b1fc2e725e293600a17\\nparent \n\t16170910332b51f1ff497ef566d6a525acdb5b43\\nauthor Mattias Wadman \n\t<mattias.wadman@gmail.com> 1701246993 +0100\\ncommitter GitHub \n\t<noreply@github.com> 1701246993 +0100\\n\\nConvert decnum to binary64 (double) \n\tinstead of decimal64\\n\\nThis is what the JSON spec suggests and will also be \n\tless confusing compared to other jq implementations and \n\tlangauges.\\r\\n\\r\\nRelated to #2939'\n\t\t\t\t}\n\t\t\t},\n\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/98a206964d59143c6ed9189b91cdb34\n\taf1ae5071',\n\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/98a206964d59143c6ed9189b91cdb34af1ae5071',\n\t\t\t'comments_url': \n\t'https://api.github.com/repos/jqlang/jq/commits/98a206964d59143c6ed9189b91cdb34\n\taf1ae5071/comments',\n\t\t\t'author': {\n\t\t\t\t'login': 'wader',\n\t\t\t\t'id': 185566,\n\t\t\t\t'node_id': 'MDQ6VXNlcjE4NTU2Ng==',\n\t\t\t\t'avatar_url': 'https://avatars.githubusercontent.com/u/185566?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/wader',\n\t\t\t\t'html_url': 'https://github.com/wader',\n\t\t\t\t'followers_url': 'https://api.github.com/users/wader/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/wader/following{/other_user}',\n\t\t\t\t'gists_url': 'https://api.github.com/users/wader/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/wader/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/wader/subscriptions',\n\t\t\t\t'organizations_url': 'https://api.github.com/users/wader/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/wader/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/wader/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/wader/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'committer': {\n\t\t\t\t'login': 'web-flow',\n\t\t\t\t'id': 19864447,\n\t\t\t\t'node_id': 'MDQ6VXNlcjE5ODY0NDQ3',\n\t\t\t\t'avatar_url': \n\t'https://avatars.githubusercontent.com/u/19864447?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/web-flow',\n\t\t\t\t'html_url': 'https://github.com/web-flow',\n\t\t\t\t'followers_url': 'https://api.github.com/users/web-flow/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/web-flow/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/web-flow/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/web-flow/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/web-flow/subscriptions',\n\t\t\t\t'organizations_url': 'https://api.github.com/users/web-flow/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/web-flow/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/web-flow/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/web-flow/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'parents': [\n\t\t\t\t{\n\t\t\t\t\t'sha': '16170910332b51f1ff497ef566d6a525acdb5b43',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/16170910332b51f1ff497ef566d6a52\n\t5acdb5b43',\n\t\t\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/16170910332b51f1ff497ef566d6a525acdb5b43'\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t'sha': '16170910332b51f1ff497ef566d6a525acdb5b43',\n\t\t\t'node_id': \n\t'C_kwDOAE3WVdoAKDE2MTcwOTEwMzMyYjUxZjFmZjQ5N2VmNTY2ZDZhNTI1YWNkYjViNDM',\n\t\t\t'commit': {\n\t\t\t\t'author': {\n\t\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t\t'email': 'torreemanuele6@gmail.com',\n\t\t\t\t\t'date': '2023-11-29T05:12:25Z'\n\t\t\t\t},\n\t\t\t\t'committer': {\n\t\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t\t'email': 'torreemanuele6@gmail.com',\n\t\t\t\t\t'date': '2023-11-29T08:35:36Z'\n\t\t\t\t},\n\t\t\t\t'message': 'website: use https URLs instead of http URLs in \n\tdownload page\\n\\nAlso add markdown formatting for decNumber URL so it gets \n\trendered as a\\nlink in the html page.',\n\t\t\t\t'tree': {\n\t\t\t\t\t'sha': 'ff8b801f14994e4a177ee22b3c9b649281ec8af6',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/trees/ff8b801f14994e4a177ee22b3c9b6\n\t49281ec8af6'\n\t\t\t\t},\n\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/commits/16170910332b51f1ff497ef566d\n\t6a525acdb5b43',\n\t\t\t\t'comment_count': 0,\n\t\t\t\t'verification': {\n\t\t\t\t\t'verified': False,\n\t\t\t\t\t'reason': 'unsigned',\n\t\t\t\t\t'signature': None,\n\t\t\t\t\t'payload': None\n\t\t\t\t}\n\t\t\t},\n\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/16170910332b51f1ff497ef566d6a52\n\t5acdb5b43',\n\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/16170910332b51f1ff497ef566d6a525acdb5b43',\n\t\t\t'comments_url': \n\t'https://api.github.com/repos/jqlang/jq/commits/16170910332b51f1ff497ef566d6a52\n\t5acdb5b43/comments',\n\t\t\t'author': {\n\t\t\t\t'login': 'emanuele6',\n\t\t\t\t'id': 20175435,\n\t\t\t\t'node_id': 'MDQ6VXNlcjIwMTc1NDM1',\n\t\t\t\t'avatar_url': \n\t'https://avatars.githubusercontent.com/u/20175435?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/emanuele6',\n\t\t\t\t'html_url': 'https://github.com/emanuele6',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/emanuele6/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/emanuele6/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/emanuele6/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/emanuele6/subscriptions',\n\t\t\t\t'organizations_url': 'https://api.github.com/users/emanuele6/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/emanuele6/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/emanuele6/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/emanuele6/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'committer': {\n\t\t\t\t'login': 'emanuele6',\n\t\t\t\t'id': 20175435,\n\t\t\t\t'node_id': 'MDQ6VXNlcjIwMTc1NDM1',\n\t\t\t\t'avatar_url': \n\t'https://avatars.githubusercontent.com/u/20175435?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/emanuele6',\n\t\t\t\t'html_url': 'https://github.com/emanuele6',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/emanuele6/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/emanuele6/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/emanuele6/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/emanuele6/subscriptions',\n\t\t\t\t'organizations_url': 'https://api.github.com/users/emanuele6/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/emanuele6/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/emanuele6/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/emanuele6/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'parents': [\n\t\t\t\t{\n\t\t\t\t\t'sha': 'd14393f5522531f57b8e3a83c04b7990c64a249e',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/d14393f5522531f57b8e3a83c04b799\n\t0c64a249e',\n\t\t\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/d14393f5522531f57b8e3a83c04b7990c64a249e'\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n\n</details>\n\nWe can use jq to extract just the first commit.\n\n```ipython\n>>> from jqpy import jq\n>>> jq(r'.[0]', data)\n```\n\n<details>\n  \t<summary>Show result</summary>\n\n\t[\n\t\t{\n\t\t\t'sha': 'bfb7fd570f521ef832fe1c3bca0e05abd398284c',\n\t\t\t'node_id': \n\t'C_kwDOAE3WVdoAKGJmYjdmZDU3MGY1MjFlZjgzMmZlMWMzYmNhMGUwNWFiZDM5ODI4NGM',\n\t\t\t'commit': {\n\t\t\t\t'author': {\n\t\t\t\t\t'name': 'David Korczynski',\n\t\t\t\t\t'email': 'david@adalogics.com',\n\t\t\t\t\t'date': '2023-11-30T13:33:01Z'\n\t\t\t\t},\n\t\t\t\t'committer': {\n\t\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t\t'email': 'torreemanuele6@gmail.com',\n\t\t\t\t\t'date': '2023-11-30T13:40:36Z'\n\t\t\t\t},\n\t\t\t\t'message': 'jq_fuzz_execute: cleanup un-needed \n\textern\\n\\nSigned-off-by: David Korczynski <david@adalogics.com>',\n\t\t\t\t'tree': {\n\t\t\t\t\t'sha': '47b08e6bc3e47c9ab13092d613bda7e4cf35bba0',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/trees/47b08e6bc3e47c9ab13092d613bda\n\t7e4cf35bba0'\n\t\t\t\t},\n\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/git/commits/bfb7fd570f521ef832fe1c3bca0\n\te05abd398284c',\n\t\t\t\t'comment_count': 0,\n\t\t\t\t'verification': {\n\t\t\t\t\t'verified': False,\n\t\t\t\t\t'reason': 'unsigned',\n\t\t\t\t\t'signature': None,\n\t\t\t\t\t'payload': None\n\t\t\t\t}\n\t\t\t},\n\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/bfb7fd570f521ef832fe1c3bca0e05a\n\tbd398284c',\n\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/bfb7fd570f521ef832fe1c3bca0e05abd398284c',\n\t\t\t'comments_url': \n\t'https://api.github.com/repos/jqlang/jq/commits/bfb7fd570f521ef832fe1c3bca0e05a\n\tbd398284c/comments',\n\t\t\t'author': {\n\t\t\t\t'login': 'DavidKorczynski',\n\t\t\t\t'id': 657617,\n\t\t\t\t'node_id': 'MDQ6VXNlcjY1NzYxNw==',\n\t\t\t\t'avatar_url': 'https://avatars.githubusercontent.com/u/657617?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/DavidKorczynski',\n\t\t\t\t'html_url': 'https://github.com/DavidKorczynski',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/DavidKorczynski/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/DavidKorczynski/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/DavidKorczynski/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/DavidKorczynski/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/DavidKorczynski/subscriptions',\n\t\t\t\t'organizations_url': \n\t'https://api.github.com/users/DavidKorczynski/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/DavidKorczynski/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/DavidKorczynski/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/DavidKorczynski/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'committer': {\n\t\t\t\t'login': 'emanuele6',\n\t\t\t\t'id': 20175435,\n\t\t\t\t'node_id': 'MDQ6VXNlcjIwMTc1NDM1',\n\t\t\t\t'avatar_url': \n\t'https://avatars.githubusercontent.com/u/20175435?v=4',\n\t\t\t\t'gravatar_id': '',\n\t\t\t\t'url': 'https://api.github.com/users/emanuele6',\n\t\t\t\t'html_url': 'https://github.com/emanuele6',\n\t\t\t\t'followers_url': \n\t'https://api.github.com/users/emanuele6/followers',\n\t\t\t\t'following_url': \n\t'https://api.github.com/users/emanuele6/following{/other_user}',\n\t\t\t\t'gists_url': \n\t'https://api.github.com/users/emanuele6/gists{/gist_id}',\n\t\t\t\t'starred_url': \n\t'https://api.github.com/users/emanuele6/starred{/owner}{/repo}',\n\t\t\t\t'subscriptions_url': \n\t'https://api.github.com/users/emanuele6/subscriptions',\n\t\t\t\t'organizations_url': 'https://api.github.com/users/emanuele6/orgs',\n\t\t\t\t'repos_url': 'https://api.github.com/users/emanuele6/repos',\n\t\t\t\t'events_url': \n\t'https://api.github.com/users/emanuele6/events{/privacy}',\n\t\t\t\t'received_events_url': \n\t'https://api.github.com/users/emanuele6/received_events',\n\t\t\t\t'type': 'User',\n\t\t\t\t'site_admin': False\n\t\t\t},\n\t\t\t'parents': [\n\t\t\t\t{\n\t\t\t\t\t'sha': '252ab244cead3670a11d06bc3110f3a4577a2341',\n\t\t\t\t\t'url': \n\t'https://api.github.com/repos/jqlang/jq/commits/252ab244cead3670a11d06bc3110f3a\n\t4577a2341',\n\t\t\t\t\t'html_url': \n\t'https://github.com/jqlang/jq/commit/252ab244cead3670a11d06bc3110f3a4577a2341'\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t]\n\n</details>\n\nHere we invoke `jq` function to process JSON compatible `data` with `r'.[0]'` filtration expression. Function `jq` always returns list of JSON compatible results. In the most cases there will be only one result.\n\n> [!NOTE]  \n> Raw-string literal (prefixed with *r* symbol) is not necessary here but be careful about mixing pythonic escape sequences with jq formatting expression.\n\nThere's a lot of info we don't care about there, so we'll restrict it down to the most interesting fields.\n\n```ipython\n>>> jq(r'.[0] | {message: .commit.message, name: .commit.committer.name}', data)\n```\n\n<details>\n  \t<summary>Show result</summary>\n\n\t[\n\t\t{\n\t\t\t'message': 'jq_fuzz_execute: cleanup un-needed extern\\n\\nSigned-off-by:\n\tDavid Korczynski <david@adalogics.com>',\n\t\t\t'name': 'Emanuele Torre'\n\t\t}\n\t]\n\n</details>\n\nThe `|` operator in jq feeds the output of one filter (`.[0]` which gets the first element of the array in the response) into the input of another (`{...}` which builds an object out of those fields). You can access nested attributes, such as `.commit.message`.\n\nNow let's get the rest of the commits.\n\n```ipython\n>>> jq(r'.[] | {message: .commit.message, name: .commit.committer.name}', data)\n```\n\n<details>\n  \t<summary>Show result</summary>\n\n\t[\n\t\t{\n\t\t\t'message': 'jq_fuzz_execute: cleanup un-needed extern\\n\\nSigned-off-by:\n\tDavid Korczynski <david@adalogics.com>',\n\t\t\t'name': 'Emanuele Torre'\n\t\t},\n\t\t{\n\t\t\t'message': 'Add fuzzer targeting jq_next\\n\\nSigned-off-by: David \n\tKorczynski <david@adalogics.com>',\n\t\t\t'name': 'Emanuele Torre'\n\t\t},\n\t\t{\n\t\t\t'message': 'jq_fuzz_compile: dump disassembly\\n\\nSigned-off-by: David \n\tKorczynski <david@adalogics.com>',\n\t\t\t'name': 'Emanuele Torre'\n\t\t},\n\t\t{\n\t\t\t'message': 'Convert decnum to binary64 (double) instead of \n\tdecimal64\\n\\nThis is what the JSON spec suggests and will also be less \n\tconfusing compared to other jq implementations and langauges.\\r\\n\\r\\nRelated to\n\t#2939',\n\t\t\t'name': 'GitHub'\n\t\t},\n\t\t{\n\t\t\t'message': 'website: use https URLs instead of http URLs in download \n\tpage\\n\\nAlso add markdown formatting for decNumber URL so it gets rendered as \n\ta\\nlink in the html page.',\n\t\t\t'name': 'Emanuele Torre'\n\t\t}\n\t]\n\n</details>\n\n`.[]` returns each element of the array returned in the response, one at a time, which are all fed into `{message: .commit.message, name: .commit.committer.name}`.\n\nIf you want to get the output as a single array, you can tell jq to \"collect\" all the answers by wrapping the filter in square brackets:\n\n```ipython\n>>> jq(r'[.[] | {message: .commit.message, name: .commit.committer.name}]', data)\n```\n\n<details>\n  \t<summary>Show result</summary>\n\n\t[\n\t\t[\n\t\t\t{\n\t\t\t\t'message': 'jq_fuzz_execute: cleanup un-needed \n\textern\\n\\nSigned-off-by: David Korczynski <david@adalogics.com>',\n\t\t\t\t'name': 'Emanuele Torre'\n\t\t\t},\n\t\t\t{\n\t\t\t\t'message': 'Add fuzzer targeting jq_next\\n\\nSigned-off-by: David \n\tKorczynski <david@adalogics.com>',\n\t\t\t\t'name': 'Emanuele Torre'\n\t\t\t},\n\t\t\t{\n\t\t\t\t'message': 'jq_fuzz_compile: dump disassembly\\n\\nSigned-off-by: \n\tDavid Korczynski <david@adalogics.com>',\n\t\t\t\t'name': 'Emanuele Torre'\n\t\t\t},\n\t\t\t{\n\t\t\t\t'message': 'Convert decnum to binary64 (double) instead of \n\tdecimal64\\n\\nThis is what the JSON spec suggests and will also be less \n\tconfusing compared to other jq implementations and langauges.\\r\\n\\r\\nRelated to\n\t#2939',\n\t\t\t\t'name': 'GitHub'\n\t\t\t},\n\t\t\t{\n\t\t\t\t'message': 'website: use https URLs instead of http URLs in \n\tdownload page\\n\\nAlso add markdown formatting for decNumber URL so it gets \n\trendered as a\\nlink in the html page.',\n\t\t\t\t'name': 'Emanuele Torre'\n\t\t\t}\n\t\t]\n\t]\n\n</details>\n\nNext, let's try getting the URLs of the parent commits out of the API results as well. In each commit, the GitHub API includes information about \"parent\" commits. There can be one or many.\n\n\t\"parents\": [\n\t  {\n\t\t\"sha\": \"f2ad9517c72f6267ae317639ab56bbfd4a8653d4\",\n\t\t\"url\": \"https://api.github.com/repos/jqlang/jq/commits/f2ad9517c72f6267ae317639ab56bbfd4a8653d4\",\n\t\t\"html_url\": \"https://github.com/jqlang/jq/commit/f2ad9517c72f6267ae317639ab56bbfd4a8653d4\"\n\t  }\n\t]\n\nWe want to pull out all the \"html_url\" fields inside that array of parent commits and make a simple list of strings to go along with the \"message\" and \"author\" fields we already have.\n\n```ipython\n>>> jq(r'[.[] | {message: .commit.message, name: .commit.committer.name, parents: [.parents[].html_url]}]', data)\n```\n\n<details>\n  \t<summary>Show result</summary>\n\n\t[\n\t\t[\n\t\t\t{\n\t\t\t\t'message': 'jq_fuzz_execute: cleanup un-needed \n\textern\\n\\nSigned-off-by: David Korczynski <david@adalogics.com>',\n\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t'parents': [\n\t\t\t\t\t'https://github.com/jqlang/jq/commit/252ab244cead3670a11d06bc31\n\t10f3a4577a2341'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t'message': 'Add fuzzer targeting jq_next\\n\\nSigned-off-by: David \n\tKorczynski <david@adalogics.com>',\n\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t'parents': [\n\t\t\t\t\t'https://github.com/jqlang/jq/commit/13353515bd3aedf84c6e6ebfb7\n\t26563ae84db778'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t'message': 'jq_fuzz_compile: dump disassembly\\n\\nSigned-off-by: \n\tDavid Korczynski <david@adalogics.com>',\n\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t'parents': [\n\t\t\t\t\t'https://github.com/jqlang/jq/commit/98a206964d59143c6ed9189b91\n\tcdb34af1ae5071'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t'message': 'Convert decnum to binary64 (double) instead of \n\tdecimal64\\n\\nThis is what the JSON spec suggests and will also be less \n\tconfusing compared to other jq implementations and langauges.\\r\\n\\r\\nRelated to\n\t#2939',\n\t\t\t\t'name': 'GitHub',\n\t\t\t\t'parents': [\n\t\t\t\t\t'https://github.com/jqlang/jq/commit/16170910332b51f1ff497ef566\n\td6a525acdb5b43'\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\t'message': 'website: use https URLs instead of http URLs in \n\tdownload page\\n\\nAlso add markdown formatting for decNumber URL so it gets \n\trendered as a\\nlink in the html page.',\n\t\t\t\t'name': 'Emanuele Torre',\n\t\t\t\t'parents': [\n\t\t\t\t\t'https://github.com/jqlang/jq/commit/d14393f5522531f57b8e3a83c0\n\t4b7990c64a249e'\n\t\t\t\t]\n\t\t\t}\n\t\t]\n\t]\n\n</details>\n\nHere we're making an object as before, but this time the parents field is being set to `[.parents[].html_url]`, which collects all the parent commit URLs defined in the parents object.\n\n\n\n> [!NOTE]  \n> Visit original tutorial [website](https://jqlang.github.io/jq/manual/) to see more examples and read about JQ filtration language.\n\n# Installation\n\n1. Install JQ binary for your platform and include it to `PATH` environment variable (should be included by default).\n\n   [JQ download page](https://jqlang.github.io/jq/download/)\n\n   Quick commands:\n\n\t* Windows + [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/): `winget install jqlang.jq`\n\t* Windows + [scoop](https://scoop.sh/): `scoop install jq`\n\t* Windows + [choco](https://chocolatey.org/): `choco install jq`\n\t* Windows + [exe](https://github.com/jqlang/jq/releases/download/jq-1.7/jq-windows-amd64.exe)\n\t* [Ubuntu](https://packages.ubuntu.com/jq): `sudo apt-get install jq`\n\t* [Arch](https://archlinux.org/packages/?q=jq): `sudo pacman -S jq`\n\t* macOS + [brew](https://brew.sh/): `brew install jq`\n\n2. Install JQpy python binding via [pip](https://pip.pypa.io/en/stable/) or your favourite python package manager:\n\n   `pip install jqpy`\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "JQpy is Python binding for JQ (JSON processing language) that simply works on any platform (even Windows) and does not require compilation.",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://baterflyrity.github.io/jqpy",
        "Source": "https://github.com/baterflyrity/jqpy"
    },
    "split_keywords": [
        "jq",
        "json",
        "query",
        "binding",
        "processor"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d80dc1b7b48b9e66c37488cd219af4b54bf6dfca686fcf0e9a73bdfbd1bd9dcc",
                "md5": "effa260a9867e0cb941ed11703b5a34a",
                "sha256": "8674851499a27283447ede1e1edc67586ce553cd151697e492d1d5f121baa3b2"
            },
            "downloads": -1,
            "filename": "jqpy-1.0.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "effa260a9867e0cb941ed11703b5a34a",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 8059,
            "upload_time": "2023-12-07T16:46:54",
            "upload_time_iso_8601": "2023-12-07T16:46:54.869667Z",
            "url": "https://files.pythonhosted.org/packages/d8/0d/c1b7b48b9e66c37488cd219af4b54bf6dfca686fcf0e9a73bdfbd1bd9dcc/jqpy-1.0.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ae0f4a6b4a3f66c7ea47e6a8fdefabd3ca586e555a48afc1f6133bbb9a336362",
                "md5": "6f0afcecff484d0bd7f9c64a0d51c090",
                "sha256": "0a7869baedc081e1099f38727aa7e76d9264f972de65c7661b3b67c821d0321d"
            },
            "downloads": -1,
            "filename": "jqpy-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6f0afcecff484d0bd7f9c64a0d51c090",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 133007,
            "upload_time": "2023-12-07T16:47:05",
            "upload_time_iso_8601": "2023-12-07T16:47:05.157431Z",
            "url": "https://files.pythonhosted.org/packages/ae/0f/4a6b4a3f66c7ea47e6a8fdefabd3ca586e555a48afc1f6133bbb9a336362/jqpy-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-07 16:47:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "baterflyrity",
    "github_project": "jqpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "jqpy"
}
        
Elapsed time: 0.14448s