tiangolo / asyncer Goto Github PK
View Code? Open in Web Editor NEWAsyncer, async and await, focused on developer experience.
Home Page: https://asyncer.tiangolo.com/
License: MIT License
Asyncer, async and await, focused on developer experience.
Home Page: https://asyncer.tiangolo.com/
License: MIT License
n/a
Hi tiangolo!
Looks like a nice lib. I have a lib called asyncify (https://github.com/dynamic-graphics-inc/dgpy-libs/tree/master/libs/asyncify) pip install asyncify
that has an asyncify function. I cannot get my asyncify function to work with mypy and paramspec. do you have any suggestions.
Linux, Windows, macOS
No response
n/a
36+
This is a random question and I thought you might be interested. DM me if you are interested in taking over the asyncify name as it is imo a better name.
-
Hi @tiangolo.
Images path in tutorial directory is invalid. It seems all of them need a /doc
in the beginning of their path.
In #7, I've fixed one of them in asyncify
section of the tutorial page. Do you think other cases need to be resolved in the same PR?
Thanks for this awesome library. ๐ฅณ
Linux
No response
No response
This is a tentative roadmap, I will update it as things evolve. Some things might be discarded, others might be added later. I didn't want to make it fully public as it could raise expectations, but it seems it would be more beneficial for the community to know all the ideas and objectives.
Work on this is alternated (and sometimes mixed) with work on FastAPI, Typer, SQLModel, and others.
Answering questions, issues, and PRs is also intermixed with this, but as in some cases one of these features would solve several issues or questions, or potentially solve something done by one or more PRs, in many cases I focus on this a bit more than on answering specific issues, questions, PRs.
The word "maintenance" or "maintainer" doesn't have a very strict definition, and it probably varies a lot from perspective.
A lot of the work related to maintaining FastAPI is done by contributors by answering questions, reviewing PRs, etc.
You can help me ensure each existing PR is in shape (has tests, solves the problem, etc.). Make sure you filter out the translation PRs (most of them) unless you speak the language and can review them.
When there are security issues, those are handled with the highest priority. Those are normally not handled in issues and PRs but in emails, it's not public until the security disclosure is made, in most cases (always, up to now) with the version that fixes them.
Now, here's the current high-level tentative roadmap:
All this is intermixed with reviews for PRs, issues, and discussions.
import anyio
import asyncer
def sync_work(name: str):
time.sleep(1)
return f"Hello, {name}"
async def do_async_work(name: str):
message = asyncer.run_sync(sync_work)(name=name)
return message
async def main():
message = await do_async_work(name="World")
print(message)
asyncer.run(main)
It's strange to name the three main functions, Why not use regular name?
The first two unified can be understood, but runnify is always weird.
Why not
Windows
No response
0.0.1
3.X
No response
import asyncer
import logging
from typing import Union
from fastapi import FastAPI
async def func1(name: str):
return {"message": f"Hello {name} form func1"}
async def func2():
return {"message": f"Hello {name} form func2"}
@app.get("/test")
async def knowledge_panel(name_str: str):
async with asyncer.create_task_group() as task_group:
try:
soon_value1 = task_group.soonify(func1)(name=name_str)
except Exception:
logging.exception()
try:
soon_value2 = task_group.soonify(func2)(name=name_str)
except Exception:
logging.exception()
data = [soon_value1.value, soon_value2.value]
return data
Windows
No response
0.0.1
Python 3.10.5
No response
from datetime import datetime
from asyncer import asyncify
def foobar(x: int, y: 'str') -> datetime:
return datetime(int(y), x, 1)
async def main():
x = await asyncify(foobar)()
asyncer
looks awesome yet again. ๐
Unless I'm missing something(?), I don't seem to get auto-completion help on pycharm.
Might be worth:
Linux
Ubuntu 21.04
0.0.1
3.9.5
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.