René's URL Explorer Experiment


Title: Asyncio example is completely wrong, update · Issue #988 · sendgrid/sendgrid-python · GitHub

Open Graph Title: Asyncio example is completely wrong, update · Issue #988 · sendgrid/sendgrid-python

X Title: Asyncio example is completely wrong, update · Issue #988 · sendgrid/sendgrid-python

Description: Issue Summary I'm talking about this example https://github.com/sendgrid/sendgrid-python/blob/main/use_cases/asynchronous_mail_send.md Steps to Reproduce Using asyncio is more than just putting async in front of the function doing the ht...

Open Graph Description: Issue Summary I'm talking about this example https://github.com/sendgrid/sendgrid-python/blob/main/use_cases/asynchronous_mail_send.md Steps to Reproduce Using asyncio is more than just putting asy...

X Description: Issue Summary I'm talking about this example https://github.com/sendgrid/sendgrid-python/blob/main/use_cases/asynchronous_mail_send.md Steps to Reproduce Using asyncio is more than just putting...

Opengraph URL: https://github.com/sendgrid/sendgrid-python/issues/988

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Asyncio example is completely wrong, update","articleBody":"### Issue Summary\r\nI'm talking about this example https://github.com/sendgrid/sendgrid-python/blob/main/use_cases/asynchronous_mail_send.md\r\n\r\n### Steps to Reproduce\r\nUsing asyncio is more than just putting `async` in front of the function doing the http request. In fact this is the completely wrong way to use `asyncio` and will actually destroys performance as this blocks the event loop from doing **any other work** while the http request is being made.\r\n\r\nTo use asyncio correctly the tcp socket sending the data must be using asyncio and one of the low level asyncio socket functions. https://docs.python.org/3/library/asyncio-stream.html These are awaited, allowing the event loop to do other work.\r\n\r\nWhat you have suggested is EXTREMELY bad practice and will stall the servers of anyone who uses it. This is why you can't use `requests` or `urllib` with asyncio. You have to use something like [aiohttp](https://docs.aiohttp.org/en/stable/).\r\n\r\nThe right way to use asyncio with your library is to run it in a [thread pool executor](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor) so that the blocking IO stays off the main thread.\r\n\r\nYou would be better off deleting that example than keeping it in it's current form.","author":{"url":"https://github.com/agronick","@type":"Person","name":"agronick"},"datePublished":"2021-04-26T18:41:08Z","url":"https://github.com/sendgrid/sendgrid-python/issues/988"}

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:f60c3c42-3667-0859-e7a3-57933cff45d8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA766:3A73AA:275B5E0:31F06C2:6B01D11B
html-safe-noncece73b06002855b6a33782f8bbad71da7acdfc15169d36944cfd989ed9c4c70e3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzY2OjNBNzNBQToyNzVCNUUwOjMxRjA2QzI6NkIwMUQxMUIiLCJ2aXNpdG9yX2lkIjoiNDc1NjAxNjQ3NjM1NDM2Nzc3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7b7b53b3bbfd29b68f0fdc0cbd2e7e7bb48ebaf77a080aafd8b2961738be2868
hovercard-subject-tagissue:868009281
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/sendgrid/sendgrid-python/988/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0264c849de21dc207fd74e12d9ef6aadd6f74efb75ee32a78d6338555a27f8a9/sendgrid/sendgrid-python/issues/988
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0264c849de21dc207fd74e12d9ef6aadd6f74efb75ee32a78d6338555a27f8a9/sendgrid/sendgrid-python/issues/988
og:image:altIssue Summary I'm talking about this example https://github.com/sendgrid/sendgrid-python/blob/main/use_cases/asynchronous_mail_send.md Steps to Reproduce Using asyncio is more than just putting asy...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameagronick
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/sendgrid/sendgrid-python git https://github.com/sendgrid/sendgrid-python.git
octolytics-dimension-user_id181234
octolytics-dimension-user_loginsendgrid
octolytics-dimension-repository_id3546794
octolytics-dimension-repository_nwosendgrid/sendgrid-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3546794
octolytics-dimension-repository_network_root_nwosendgrid/sendgrid-python
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/sendgrid/sendgrid-python/issues/988#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsendgrid%2Fsendgrid-python%2Fissues%2F988
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%2Fsendgrid%2Fsendgrid-python%2Fissues%2F988
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=sendgrid%2Fsendgrid-python
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/988
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/988
Reloadhttps://github.com/sendgrid/sendgrid-python/issues/988
sendgridhttps://github.com/sendgrid
sendgrid-pythonhttps://github.com/sendgrid/sendgrid-python
Codehttps://github.com/sendgrid/sendgrid-python
Issues50 (50)https://github.com/sendgrid/sendgrid-python/issues
Pull requests17 (17)https://github.com/sendgrid/sendgrid-python/pulls
Actionshttps://github.com/sendgrid/sendgrid-python/actions
Security and qualityhttps://github.com/sendgrid/sendgrid-python/security
Insightshttps://github.com/sendgrid/sendgrid-python/insights
https://github.com/sendgrid/sendgrid-python
New issuehttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/988
New issuehttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/988
#1094https://github.com/sendgrid/sendgrid-python/pull/1094
Asyncio example is completely wrong, updatehttps://github.com/sendgrid/sendgrid-python/issues/988#top
#1094https://github.com/sendgrid/sendgrid-python/pull/1094
status: help wantedrequesting help from the communityhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22status%3A%20help%20wanted%22
type: community enhancementfeature request not on Twilio's roadmaphttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22type%3A%20community%20enhancement%22
https://github.com/agronick
agronickhttps://github.com/agronick
on Apr 26, 2021https://github.com/sendgrid/sendgrid-python/issues/988#issue-868009281
https://github.com/sendgrid/sendgrid-python/blob/main/use_cases/asynchronous_mail_send.mdhttps://github.com/sendgrid/sendgrid-python/blob/main/use_cases/asynchronous_mail_send.md
https://docs.python.org/3/library/asyncio-stream.htmlhttps://docs.python.org/3/library/asyncio-stream.html
aiohttphttps://docs.aiohttp.org/en/stable/
thread pool executorhttps://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor
thinkingserioushttps://github.com/thinkingserious
on Apr 27, 2021https://github.com/sendgrid/sendgrid-python/issues/988#event-4652839674
https://github.com/thinkingserious
thinkingserioushttps://github.com/thinkingserious
on Apr 27, 2021https://github.com/sendgrid/sendgrid-python/issues/988#issuecomment-827883752
@agronickhttps://github.com/agronick
IMPROVEMENT: Support for asynchronous sending #296https://github.com/sendgrid/sendgrid-python/issues/296
Add support for Proxies #409https://github.com/sendgrid/sendgrid-python/issues/409
Asynchronous Mail Send example added to USE_CASES.md #363https://github.com/sendgrid/sendgrid-python/pull/363
docs: fix asynchronous_mail_send #953https://github.com/sendgrid/sendgrid-python/pull/953
thinkingserioushttps://github.com/thinkingserious
status: help wantedrequesting help from the communityhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22status%3A%20help%20wanted%22
type: community enhancementfeature request not on Twilio's roadmaphttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22type%3A%20community%20enhancement%22
on Apr 27, 2021https://github.com/sendgrid/sendgrid-python/issues/988#event-4652862970
https://github.com/agronick
agronickhttps://github.com/agronick
on Apr 28, 2021https://github.com/sendgrid/sendgrid-python/issues/988#issuecomment-828606221
#953https://github.com/sendgrid/sendgrid-python/pull/953
https://github.com/parikls
pariklshttps://github.com/parikls
on Sep 24, 2021https://github.com/sendgrid/sendgrid-python/issues/988#issuecomment-926400668
https://github.com/dacevedo12
dacevedo12https://github.com/dacevedo12
on May 30, 2024https://github.com/sendgrid/sendgrid-python/issues/988#issuecomment-2139503417
https://github.com/urbanonymous
urbanonymoushttps://github.com/urbanonymous
on Jun 1, 2024https://github.com/sendgrid/sendgrid-python/issues/988#issuecomment-2143535417
e-carlinhttps://github.com/e-carlin
on Oct 30, 2024https://github.com/sendgrid/sendgrid-python/issues/988#event-14994716004
Fix sendgrid#988: Remove async examplehttps://github.com/e-carlin/sendgrid-python/commit/01369550de11e051c6f0ba3d1429fd7ea292cf0b
sendgrid#988https://github.com/sendgrid/sendgrid-python/issues/988
https://docs.github.com/articles/closing-issues-via-commit-messages
0136955https://github.com/e-carlin/sendgrid-python/commit/01369550de11e051c6f0ba3d1429fd7ea292cf0b
https://github.com/RobertoPrevato
RobertoPrevatohttps://github.com/RobertoPrevato
on Apr 10, 2025https://github.com/sendgrid/sendgrid-python/issues/988#issuecomment-2794847275
@agronickhttps://github.com/agronick
@urbanonymoushttps://github.com/urbanonymous
httpxhttps://www.python-httpx.org/async/
https://www.python-httpx.org/advanced/clients/#why-use-a-clienthttps://www.python-httpx.org/advanced/clients/#why-use-a-client
Ryan Dahl: Original Node.js presentationhttps://youtu.be/ztspvPYybIY?si=dry8TgKk4SFvv3zP
Sign up for freehttps://github.com/signup?return_to=https://github.com/sendgrid/sendgrid-python/issues/988
Sign in to commenthttps://github.com/login?return_to=https://github.com/sendgrid/sendgrid-python/issues/988
status: help wantedrequesting help from the communityhttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22status%3A%20help%20wanted%22
type: community enhancementfeature request not on Twilio's roadmaphttps://github.com/sendgrid/sendgrid-python/issues?q=state%3Aopen%20label%3A%22type%3A%20community%20enhancement%22
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.