Django Expert
9.73K subscribers
991 photos
81 videos
111 files
1.34K links
✔️ بزرگترین کانال و جامعه جنگو به فارسی
Contact:
@majid_aghamohamad
@BobyCloud

Group:
@DjangoIR

Our Site ;coming soon:
🔜 PyExpert.ir

تبلیغات نداریم فقط درج آگهی های استخدامی مرتبط پذیرفته می‌شود
Download Telegram
#python #async #asyncio #perfomance #asynchronous


asynchronously create and manage subprocesses in python, from spawning to streaming stdin, stdout and etc...


This document describes high-level async/await asyncio APIs to create and manage subprocesses.
https://docs.python.org/3/library/asyncio-subprocess.html

Streaming subprocess stdin and stdout with asyncio in Python
https://kevinmccarthy.org/2016/07/25/streaming-subprocess-stdin-and-stdout-with-asyncio-in-python/

〰️〰️〰️〰️〰️
©️ @DjangoEx
pyee supplies a EventEmitter object that is similar to the EventEmitter class from Node.js. It also supplies a number of subclasses with added support for async and threaded programming in python, such as async/await as seen in python 3.5+.

https://github.com/jfhbrook/pyee
https://pyee.readthedocs.io/en/latest/

#python #node #eventdriven #eventdrivenprogramming #asynchronous #async #asyncio

〰️〰️〰️〰️〰️〰️
©@DjangoEx
با استفاده از کلاس asyncio.Queue میتونید بین Task های برنامه ی async اتون ارتباط برقرار کنید، برای مثال وظیفه (Task) A یک عملیاتی رو انجام میده و نتیجش رو از طریق یک Queue داخل اپلیکیشن به Task دیگری میفرسته و توی Task دیگه روی اون دیتا عملیات دیگه ای انجام بشه، یک Code Snippet از استفاده ی ابتدایی این قابلیت رو توی عکس و فایل بعدی میتونید ببینید.

asyncio queues are designed to be similar to classes of the queue module. Although asyncio queues are not thread-safe, they are designed to be used specifically in async/await code.

https://docs.python.org/3/library/asyncio-queue.html

#python #queue #asyncio #async #datastructure #منهای_جنگو

Thanks to: @geeky_career

〰️〰️〰️〰️〰️〰️
©@DjangoEx
✔️ قابلیت async/await که از پایتون 3.4 به بعد ارائه می‌شه، پرفورمنس اپلیکیشن‌هارو بخصوص در عملیاتی از نوع I/O مثل برنامه‌نویسی شبکه و کار با فایل افزایش می‌ده. در ادامه آدرس دو تا مخزن گیت‌هاب شامل فهرست کتابخانه‌های مفید که تحت async/wait و asyncio کار می‌کنن اومده:

https://github.com/aio-libs
https://github.com/timofurrer/awesome-asyncio

اگر با مفهوم و کاربرد asynchronous programming آشنا نیستید خوندن کتاب
Using Asyncio in Python: Understanding Python's Asynchronous Programming Features (2020)
و تماشا/شنیدن کنفرانس‌های آقای David Beazley رو پیشنهاد می‌کنم.

‌#asynchronous #asyncio #python
〰️〰️〰️〰️〰️〰️
© @DjangoEx
✔️ در این ویدئو صحبت مختصری داشتم درباره برنامه‌نویسی async و وب‌فریم‌ورک‌های تحت asgi و همچنین ویژگی‌های این نوع وب‌اپلیکیشن‌ها

https://youtu.be/Megs9Z0t2bA

#python #asgi #asyncio
〰️〰️〰️〰️〰️〰️〰️
© @DjangoEx
✔️ شنای کرال با Asyncio (توضیح مفهوم async/await در پایتون)

در این ویدئو سعی کردم اول از همه مفاهیم parallel و concurrent رو توضیح بدم و بعد درباره مدل برنامه‌نویسی‌ async و ابزار asyncio صحبت کنم.
ویدئوهای بعدی پروژه download manager و e2e encryption chat با asyncio خواهد بود.

🌐 https://youtu.be/ovhR0p16VDw

#python #asyncio
〰️〰️〰️〰️〰️〰️
© @DjangoEx
✔️ قول داده بودم یک سه‌گانه ویدئو از Asyncio ضبط کنم که دو تا پروژه عملی داشته باشه. این بخش دوم است که نحوه پیاده‌سازی یک دانلود منیجر کاملا async رو توضیح دادم.

https://youtu.be/_7tzJmmmM8A

#asyncio #download_manager
〰️〰️〰️〰️〰️
© @DjangoEx