Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL.
user@host:~$ python -m asyncio
asyncio REPL 3.12.7 ...
Use "await" directly instead of "asyncio.run()".
>>> import asyncio
>>>
В этом режиме
- создаётся и настраивается event loop
- уже импортирован asyncio
- работает await на верхнем уровне
То есть такая команда сработает без ошибок!
await asyncio.sleep(3)
Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки.
Работает в: 3.8+
#tricks#async
Caramelized Shallots Pumpkin Pasta 🎃🍝
Recipe for 2 servings
Ingredients:
- 1/2 Hokkaido pumpkin 🎃
- 250 g pasta 🍝
- 250 g shallots 🧅
- Vegan butter for frying 🧈
- 25 ml maple syrup 🍁
- 100 g vegan cream cheese 🌱
- 300 ml vegetable stock 🥕🍲
- Pinch of salt and pepper 🧂
Toppings
- Parsley, chopped 🌿
Preparation:
1. Dice the pumpkin and blanch for 10 minutes 🍲
2. Cook the pasta 🍝
3. Fry the shallots in butter, add maple syrup for a caramelized touch 🍁🧅
4. Deglaze with vegetable stock, add the pumpkin, stir, and simmer briefly 🎃🍲
5. Stir in the cream cheese, then mix in the pasta 🌱🍝
6. Top with fresh parsley and enjoy! 🌿✨
#VeganPasta#PumpkinSeason#CaramelizedShallots#ComfortFood#FallRecipes#PlantBased#EasyMeals#Yummy#PastaNight
@dishes