asyncer
Asyncer, async and await, focused on developer experience.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Asyncer, async and await, focused on developer experience.
Basic Info
- Host: GitHub
- Owner: fastapi
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://asyncer.tiangolo.com/
- Size: 909 KB
Statistics
- Stars: 2,051
- Watchers: 18
- Forks: 74
- Open Issues: 8
- Releases: 8
Topics
Metadata Files
README.md
Asyncer, async and await, focused on developer experience.
Documentation: https://asyncer.tiangolo.com
Source Code: https://github.com/fastapi/asyncer
Asyncer is a small library built on top of AnyIO.
Asyncer has a small number of utility functions that allow working with async, await, and concurrent code in a more convenient way under my (@tiangolo - Sebastián Ramírez) very opinionated and subjective point of view.
The main goal of Asyncer is to improve developer experience by providing better support for autocompletion and inline errors in the editor, and more certainty that the code is bug-free by providing better support for type checking tools like mypy.
Asyncer also tries to improve convenience and simplicity when working with async code mixed with regular blocking code, allowing to use them together in a simpler way... again, under my very subjective point of view.
🚨 Warning
This small library only exists to be able to use these utility functions until (and if) they are integrated into AnyIO.
It will probably take some time for that to happen (or to be decided if it will be included or not).
So I made this to be able to use these ideas right now. 🤓
Can I Use It?
Yes 🎉 (but continue reading).
You can use this and evaluate the library API design I'm proposing. It will probably be useful to know if it works and is useful for you (I hope so).
But still, consider this lab material, expect it to change a bit. 🧪
If you use it, pin the exact Asyncer version for your project, to make sure it all works.
Have tests for your project (as you should, anyway). And upgrade the version once you know that the new version continues to work correctly.
Still, it's just 4 functions, so there's not much to change, if you had to refactor your code to update something it would not be much.
And if you don't want to add asyncer as a dependency to your project, you can also just copy the main file and try out those functions, it's quite small (but in that case you won't get updates easily).
Requirements
As Asyncer is based on AnyIO it will be also installed automatically when you install Asyncer.
Installation
How to Use
You can read more about each of the use cases and utility functions in Asyncer in the tutorial.
As a sneak preview of one of the utilities, you can call sync code from async code using asyncify():
```Python import time
import anyio from asyncer import asyncify
def dosyncwork(name: str): time.sleep(1) return f"Hello, {name}"
async def main(): message = await asyncify(dosyncwork)(name="World") print(message)
anyio.run(main) ```
Asyncer's asyncify() will use AnyIO underneath to do the smart thing, avoid blocking the main async event loop, and run the sync/blocking function in a worker thread.
Editor Support
Everything in Asyncer is designed to get the best developer experience possible, with the best editor support.
- Autocompletion for function arguments:

- Autocompletion for return values:

- Inline errors in editor:

- Support for tools like mypy, that can help you verify that your code is correct, and prevent many bugs.
License
This project is licensed under the terms of the MIT license.
Owner
- Name: FastAPI
- Login: fastapi
- Kind: organization
- Website: https://tiangolo.com/github-fastapi/
- Twitter: fastapi
- Repositories: 6
- Profile: https://github.com/fastapi
FastAPI and friends open source projects. Created and managed by @tiangolo.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Asyncer
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Sebastián
family-names: Ramírez
email: tiangolo@gmail.com
identifiers:
repository-code: 'https://github.com/fastapi/asyncer'
url: 'https://asyncer.tiangolo.com'
abstract: >-
Asyncer, async and await, focused on developer experience.
keywords:
- asyncer
- anyio
- trio
- asyncio
license: MIT
GitHub Events
Total
- Watch event: 355
- Delete event: 84
- Issue comment event: 93
- Push event: 96
- Pull request review comment event: 1
- Pull request review event: 18
- Pull request event: 172
- Fork event: 15
- Create event: 82
Last Year
- Watch event: 355
- Delete event: 84
- Issue comment event: 93
- Push event: 96
- Pull request review comment event: 1
- Pull request review event: 18
- Pull request event: 172
- Fork event: 15
- Create event: 82
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| github-actions | g****s@g****m | 165 |
| Sebastián Ramírez | t****o@g****m | 112 |
| dependabot[bot] | 4****] | 53 |
| pre-commit-ci[bot] | 6****] | 15 |
| Sofie Van Landeghem | s****g | 3 |
| Franco Gil | 4****o | 2 |
| Khiem Doan | d****y@g****m | 2 |
| Esteban Maya | e****9@g****m | 1 |
| Hung-I Wang | w****e@g****m | 1 |
| Jonas Krüger Svensson | j****s@h****m | 1 |
| Lev | l****t@g****m | 1 |
| Marcelo Trylesinski | m****e@g****m | 1 |
| Mark Parker | m****p@g****m | 1 |
| Michael Oliver | m****_@o****m | 1 |
| Paul Sanders | p****1@g****m | 1 |
| Zhymabek Roman | 6****n | 1 |
| giladsheffer | g****7@g****m | 1 |
| नवुले पवन कुमार राव | p****e@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 6
- Total pull requests: 216
- Average time to close issues: 3 months
- Average time to close pull requests: about 1 month
- Total issue authors: 6
- Total pull request authors: 20
- Average comments per issue: 3.0
- Average comments per pull request: 1.26
- Merged pull requests: 105
- Bot issues: 1
- Bot pull requests: 161
Past Year
- Issues: 1
- Pull requests: 123
- Average time to close issues: about 19 hours
- Average time to close pull requests: 15 days
- Issue authors: 1
- Pull request authors: 5
- Average comments per issue: 0.0
- Average comments per pull request: 0.85
- Merged pull requests: 38
- Bot issues: 1
- Bot pull requests: 118
Top Authors
Issue Authors
- samuelcolvin (1)
- tiangolo (1)
- wu-clan (1)
- smoeinbbp (1)
- sumit-158 (1)
- jessekrubin (1)
Pull Request Authors
- dependabot[bot] (201)
- tiangolo (54)
- pre-commit-ci[bot] (22)
- svlandeg (3)
- realFranco (3)
- Lancetnik (2)
- waketzheng (2)
- Gowee (2)
- JonasKs (1)
- Kludex (1)
- msehnout (1)
- khiemdoan (1)
- Stealthii (1)
- sanders41 (1)
- windson (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- autoflake ^1.4 develop
- black ^21.5-beta.1 develop
- coverage ^6.2 develop
- flake8 ^4.0.1 develop
- isort ^5.9.3 develop
- mdx-include ^1.4.1 develop
- mkdocs ^1.2.1 develop
- mkdocs-material ^8.1.4 develop
- mypy ^0.930 develop
- pytest ^6.2.4 develop
- anyio ^3.4.0
- python ^3.6.2
- Dockerfile * docker
- Dockerfile * docker
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- mxschmitt/action-tmate v3 composite
- nwtgck/actions-netlify v1.2.4 composite
- tiangolo/issue-manager 0.4.0 composite
- actions/checkout v3 composite
- docker://tiangolo/latest-changes 0.0.3 composite
- mxschmitt/action-tmate v3 composite
- ./.github/actions/comment-docs-preview-in-pr * composite
- actions/checkout v3 composite
- dawidd6/action-download-artifact v2.24.2 composite
- nwtgck/actions-netlify v1.2.4 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- mxschmitt/action-tmate v3 composite
- actions/setup-python v4 composite
- dawidd6/action-download-artifact v2.24.2 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- mxschmitt/action-tmate v3 composite
- python 3.7 build
- python 3.7 build