René's URL Explorer Experiment


Title: Add AttrDict to JSON module for use with object_hook · Issue #96145 · python/cpython · GitHub

Open Graph Title: Add AttrDict to JSON module for use with object_hook · Issue #96145 · python/cpython

X Title: Add AttrDict to JSON module for use with object_hook · Issue #96145 · python/cpython

Description: AttrDict is used improve the readability of nested data access from JSON files. Compare: config.servers.setup.interfaces.mgmt.protocol config["servers"]["setup"]["interfaces"]["mgmt"]["protocol"] Victor's research showed that tooling thi...

Open Graph Description: AttrDict is used improve the readability of nested data access from JSON files. Compare: config.servers.setup.interfaces.mgmt.protocol config["servers"]["setup"]["interfaces"]["mgmt"]["protocol"] V...

X Description: AttrDict is used improve the readability of nested data access from JSON files. Compare: config.servers.setup.interfaces.mgmt.protocol config["servers"]["setup"]["interface...

Opengraph URL: https://github.com/python/cpython/issues/96145

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add AttrDict to JSON module for use with object_hook","articleBody":"`AttrDict` is used improve the readability of nested data access from JSON files. Compare:\r\n\r\n     config.servers.setup.interfaces.mgmt.protocol\r\n     config[\"servers\"][\"setup\"][\"interfaces\"][\"mgmt\"][\"protocol\"]\r\n\r\n[Victor's research](https://mail.python.org/archives/list/python-dev@python.org/message/XDFTMWK5727ETLVNEANWYN6A3HQN6STT/) showed that tooling this is very popular in Python world and the implementation [dates back quite far](https://mail.python.org/archives/list/python-dev@python.org/message/EPKBQRDN63HRXLPLYUTTILWDLYVIT43A/). At first I suggested I suggested extending `SimpleNamespace()`; instead, [Guido recommended](https://lwn.net/ml/python-dev/CAP7+vJKUP-p7KhZDF7Z8O0ad6WvqA3J9=sZ=SDo2DqhDqqq-5Q@mail.gmail.com/)  putting this is the JSON module which is where it would primarily be used:\r\n\r\n```\r\nwith open('kepler.json') as f:\r\n    kepler = json.load(f, object_hook=AttrDict)\r\nprint(kepler.orbital_period.neptune)\r\n```\r\n         \r\n\r\n\r\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-105948\n* gh-106117\n* gh-96146\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/rhettinger","@type":"Person","name":"rhettinger"},"datePublished":"2022-08-20T17:55:22Z","url":"https://github.com/python/cpython/issues/96145"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:817eabb4-7858-4994-a175-6b78779ce629
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC560:F3929:225A7C:2E6D02:6B006758
html-safe-nonceab5fce26d27bc9dd592bfbe196a4534c8782ccce2a1ccd6816aee32cd149cfef
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTYwOkYzOTI5OjIyNUE3QzoyRTZEMDI6NkIwMDY3NTgiLCJ2aXNpdG9yX2lkIjoiNzAzMjUwNzAzOTExNjk3ODAwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacae1a050a8b026df96bd32e51092da5685d784ec7a060f32f9fc5e43a20f6a208
hovercard-subject-tagissue:1345242190
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/96145/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4d0f543dd623a5f569d74de4df7bddf84edaac6acab10a5e4d30cafe584dbc93/python/cpython/issues/96145
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4d0f543dd623a5f569d74de4df7bddf84edaac6acab10a5e4d30cafe584dbc93/python/cpython/issues/96145
og:image:altAttrDict is used improve the readability of nested data access from JSON files. Compare: config.servers.setup.interfaces.mgmt.protocol config["servers"]["setup"]["interfaces"]["mgmt"]["protocol"] V...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerhettinger
hostnamegithub.com
expected-hostnamegithub.com
None25854482a1773a7c1ebb8be3d2bc1c6e61d82d78126be63b5044474a86d44d9e
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee4f5c239e31f1f680e6bbc419ff92d774da616ec
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/96145#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F96145
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F96145
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/96145
Reloadhttps://github.com/python/cpython/issues/96145
Reloadhttps://github.com/python/cpython/issues/96145
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/96145
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/96145
Add AttrDict to JSON module for use with object_hookhttps://github.com/python/cpython/issues/96145#top
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com/rhettinger
rhettingerhttps://github.com/rhettinger
on Aug 20, 2022https://github.com/python/cpython/issues/96145#issue-1345242190
Victor's researchhttps://mail.python.org/archives/list/python-dev@python.org/message/XDFTMWK5727ETLVNEANWYN6A3HQN6STT/
dates back quite farhttps://mail.python.org/archives/list/python-dev@python.org/message/EPKBQRDN63HRXLPLYUTTILWDLYVIT43A/
Guido recommendedhttps://lwn.net/ml/python-dev/CAP7+vJKUP-p7KhZDF7Z8O0ad6WvqA3J9=sZ=SDo2DqhDqqq-5Q@mail.gmail.com/
Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (#96146)" #105948https://github.com/python/cpython/pull/105948
[3.12] Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (GH-96146)" (GH-105948) #106117https://github.com/python/cpython/pull/106117
gh-96145: Add AttrDict to JSON module for use with object_hook #96146https://github.com/python/cpython/pull/96146
Nexthttps://github.com/python/cpython/issues/96145?timeline_page=1
rhettingerhttps://github.com/rhettinger
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
on Aug 20, 2022https://github.com/python/cpython/issues/96145#event-7226607102
rhettingerhttps://github.com/rhettinger
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Aug 23, 2022https://github.com/python/cpython/issues/96145#event-7245672299
rhettingerhttps://github.com/rhettinger
on Aug 23, 2022https://github.com/python/cpython/issues/96145#event-7245672758
GH-96145: Add AttrDict to JSON module for use with object_hook (#96146)https://github.com/python/cpython/commit/1f0eafa844bf5a380603d55e8d4b42d8c2a3439d
GH-96145https://github.com/python/cpython/issues/96145
#96146https://github.com/python/cpython/pull/96146
1f0eafahttps://github.com/python/cpython/commit/1f0eafa844bf5a380603d55e8d4b42d8c2a3439d
mdboomhttps://github.com/mdboom
on Aug 24, 2022https://github.com/python/cpython/issues/96145#event-7253142341
pythonGH-96145: Add AttrDict to JSON module for use with object_hook (p…https://github.com/mdboom/cpython/commit/e6587cfc03a1f8b6dbd29c9b05be7d501f3afdcc
pythonGH-96145https://github.com/python/cpython/issues/96145
p…https://github.com/python/cpython/pull/96146
e6587cfhttps://github.com/mdboom/cpython/commit/e6587cfc03a1f8b6dbd29c9b05be7d501f3afdcc
serhiy-storchakahttps://github.com/serhiy-storchaka
JSON issueshttps://github.com/orgs/python/projects/6
on Dec 15, 2022https://github.com/python/cpython/issues/96145#event-15231024967
serhiy-storchakahttps://github.com/serhiy-storchaka
JSON issueshttps://github.com/orgs/python/projects/6
on Dec 17, 2022https://github.com/python/cpython/issues/96145
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Jun 20, 2023https://github.com/python/cpython/issues/96145#issuecomment-1599478233
JelleZijlstrahttps://github.com/JelleZijlstra
on Jun 20, 2023https://github.com/python/cpython/issues/96145#event-9584155791
https://github.com/carljm
carljmhttps://github.com/carljm
on Jun 20, 2023https://github.com/python/cpython/issues/96145#issuecomment-1599508607
@serhiy-storchakahttps://github.com/serhiy-storchaka
https://bugs.python.org/issue40284https://bugs.python.org/issue40284
https://github.com/ambv
ambvhttps://github.com/ambv
on Jun 20, 2023https://github.com/python/cpython/issues/96145#issuecomment-1599519495
https://github.com/erlend-aasland
erlend-aaslandhttps://github.com/erlend-aasland
on Jun 20, 2023https://github.com/python/cpython/issues/96145#issuecomment-1599556634
gpsheadhttps://github.com/gpshead
JSON issueshttps://github.com/orgs/python/projects/6
on Jun 20, 2023https://github.com/python/cpython/issues/96145
gpsheadhttps://github.com/gpshead
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
on Jun 20, 2023https://github.com/python/cpython/issues/96145#event-9584609240
ezio-melottihttps://github.com/ezio-melotti
Release and Deferred blockers 🚫https://github.com/orgs/python/projects/2
on Jun 20, 2023https://github.com/python/cpython/issues/96145#event-14610459648
github-project-automationhttps://github.com/apps/github-project-automation
Release and Deferred blockers 🚫https://github.com/orgs/python/projects/2
on Jun 20, 2023https://github.com/python/cpython/issues/96145
https://github.com/rhettinger
rhettingerhttps://github.com/rhettinger
on Jun 21, 2023https://github.com/python/cpython/issues/96145#issuecomment-1599977357
Cisco's PyATShttps://developer.cisco.com/docs/pyats/api/
https://github.com/encukou
encukouhttps://github.com/encukou
on Jun 21, 2023https://github.com/python/cpython/issues/96145#issuecomment-1600265736
identiity function feature requesthttps://mail.python.org/pipermail/python-ideas/2009-March/003647.html
https://github.com/hwmq
hwmqhttps://github.com/hwmq
on Jun 21, 2023https://github.com/python/cpython/issues/96145#issuecomment-1601592188
https://github.com/CAM-Gerlach
CAM-Gerlachhttps://github.com/CAM-Gerlach
on Jun 21, 2023https://github.com/python/cpython/issues/96145#issuecomment-1601800730
Ideas thread on the Python Discoursehttps://discuss.python.org/c/ideas/6
conscious design choicehttps://docs.python.org/3/library/functions.html#setattr
conflicting with existing dict attributeshttps://github.com/python/cpython/issues/96145#issuecomment-1599508607
https://github.com/rhettinger
rhettingerhttps://github.com/rhettinger
on Jun 24, 2023https://github.com/python/cpython/issues/96145#issuecomment-1605685607
herehttps://pubhub.devnetcloud.com/media/pyats/docs/topology/introduction.html#yaml
herehttps://pubhub.devnetcloud.com/media/pyats/docs/topology/creation.html
https://github.com/CAM-Gerlach
CAM-Gerlachhttps://github.com/CAM-Gerlach
on Jun 24, 2023https://github.com/python/cpython/issues/96145#issuecomment-1605755890
the Pandas docshttps://pandas.pydata.org/docs/user_guide/indexing.html#attribute-access
https://github.com/rhettinger
rhettingerhttps://github.com/rhettinger
on Jun 24, 2023https://github.com/python/cpython/issues/96145#issuecomment-1605770465
https://github.com/Yhg1s
Yhg1shttps://github.com/Yhg1s
on Jun 26, 2023https://github.com/python/cpython/issues/96145#issuecomment-1607617042
Yhg1shttps://github.com/Yhg1s
on Jun 26, 2023https://github.com/python/cpython/issues/96145#event-9642465501
Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (https://github.com/python/cpython/commit/d3af83b9342457d8b24476baeb799f7506ff04f3
GH-96145https://github.com/python/cpython/issues/96145
d3af83bhttps://github.com/python/cpython/commit/d3af83b9342457d8b24476baeb799f7506ff04f3
miss-islingtonhttps://github.com/miss-islington
on Jun 26, 2023https://github.com/python/cpython/issues/96145#event-9642466712
Revert "pythonGH-96145: Add AttrDict to JSON module for use with obje…https://github.com/miss-islington/cpython/commit/31da0ac07ad9876834947034c7e1e4a41ee67958
pythonGH-96145https://github.com/python/cpython/issues/96145
31da0achttps://github.com/miss-islington/cpython/commit/31da0ac07ad9876834947034c7e1e4a41ee67958
Yhg1shttps://github.com/Yhg1s
on Jun 26, 2023https://github.com/python/cpython/issues/96145#event-9642894014
[3.12] Revert "GH-96145: Add AttrDict to JSON module for use with obj…https://github.com/python/cpython/commit/1acfecbc0041b8a3b6c017d23ebed55aba39de6b
GH-96145https://github.com/python/cpython/issues/96145
1acfecbhttps://github.com/python/cpython/commit/1acfecbc0041b8a3b6c017d23ebed55aba39de6b
rhettingerhttps://github.com/rhettinger
not plannedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Jun 27, 2023https://github.com/python/cpython/issues/96145#event-9647079827
github-project-automationhttps://github.com/apps/github-project-automation
Release and Deferred blockers 🚫https://github.com/orgs/python/projects/2
on Jun 27, 2023https://github.com/python/cpython/issues/96145
github-project-automationhttps://github.com/apps/github-project-automation
JSON issueshttps://github.com/orgs/python/projects/6
on Jun 27, 2023https://github.com/python/cpython/issues/96145
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
on Aug 21, 2023https://github.com/python/cpython/issues/96145#issuecomment-1685814511
#108191https://github.com/python/cpython/issues/108191
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/96145
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/96145
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
Release and Deferred blockers 🚫https://github.com/orgs/python/projects/2
JSON issueshttps://github.com/orgs/python/projects/6
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.