Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
•
a town belongs to a state
or land
land can be long
there can be no end to it
it belongs to everything
and to no thing at all
et al. belongs to the bay
the bay belongs to a babe
a baby belongs to a womb
a bomb belongs to an atom
an atom cannot be split
split can go w banana
and belongs in gymnastics
anastasia is nasty
stanislav exercises stas
all four may be slavs
they can turn skin
and go on all fours
for a town to be a stadt
you need statistics
it belongs to those counting
ticks count as small
having an impact on people
people account for many
a mayor is in town
a town sticks to a state
someone states
#poems
•
rejection is hot says meeno dot com
how abt injection
can u inject eng w prefixes
how will it react
will it act on them
response is better than reaction
does a prefix come prior to a jour fixe
will it suffice fixing yr jour
journaling helps
to keep elves out
elevate yr downfall
am in free fall
infantile laces
sind auch alle
#poems
•
at this point i am pointless
at this пон то рез
at this резкость i am костный мозг
at this spite i am inspired
in time i am postponed
at this pine i am coned
at this coin i am поночка
at this скрюченная ночка
at this scrooge dagobert
at this operation covert
at this под ковер
подкаверзный вопрос
at this почему у тебя красный нос
at this наносной наземный
at our emblem
at krieg pro blaming
in crease ad hominem
#poems
•
what’s yr oral formal L
what’s yr baby formula
what’s yr дать фору
what’s yr forever L
what’s yr again
what will u gain
what will u grab orally
what’s w this race
what’s in the bag
a bang to abandon
what will u construct
stay w a distraction
instruct yr trans-parent
trans lang
trans atlant
yr нюни to nanny
yr mire в мир
#poems
•
do u wear yr tampon
do u wear yourself out
do u wear yr tampon out
r u weary of yr sentence
do u wear yr body
how long will it serve yr tampon
how long will u face those
who are weary of who u r
r u listening to yr tampon
is it there to communicate
what about community
is it a collection of mutinies
and mutenesses
what do they have to say
should u avoid speaking in tampon
or avoid yr tongue
i am here to wipe yr нюни
your nanny English
то бишь Gibberish?
its about how u use yr sentence
its about sentencing yourself to power
of expression
its about pressing on yr tampon
not pressing on the issue
its about issuing yr book
in isolation
its about power
power is there to speak for u
or to stiffen
with inconvenience
a tampon is there
to support yr space
spot a leak
is that u? abort
to where u came from
keep the elephant out of it
not enough room
expelling
#poems
•
if blue is nowhere
out of where comes the red
if it comes, will it go
if it went, what did it underwent
if nowhere is wet, where does it rain
here is the Rhine—will you rhyme
played out, what do they lay
if these are eggs, where is the hen
if hence is to have a consequence
who is going to have hints
if it hinges on the brink
here’s some ink
if the ink is red
we pick up where we left off
if off-script is after kasha
will it cash off
if kasha is the mischung
is the dog’s name misha
if misha is the uncle, who is the son
if the sun is out, where did the moon go
if the ants are orbiting the ring, is it spring
if it sprang a rainbow and a roundabout
and a regenbogen
ne boysya
#poems
•
gibt es tiere in reflektieren
gibt es zeit in vorzeit
gibt es magen in magen
gibt es mögen in möglich
gibt es vergeben in der umgebung
gibt es geburtstag zur uhr
gibt es ohr zum lesen
gibt es wesen zu essen
gibt es spaß zum verfassen
gibt es praxis mit einem axis
gibt es recherche im шершень
gibt es neutral überall
gibt es öl im vessel
gibt es ossi im westen
gibt es post- im kom-post
kommst du mit mir
kommst du ins meer
brauchst du einen see
per se
kommst du nach außen
auch bekannt als eine pause
also taught to the forgotten
ought to beget
#poems
•
what if it rains
what if it rhymes
what if it resembles a hymn
what if you have to promise
what if it stays in your mouth
what will you spill
what if it involves arms
what if you are german
what if you belong to an international extremist movement
what if you belong to a communist group
what if you made it this far
what if you have drafted an exit
what if you are drafted
what if you go
what if you go go
what if you move twice
what if you return
what if you turn to the beginning
what if you were begging
what if you listen only when they beg
what if you are in бег
what will you из бежать
what will you be running for
after
after four or eight hours
what on earth
what an exclamation
what is between clam and you
between calamar and you
what on earth is an octopus
what an opus
опускай
obstacle
stuck
#poems
•
i meet you at our house
i am your housemate
both of us pay hausmiete
we are in the middle of things
going between me and ты — mitte
you aren't my twin
one of us didn't watch twin peaks
you pretend to have a tooth for it
it stands for many things
then it falls
i haven't been to sioux falls
there's time ahead of me
i applied for a residency in oakland
people are nice there
they nest things
they nested me for a while
after i'd tested them through emails
in san leandro i saw a newspaper on the ground
there was no mailman nearby
a man asked if i liked the building of their church
a man in new orleans said they keep erasing "t" and more in TRUCKS
i get tired of checking my grammar
i am worse at checking on my grandma
people ask if i miss the country
i reply: i only miss that house
in former experimental household
nowadays posyolok chernoles
when will i go to schwarzwald
later than schwartzkopffstraße
something is always missing
an extra letter in the wrong place
to place this right
i'd need to go left
#poems