René's URL Explorer Experiment


Title: GitHub - dfesalbon-python/fastapi-best-practices: FastAPI Best Practices and Conventions we used @ hi.peerlink.me

Open Graph Title: GitHub - dfesalbon-python/fastapi-best-practices: FastAPI Best Practices and Conventions we used @ hi.peerlink.me

X Title: GitHub - dfesalbon-python/fastapi-best-practices: FastAPI Best Practices and Conventions we used @ hi.peerlink.me

Description: FastAPI Best Practices and Conventions we used @ hi.peerlink.me - dfesalbon-python/fastapi-best-practices

Open Graph Description: FastAPI Best Practices and Conventions we used @ hi.peerlink.me - dfesalbon-python/fastapi-best-practices

X Description: FastAPI Best Practices and Conventions we used @ hi.peerlink.me - dfesalbon-python/fastapi-best-practices

Opengraph URL: https://github.com/dfesalbon-python/fastapi-best-practices

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:8ebf48f4-35bc-7d8a-f98e-0aeb1a3950f4
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-idDB22:BF1F6:216D9C:2A61B4:698FF274
html-safe-noncea9406955eee61e0c8f2dcca4b50c70a6c4a574e70a7f11677391c71c7f0571d8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjIyOkJGMUY2OjIxNkQ5QzoyQTYxQjQ6Njk4RkYyNzQiLCJ2aXNpdG9yX2lkIjoiMTY1NDM0NTE2NDIyNTc3MDEwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca1a12d7c050da94ed050ec7392d09111c2ba88a1fa5cc98e78c2151cad595ced
hovercard-subject-tagrepository:620773609
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location//
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/dfesalbon-python/fastapi-best-practices
twitter:imagehttps://opengraph.githubassets.com/9505bc5528a5fdbea4c1fe0f77308bcd4169109eafb8e2e4d9dd134eb2e55536/dfesalbon-python/fastapi-best-practices
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9505bc5528a5fdbea4c1fe0f77308bcd4169109eafb8e2e4d9dd134eb2e55536/dfesalbon-python/fastapi-best-practices
og:image:altFastAPI Best Practices and Conventions we used @ hi.peerlink.me - dfesalbon-python/fastapi-best-practices
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
go-importgithub.com/dfesalbon-python/fastapi-best-practices git https://github.com/dfesalbon-python/fastapi-best-practices.git
octolytics-dimension-user_id107386135
octolytics-dimension-user_logindfesalbon-python
octolytics-dimension-repository_id620773609
octolytics-dimension-repository_nwodfesalbon-python/fastapi-best-practices
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id522822986
octolytics-dimension-repository_parent_nwozhanymkanov/fastapi-best-practices
octolytics-dimension-repository_network_root_id522822986
octolytics-dimension-repository_network_root_nwozhanymkanov/fastapi-best-practices
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
release3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdfesalbon-python%2Ffastapi-best-practices
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdfesalbon-python%2Ffastapi-best-practices
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=dfesalbon-python%2Ffastapi-best-practices
Reloadhttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices
Reloadhttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices
Reloadhttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices
dfesalbon-python https://patch-diff.githubusercontent.com/dfesalbon-python
fastapi-best-practiceshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices
zhanymkanov/fastapi-best-practiceshttps://patch-diff.githubusercontent.com/zhanymkanov/fastapi-best-practices
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fdfesalbon-python%2Ffastapi-best-practices
Fork 0 https://patch-diff.githubusercontent.com/login?return_to=%2Fdfesalbon-python%2Ffastapi-best-practices
Star 0 https://patch-diff.githubusercontent.com/login?return_to=%2Fdfesalbon-python%2Ffastapi-best-practices
0 stars https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/stargazers
1.2k forks https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/forks
Branches https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/branches
Tags https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/tags
Activity https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/activity
Star https://patch-diff.githubusercontent.com/login?return_to=%2Fdfesalbon-python%2Ffastapi-best-practices
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fdfesalbon-python%2Ffastapi-best-practices
Code https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices
Pull requests 0 https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/pulls
Actions https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/actions
Projects 0 https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/projects
Security 0 https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/security
Insights https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/pulse
Code https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices
Pull requests https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/pulls
Actions https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/actions
Projects https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/projects
Security https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/security
Insights https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/pulse
Brancheshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/branches
Tagshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/tags
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/branches
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/tags
47 Commitshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/commits/master/
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/commits/master/
imageshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/tree/master/images
imageshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/tree/master/images
README.mdhttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/blob/master/README.md
README.mdhttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/blob/master/README.md
READMEhttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#fastapi-best-practices
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#contents
Project Structure. Consistent & predictable.https://github.com/zhanymkanov/fastapi-best-practices#1-project-structure-consistent--predictable
Excessively use Pydantic for data validation.https://github.com/zhanymkanov/fastapi-best-practices#2-excessively-use-pydantic-for-data-validation
Use dependencies for data validation vs DB.https://github.com/zhanymkanov/fastapi-best-practices#3-use-dependencies-for-data-validation-vs-db
Chain dependencies.https://github.com/zhanymkanov/fastapi-best-practices#4-chain-dependencies
Decouple & Reuse dependencies. Dependency calls are cached.https://github.com/zhanymkanov/fastapi-best-practices#5-decouple--reuse-dependencies-dependency-calls-are-cached
Follow the REST.https://github.com/zhanymkanov/fastapi-best-practices#6-follow-the-rest
Don't make your routes async, if you have only blocking I/O operations.https://github.com/zhanymkanov/fastapi-best-practices#7-dont-make-your-routes-async-if-you-have-only-blocking-io-operations
Custom base model from day 0.https://github.com/zhanymkanov/fastapi-best-practices#8-custom-base-model-from-day-0
Docs.https://github.com/zhanymkanov/fastapi-best-practices#9-docs
Use Pydantic's BaseSettings for configs.https://github.com/zhanymkanov/fastapi-best-practices#10-use-pydantics-basesettings-for-configs
SQLAlchemy: Set DB keys naming convention.https://github.com/zhanymkanov/fastapi-best-practices#11-sqlalchemy-set-db-keys-naming-convention
Migrations. Alembic.https://github.com/zhanymkanov/fastapi-best-practices#12-migrations-alembic
Set DB naming convention.https://github.com/zhanymkanov/fastapi-best-practices#13-set-db-naming-convention
Set tests client async from day 0.https://github.com/zhanymkanov/fastapi-best-practices#14-set-tests-client-async-from-day-0
BackgroundTasks > asyncio.create_task.https://github.com/zhanymkanov/fastapi-best-practices#15-backgroundtasks--asynciocreate_task
Typing is important.https://github.com/zhanymkanov/fastapi-best-practices#16-typing-is-important
Save files in chunks.https://github.com/zhanymkanov/fastapi-best-practices#17-save-files-in-chunks
Be careful with dynamic pydantic fields.https://github.com/zhanymkanov/fastapi-best-practices#18-be-careful-with-dynamic-pydantic-fields
SQL-first, Pydantic-second.https://github.com/zhanymkanov/fastapi-best-practices#19-sql-first-pydantic-second
Validate hosts, if users can send publicly available URLs.https://github.com/zhanymkanov/fastapi-best-practices#20-validate-hosts-if-users-can-send-publicly-available-urls
Raise a ValueError in custom pydantic validators, if schema directly faces the client.https://github.com/zhanymkanov/fastapi-best-practices#21-raise-a-valueerror-in-custom-pydantic-validators-if-schema-directly-faces-the-client
Don't forget FastAPI converts Response Pydantic Object...https://github.com/zhanymkanov/fastapi-best-practices#22-dont-forget-fastapi-converts-response-pydantic-object-to-dict-then-to-an-instance-of-responsemodel-then-to-dict-then-to-json
If you must use sync SDK, then run it in a thread pool.https://github.com/zhanymkanov/fastapi-best-practices#23-if-you-must-use-sync-sdk-then-run-it-in-a-thread-pool
Use linters (black, isort, autoflake).https://github.com/zhanymkanov/fastapi-best-practices#24-use-linters-black-isort-autoflake
Bonus Section.https://github.com/zhanymkanov/fastapi-best-practices#bonus-section
samplehttps://github.com/zhanymkanov/fastapi_production_template
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#1-project-structure-consistent--predictable
@tiangolohttps://github.com/tiangolo
Dispatchhttps://github.com/Netflix/dispatch
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#2-excessively-use-pydantic-for-data-validation
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#3-use-dependencies-for-data-validation-vs-db
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#4-chain-dependencies
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#5-decouple--reuse-dependencies-dependency-calls-are-cached
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#6-follow-the-rest
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#7-dont-make-your-routes-async-if-you-have-only-blocking-io-operations
effectively handlehttps://fastapi.tiangolo.com/async/#path-operation-functions
threadpoolhttps://en.wikipedia.org/wiki/Thread_pool
event loophttps://docs.python.org/3/library/asyncio-eventloop.html
GILhttps://realpython.com/python-gil/
https://stackoverflow.com/questions/62976648/architecture-flask-vs-fastapi/70309597#70309597https://stackoverflow.com/questions/62976648/architecture-flask-vs-fastapi/70309597#70309597
my answerhttps://stackoverflow.com/a/70309597/6927498
https://stackoverflow.com/questions/65342833/fastapi-uploadfile-is-slow-compared-to-flaskhttps://stackoverflow.com/questions/65342833/fastapi-uploadfile-is-slow-compared-to-flask
https://stackoverflow.com/questions/71516140/fastapi-runs-api-calls-in-serial-instead-of-parallel-fashionhttps://stackoverflow.com/questions/71516140/fastapi-runs-api-calls-in-serial-instead-of-parallel-fashion
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#8-custom-base-model-from-day-0
orjsonhttps://github.com/ijl/orjson
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#9-docs
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/blob/master/images/custom_responses.png
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#10-use-pydantics-basesettings-for-configs
powerful toolhttps://pydantic-docs.helpmanual.io/usage/settings/
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#11-sqlalchemy-set-db-keys-naming-convention
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#12-migrations-alembic
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#13-set-db-naming-convention
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#14-set-tests-client-async-from-day-0
async_asgi_testclienthttps://github.com/vinissimus/async-asgi-testclient
httpxhttps://github.com/encode/starlette/issues/652
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#15-backgroundtasks--asynciocreate_task
effectively runhttps://github.com/encode/starlette/blob/31164e346b9bd1ce17d968e1301c3bb2c23bb418/starlette/background.py#L25
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#16-typing-is-important
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/blob/master/images/type_hintsless.png
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/blob/master/images/type_hints.png
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#17-save-files-in-chunks
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#18-be-careful-with-dynamic-pydantic-fields
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#19-sql-first-pydantic-second
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#20-validate-hosts-if-users-can-send-publicly-available-urls
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#21-raise-a-valueerror-in-custom-pydantic-validators-if-schema-directly-faces-the-client
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/blob/master/images/custom_bad_response.png
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#22-dont-forget-fastapi-converts-response-pydantic-object-to-dict-then-to-an-instance-of-responsemodel-then-to-dict-then-to-json
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#23-if-you-must-use-sync-sdk-then-run-it-in-a-thread-pool
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#24-use-linters-black-isort-autoflake
https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#bonus-section
issueshttps://github.com/zhanymkanov/fastapi-best-practices/issues
lowercase00https://github.com/zhanymkanov/fastapi-best-practices/issues/4
Readme https://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices#readme-ov-file
Please reload this pagehttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices
Activityhttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/activity
Custom propertieshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/custom-properties
0 starshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/stargazers
0 watchinghttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/watchers
0 forkshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/forks
Report repository https://patch-diff.githubusercontent.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fdfesalbon-python%2Ffastapi-best-practices&report=dfesalbon-python+%28user%29
Releaseshttps://patch-diff.githubusercontent.com/dfesalbon-python/fastapi-best-practices/releases
Packages 0https://patch-diff.githubusercontent.com/orgs/dfesalbon-python/packages?repo_name=fastapi-best-practices
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.