René's URL Explorer Experiment


Title: Pydantic models config field by danicc097 · Pull Request #1538 · sqlc-dev/sqlc · GitHub

Open Graph Title: Pydantic models config field by danicc097 · Pull Request #1538 · sqlc-dev/sqlc

X Title: Pydantic models config field by danicc097 · Pull Request #1538 · sqlc-dev/sqlc

Description: Since dataclasses are the default since #939, I added an optional use_pydantic_models field to use Pydantic for all models (discussed since #923) which requires much less boilerplate later at least for my use case

Open Graph Description: Since dataclasses are the default since #939, I added an optional use_pydantic_models field to use Pydantic for all models (discussed since #923) which requires much less boilerplate later at least...

X Description: Since dataclasses are the default since #939, I added an optional use_pydantic_models field to use Pydantic for all models (discussed since #923) which requires much less boilerplate later at least...

Opengraph URL: https://github.com/sqlc-dev/sqlc/pull/1538

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ed58dac4-31fd-a880-78ac-05269a536bfe
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBBEA:3F8AB1:313B647:3E927AD:6B01B4EE
html-safe-nonce68c51db80dd7aee71c886d0f2600f548e32ba2e8a4061acb86495b822d706269
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkVBOjNGOEFCMTozMTNCNjQ3OjNFOTI3QUQ6NkIwMUI0RUUiLCJ2aXNpdG9yX2lkIjoiMTE5NjY4OTIxMTcxODIxODk5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac0d5e06a7b7a78c39cc348a3e80ba183ddbbc044f2210fb4c7a71a395ff3ef7a7
hovercard-subject-tagpull_request:905188282
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///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/sqlc-dev/sqlc/pull/1538/files
twitter:imagehttps://avatars.githubusercontent.com/u/71724149?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/71724149?s=400&v=4
og:image:altSince dataclasses are the default since #939, I added an optional use_pydantic_models field to use Pydantic for all models (discussed since #923) which requires much less boilerplate later at least...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git
octolytics-dimension-user_id136738596
octolytics-dimension-user_loginsqlc-dev
octolytics-dimension-repository_id193160679
octolytics-dimension-repository_nwosqlc-dev/sqlc
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id193160679
octolytics-dimension-repository_network_root_nwosqlc-dev/sqlc
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/sqlc-dev/sqlc/pull/1538/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fpull%2F1538%2Ffiles
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%2Fsqlc-dev%2Fsqlc%2Fpull%2F1538%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=sqlc-dev%2Fsqlc
Reloadhttps://github.com/sqlc-dev/sqlc/pull/1538/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/1538/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/1538/files
sqlc-devhttps://github.com/sqlc-dev
sqlchttps://github.com/sqlc-dev/sqlc
Codehttps://github.com/sqlc-dev/sqlc
Issues600 (600)https://github.com/sqlc-dev/sqlc/issues
Pull requests132 (132)https://github.com/sqlc-dev/sqlc/pulls
Discussionshttps://github.com/sqlc-dev/sqlc/discussions
Actionshttps://github.com/sqlc-dev/sqlc/actions
Projectshttps://github.com/sqlc-dev/sqlc/projects
Security and qualityhttps://github.com/sqlc-dev/sqlc/security
Insightshttps://github.com/sqlc-dev/sqlc/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fsqlc-dev%2Fsqlc%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc%2Fissues%2Fnew%2Fchoose
kyleconroyhttps://github.com/kyleconroy
sqlc-dev:mainhttps://github.com/sqlc-dev/sqlc/tree/main
danicc097:pydantic-models-config-fieldhttps://github.com/danicc097/sqlc/tree/pydantic-models-config-field
Conversation 6 https://github.com/sqlc-dev/sqlc/pull/1538
Commits 3 https://github.com/sqlc-dev/sqlc/pull/1538/commits
Checks 0 https://github.com/sqlc-dev/sqlc/pull/1538/checks
Files changed https://github.com/sqlc-dev/sqlc/pull/1538/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1538/files
Pydantic models config field https://github.com/sqlc-dev/sqlc/pull/1538/files#top
Show all changes 3 commits https://github.com/sqlc-dev/sqlc/pull/1538/files
48e7f3a add pydantic config field danicc097 Apr 10, 2022 https://github.com/sqlc-dev/sqlc/pull/1538/commits/48e7f3aa232b6f01b8e70586f2a6ae7f4becf428
14a1026 pydantic import plus test danicc097 Apr 10, 2022 https://github.com/sqlc-dev/sqlc/pull/1538/commits/14a1026f3b0c8238c7e6bddc05b7ae5a03c91fe3
ba7c9e2 update based on comments danicc097 Apr 11, 2022 https://github.com/sqlc-dev/sqlc/pull/1538/commits/ba7c9e243b8cd928966b103d3f168f186961b12e
Clear filters https://github.com/sqlc-dev/sqlc/pull/1538/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1538/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1538/files
.gitignore https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
shim.go https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
gen.go https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
imports.go https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-ec691f29985038d8622fe3e038f5ef9ea3dab8bde745df1a7a201d1e5a35b3e5
config.go https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-54c7c1af5fa8d5db4dc49f0e8e80e93ba2b1183ba4d5c9e2e5729e6deae6a3cd
__init__.py https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-8d4e8f69a190e259adecc61a4031567440bb5b59351ca850783f82a32eed3ee0
models.py https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-f3fa08324ab8638848e93a50688add994f4aeb1edac4667ff33f0ea5da9ace03
query.py https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-7098ca666c248543587ff53703e2246c11b1f24958bbecfa240e518ff289d9eb
query.sql https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-1cd14028e71fbf5f45527beef704bedef91a7f5b5789752d05b1a642c2a1f9f7
schema.sql https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-3289f2236263587a1ee21e447e76799b4160bc2c523a944ce661a142b1ee3e2a
sqlc.json https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-af627d7632e35a814232d39f3b53e9cb9e5b4826c77ba7cb511d2ebc00c7f170
codegen.pb.go https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-989ed321aa608b36a4c349345f3f959eae2b51c37d1f20099f1a0b6222dba995
codegen_vtproto.pb.go https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-36630ad8e458c172d3e42fd39d5bdbc9f7b068ba16f3a9415bd362bdc93d3593
codegen.proto https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-7bd827b9e5f70a79f2e832b726d22c7fd81735b254e86fa0e43147b46ae7b0c3
.gitignorehttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-bc37d034bad564583790a46f19d807abfe519c5671395fd494d8cce506c42947
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/.gitignore
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
internal/cmd/shim.gohttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/cmd/shim.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
internal/codegen/python/gen.gohttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/codegen/python/gen.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-4a1cf90ba2481aa2ceb7d4fa05de163b7af23afe883d14d85dac6f7bd031fe67
internal/codegen/python/imports.gohttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-ec691f29985038d8622fe3e038f5ef9ea3dab8bde745df1a7a201d1e5a35b3e5
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/codegen/python/imports.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-ec691f29985038d8622fe3e038f5ef9ea3dab8bde745df1a7a201d1e5a35b3e5
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-ec691f29985038d8622fe3e038f5ef9ea3dab8bde745df1a7a201d1e5a35b3e5
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-ec691f29985038d8622fe3e038f5ef9ea3dab8bde745df1a7a201d1e5a35b3e5
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-ec691f29985038d8622fe3e038f5ef9ea3dab8bde745df1a7a201d1e5a35b3e5
internal/config/config.gohttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-54c7c1af5fa8d5db4dc49f0e8e80e93ba2b1183ba4d5c9e2e5729e6deae6a3cd
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/config/config.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-54c7c1af5fa8d5db4dc49f0e8e80e93ba2b1183ba4d5c9e2e5729e6deae6a3cd
https://github.com/sqlc-dev/sqlc/pull/1538/files#diff-54c7c1af5fa8d5db4dc49f0e8e80e93ba2b1183ba4d5c9e2e5729e6deae6a3cd
internal/endtoend/testdata/emit_pydantic_models/postgresql/__init__.pyhttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-8d4e8f69a190e259adecc61a4031567440bb5b59351ca850783f82a32eed3ee0
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/endtoend/testdata/emit_pydantic_models/postgresql/__init__.py
Open in desktop https://desktop.github.com
internal/endtoend/testdata/emit_pydantic_models/postgresql/models.pyhttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-f3fa08324ab8638848e93a50688add994f4aeb1edac4667ff33f0ea5da9ace03
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/endtoend/testdata/emit_pydantic_models/postgresql/models.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
internal/endtoend/testdata/emit_pydantic_models/postgresql/query.pyhttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-7098ca666c248543587ff53703e2246c11b1f24958bbecfa240e518ff289d9eb
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
internal/endtoend/testdata/emit_pydantic_models/postgresql/query.sqlhttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-1cd14028e71fbf5f45527beef704bedef91a7f5b5789752d05b1a642c2a1f9f7
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/endtoend/testdata/emit_pydantic_models/postgresql/query.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
internal/endtoend/testdata/emit_pydantic_models/postgresql/schema.sqlhttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-3289f2236263587a1ee21e447e76799b4160bc2c523a944ce661a142b1ee3e2a
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/endtoend/testdata/emit_pydantic_models/postgresql/schema.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
internal/endtoend/testdata/emit_pydantic_models/sqlc.jsonhttps://github.com/sqlc-dev/sqlc/pull/1538/files#diff-af627d7632e35a814232d39f3b53e9cb9e5b4826c77ba7cb511d2ebc00c7f170
View file https://github.com/danicc097/sqlc/blob/ba7c9e243b8cd928966b103d3f168f186961b12e/internal/endtoend/testdata/emit_pydantic_models/sqlc.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1538/{{ revealButtonHref }}
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1538/files
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.