René's URL Explorer Experiment


Title: adding a new @classmethod to an existing class · Issue #1173 · realpython/python-guide · GitHub

Open Graph Title: adding a new @classmethod to an existing class · Issue #1173 · realpython/python-guide

X Title: adding a new @classmethod to an existing class · Issue #1173 · realpython/python-guide

Description: I have a python programming issue which I have not solved. In python3, using 'from opencadd.structure.core import Structure' defines the class Structure. The section of the Structure code that I need to modify is @classmethod @redo.retri...

Open Graph Description: I have a python programming issue which I have not solved. In python3, using 'from opencadd.structure.core import Structure' defines the class Structure. The section of the Structure code that I ne...

X Description: I have a python programming issue which I have not solved. In python3, using 'from opencadd.structure.core import Structure' defines the class Structure. The section of the Structure code t...

Opengraph URL: https://github.com/realpython/python-guide/issues/1173

X: @github

direct link

Domain: Github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"adding a new @classmethod to an existing class","articleBody":"I have a python programming issue which I have not solved. \n \nIn python3, using 'from opencadd.structure.core import Structure'\n\ndefines the class Structure. The section of the Structure code that I need to modify is\n\n    @classmethod\n    @redo.retriable(attempts=10, sleeptime=2)\n    def from_pdbid(cls, pdbid):\n        import mmtf\n\n        return cls(mmtf.fetch(pdbid))\n\nwhere I would like to include\n\n    # New method for CIF files\n    @classmethod\n    def from_cif(cls, filepath: str):\n        \"\"\"\n        Create a Structure object from a local CIF file.\n        \"\"\"\n        parser = MMCIFParser()\n        structure_data = parser.get_structure(\"cif_file\", filepath)\n        # ... (processing to build Volkamer Structure object)\n        return cls(atoms, residues, bonds)\n\nThis will skip trying to execute mmtf.fetch (which will timeout because pdb is no longer available for mmtf.fetch).\nInstead using Structure.from_cif will avoid this issue and retrieve the file. \n\nSo far, I have not been able to do this successfully. Many blogs offer suggestions about adding a classmethod, \nbut I have failed and am asking for help from python exports. \n\nThanks in advance,\nDavid\nFortran, R, Matlab, C, AWK, Perl, no Python\n\n\n","author":{"url":"https://github.com/llevoc","@type":"Person","name":"llevoc"},"datePublished":"2025-09-19T19:01:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1173/python-guide/issues/1173"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d72b6aa6-f894-ed1a-a2db-680d7d24d645
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD304:106F3E:D965FA:139D4A5:6A6324FB
html-safe-noncefb58957e75c7bff406315ae9ec9b55638a90cf45506f2e7c71d6875c1afa04e4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzA0OjEwNkYzRTpEOTY1RkE6MTM5RDRBNTo2QTYzMjRGQiIsInZpc2l0b3JfaWQiOiIzOTgyNzg5MTMzMTc4NDQ3MDk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacfba28d28a684791f0fad8612947e356d22005b74122a8f887de1ca45df9a3936
hovercard-subject-tagissue:3435561894
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/realpython/python-guide/1173/issue_layout
twitter:imagehttps://opengraph.githubassets.com/16b8d84799eee07c0dbfe0a153c9da99ced9ce5c83df533a315115eae3df152a/realpython/python-guide/issues/1173
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/16b8d84799eee07c0dbfe0a153c9da99ced9ce5c83df533a315115eae3df152a/realpython/python-guide/issues/1173
og:image:altI have a python programming issue which I have not solved. In python3, using 'from opencadd.structure.core import Structure' defines the class Structure. The section of the Structure code that I ne...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamellevoc
hostnamegithub.com
expected-hostnamegithub.com
None1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6
turbo-cache-controlno-preview
go-importgithub.com/realpython/python-guide git https://github.com/realpython/python-guide.git
octolytics-dimension-user_id5448020
octolytics-dimension-user_loginrealpython
octolytics-dimension-repository_id1481305
octolytics-dimension-repository_nworealpython/python-guide
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1481305
octolytics-dimension-repository_network_root_nworealpython/python-guide
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
release6a93e25585f487ddff9e3996c06d5b869d6e1828
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://Github.com/realpython/python-guide/issues/1173#start-of-content
https://Github.com/
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frealpython%2Fpython-guide%2Fissues%2F1173
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Frealpython%2Fpython-guide%2Fissues%2F1173
Sign up https://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=realpython%2Fpython-guide
Reloadhttps://Github.com/realpython/python-guide/issues/1173
Reloadhttps://Github.com/realpython/python-guide/issues/1173
Reloadhttps://Github.com/realpython/python-guide/issues/1173
Please reload this pagehttps://Github.com/realpython/python-guide/issues/1173
realpython https://Github.com/realpython
python-guidehttps://Github.com/realpython/python-guide
Notifications https://Github.com/login?return_to=%2Frealpython%2Fpython-guide
Fork 5.9k https://Github.com/login?return_to=%2Frealpython%2Fpython-guide
Star 29.7k https://Github.com/login?return_to=%2Frealpython%2Fpython-guide
Code https://Github.com/realpython/python-guide
Issues 103 https://Github.com/realpython/python-guide/issues
Pull requests 32 https://Github.com/realpython/python-guide/pulls
Actions https://Github.com/realpython/python-guide/actions
Projects https://Github.com/realpython/python-guide/projects
Wiki https://Github.com/realpython/python-guide/wiki
Security and quality 0 https://Github.com/realpython/python-guide/security
Insights https://Github.com/realpython/python-guide/pulse
Code https://Github.com/realpython/python-guide
Issues https://Github.com/realpython/python-guide/issues
Pull requests https://Github.com/realpython/python-guide/pulls
Actions https://Github.com/realpython/python-guide/actions
Projects https://Github.com/realpython/python-guide/projects
Wiki https://Github.com/realpython/python-guide/wiki
Security and quality https://Github.com/realpython/python-guide/security
Insights https://Github.com/realpython/python-guide/pulse
adding a new @classmethod to an existing classhttps://Github.com/realpython/python-guide/issues/1173#top
https://github.com/llevoc
llevochttps://github.com/llevoc
on Sep 19, 2025https://github.com/realpython/python-guide/issues/1173#issue-3435561894
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.