René's URL Explorer Experiment


Title: Add fk_as_int option to get_pydantic() by iron3oxide · Pull Request #893 · ormar-orm/ormar · GitHub

Open Graph Title: Add fk_as_int option to get_pydantic() by iron3oxide · Pull Request #893 · ormar-orm/ormar

X Title: Add fk_as_int option to get_pydantic() by iron3oxide · Pull Request #893 · ormar-orm/ormar

Description: python async orm with fastapi in mind and pydantic validation - Add fk_as_int option to get_pydantic() by iron3oxide · Pull Request #893 · ormar-orm/ormar

Open Graph Description: This allows to create pydantic models that contain the FK ID instead of the full related model for each field specified in fk_as_int. To see why this can be useful, check #343. Unfortunately I didn...

X Description: This allows to create pydantic models that contain the FK ID instead of the full related model for each field specified in fk_as_int. To see why this can be useful, check #343. Unfortunately I didn...

Opengraph URL: https://github.com/ormar-orm/ormar/pull/893

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:cc456b09-768b-dd3d-5332-21d76b888f03
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id81BA:277986:23AA40:2FD033:6A52575F
html-safe-nonce7278ae64caadc129465ad7c9b615399cd36ea4dccfd6be11b448141cddc53d71
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUJBOjI3Nzk4NjoyM0FBNDA6MkZEMDMzOjZBNTI1NzVGIiwidmlzaXRvcl9pZCI6IjE4MzMzNzkyMTgxMTQ4OTM2NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6eec6e4b4ff2803d781501b50c0e5b43bea90d109fd2b1cfcc6af4ebc034ac19
hovercard-subject-tagpull_request:1096678819
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/ormar-orm/ormar/893/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/1380e3152e4d8bb1efbe7b53904eba54d916536805395f8119dfb5919f285bc2/ormar-orm/ormar/pull/893
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1380e3152e4d8bb1efbe7b53904eba54d916536805395f8119dfb5919f285bc2/ormar-orm/ormar/pull/893
og:image:altThis allows to create pydantic models that contain the FK ID instead of the full related model for each field specified in fk_as_int. To see why this can be useful, check #343. Unfortunately I didn...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameiron3oxide
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-cache
go-importgithub.com/ormar-orm/ormar git https://github.com/ormar-orm/ormar.git
octolytics-dimension-user_id264436798
octolytics-dimension-user_loginormar-orm
octolytics-dimension-repository_id284405810
octolytics-dimension-repository_nwoormar-orm/ormar
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id284405810
octolytics-dimension-repository_network_root_nwoormar-orm/ormar
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
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ormar-orm/ormar/pull/893#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Formar-orm%2Formar%2Fpull%2F893
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
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%2Formar-orm%2Formar%2Fpull%2F893
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%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=ormar-orm%2Formar
Reloadhttps://github.com/ormar-orm/ormar/pull/893
Reloadhttps://github.com/ormar-orm/ormar/pull/893
Reloadhttps://github.com/ormar-orm/ormar/pull/893
Please reload this pagehttps://github.com/ormar-orm/ormar/pull/893
ormar-orm https://github.com/ormar-orm
ormarhttps://github.com/ormar-orm/ormar
Please reload this pagehttps://github.com/ormar-orm/ormar/pull/893
Notifications https://github.com/login?return_to=%2Formar-orm%2Formar
Fork 97 https://github.com/login?return_to=%2Formar-orm%2Formar
Star 1.8k https://github.com/login?return_to=%2Formar-orm%2Formar
Code https://github.com/ormar-orm/ormar
Issues 32 https://github.com/ormar-orm/ormar/issues
Pull requests 4 https://github.com/ormar-orm/ormar/pulls
Discussions https://github.com/ormar-orm/ormar/discussions
Actions https://github.com/ormar-orm/ormar/actions
Projects https://github.com/ormar-orm/ormar/projects
Security and quality 2 https://github.com/ormar-orm/ormar/security
Insights https://github.com/ormar-orm/ormar/pulse
Code https://github.com/ormar-orm/ormar
Issues https://github.com/ormar-orm/ormar/issues
Pull requests https://github.com/ormar-orm/ormar/pulls
Discussions https://github.com/ormar-orm/ormar/discussions
Actions https://github.com/ormar-orm/ormar/actions
Projects https://github.com/ormar-orm/ormar/projects
Security and quality https://github.com/ormar-orm/ormar/security
Insights https://github.com/ormar-orm/ormar/pulse
iron3oxidehttps://github.com/iron3oxide
ormar-orm:masterhttps://github.com/ormar-orm/ormar/tree/master
iron3oxide:masterhttps://github.com/iron3oxide/ormar/tree/master
Conversationhttps://github.com/ormar-orm/ormar/pull/893
Commits8 (8)https://github.com/ormar-orm/ormar/pull/893/commits
Checkshttps://github.com/ormar-orm/ormar/pull/893/checks
Files changedhttps://github.com/ormar-orm/ormar/pull/893/files
Add fk_as_int option to get_pydantic()https://github.com/ormar-orm/ormar/pull/893#top
iron3oxidehttps://github.com/iron3oxide
ormar-orm:masterhttps://github.com/ormar-orm/ormar/tree/master
iron3oxide:masterhttps://github.com/iron3oxide/ormar/tree/master
https://github.com/iron3oxide
iron3oxidehttps://github.com/iron3oxide
Oct 23, 2022https://github.com/ormar-orm/ormar/pull/893#issue-1419922634
#343https://github.com/ormar-orm/ormar/issues/343
Please reload this pagehttps://github.com/ormar-orm/ormar/pull/893
October 23, 2022 02:08https://github.com/ormar-orm/ormar/pull/893#commits-pushed-8b55479
feat(get_pydantic): Add option to have related fields as ID/PositiveI…https://github.com/ormar-orm/ormar/pull/893/commits/8b554792d8545de5ca64edb82234f928d5396a4f
8b55479https://github.com/ormar-orm/ormar/pull/893/commits/8b554792d8545de5ca64edb82234f928d5396a4f
ormar-orm#343https://github.com/ormar-orm/ormar/issues/343
test: Add test for fk_as_int optionhttps://github.com/ormar-orm/ormar/pull/893/commits/d1eede1a07e6b7ed6ba19cf77300f483a911899f
d1eede1https://github.com/ormar-orm/ormar/pull/893/commits/d1eede1a07e6b7ed6ba19cf77300f483a911899f
feat(get_pydantic): Add support for (once) nested fk_as_inthttps://github.com/ormar-orm/ormar/pull/893/commits/b3cffc27aa0724e78089f8692401b0c45fed3cd6
b3cffc2https://github.com/ormar-orm/ormar/pull/893/commits/b3cffc27aa0724e78089f8692401b0c45fed3cd6
refactor: Restructure handling of fk_as_inthttps://github.com/ormar-orm/ormar/pull/893/commits/1538172f08e89aa70d839d2dbbeb7e971629e6ea
1538172https://github.com/ormar-orm/ormar/pull/893/commits/1538172f08e89aa70d839d2dbbeb7e971629e6ea
test: Adapt tests to nested supporthttps://github.com/ormar-orm/ormar/pull/893/commits/b3591abd8d215aa91fe162fe52003a49f2936d6b
b3591abhttps://github.com/ormar-orm/ormar/pull/893/commits/b3591abd8d215aa91fe162fe52003a49f2936d6b
docs: Add documentation for fk_as_int parameterhttps://github.com/ormar-orm/ormar/pull/893/commits/666a1de797a0a0d91ca2f7baa5479af971e6756f
666a1dehttps://github.com/ormar-orm/ormar/pull/893/commits/666a1de797a0a0d91ca2f7baa5479af971e6756f
https://github.com/collerek
Merge branch 'master' into masterhttps://github.com/ormar-orm/ormar/pull/893/commits/e91f53b47cd10f6b4bcf6d75ae53d5f1f43c8fbc
e91f53bhttps://github.com/ormar-orm/ormar/pull/893/commits/e91f53b47cd10f6b4bcf6d75ae53d5f1f43c8fbc
https://github.com/codecov-commenter
codecov-commenterhttps://github.com/codecov-commenter
Apr 2, 2023https://github.com/ormar-orm/ormar/pull/893#issuecomment-1493284119
Please reload this pagehttps://github.com/ormar-orm/ormar/pull/893
Codecovhttps://app.codecov.io/gh/collerek/ormar/pull/893?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None
#893https://app.codecov.io/gh/collerek/ormar/pull/893?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None
b36f055https://github.com/ormar-orm/ormar/commit/b36f05547cfb2e948153ad5a550c8473045c1d5d
masterhttps://app.codecov.io/gh/collerek/ormar/commit/40c3b3d723e8be7a1e8313690df1b29f11125267?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None
40c3b3dhttps://github.com/ormar-orm/ormar/commit/40c3b3d723e8be7a1e8313690df1b29f11125267
Codecov GitHub apphttps://github.com/apps/codecov/installations/select_target
https://app.codecov.io/gh/collerek/ormar/pull/893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None
Fileshttps://app.codecov.io/gh/collerek/ormar/pull/893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None
ormar/models/mixins/pydantic_mixin.pyhttps://app.codecov.io/gh/collerek/ormar/pull/893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-b3JtYXIvbW9kZWxzL21peGlucy9weWRhbnRpY19taXhpbi5weQ==
...ts/test_fastapi/test_excludes_with_get_pydantic.pyhttps://app.codecov.io/gh/collerek/ormar/pull/893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-dGVzdHMvdGVzdF9mYXN0YXBpL3Rlc3RfZXhjbHVkZXNfd2l0aF9nZXRfcHlkYW50aWMucHk=
...ydantic_generation/test_getting_pydantic_models.pyhttps://app.codecov.io/gh/collerek/ormar/pull/893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-dGVzdHMvdGVzdF9pbmhlcml0YW5jZV9hbmRfcHlkYW50aWNfZ2VuZXJhdGlvbi90ZXN0X2dldHRpbmdfcHlkYW50aWNfbW9kZWxzLnB5
Please reload this pagehttps://github.com/ormar-orm/ormar/pull/893
https://github.com/collerek
Merge branch 'master' into masterhttps://github.com/ormar-orm/ormar/pull/893/commits/b36f05547cfb2e948153ad5a550c8473045c1d5d
b36f055https://github.com/ormar-orm/ormar/pull/893/commits/b36f05547cfb2e948153ad5a550c8473045c1d5d
https://github.co/hiddenchars
https://github.com/ormar-orm/ormar/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Formar-orm%2Formar%2Fpull%2F893
Please reload this pagehttps://github.com/ormar-orm/ormar/pull/893
https://github.com/iron3oxide
https://github.com/codecov-commenter
https://github.com/collerek
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.