Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilevn/aiodictcc
An asyncio-based wrapper for dict.cc
https://github.com/ilevn/aiodictcc
aiohttp asnycio asynchronous dictionary python-3-6 translate wrapper
Last synced: about 1 month ago
JSON representation
An asyncio-based wrapper for dict.cc
- Host: GitHub
- URL: https://github.com/ilevn/aiodictcc
- Owner: ilevn
- License: mit
- Created: 2017-03-01T20:32:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-07T16:09:26.000Z (about 2 years ago)
- Last Synced: 2024-10-07T23:57:56.224Z (about 1 month ago)
- Topics: aiohttp, asnycio, asynchronous, dictionary, python-3-6, translate, wrapper
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## aiodictcc
An `asnycio`-based wrapper for [Dict.cc](https://dict.cc).
## Installation
```
pip install aiodictcc
```
For the latest development version:
```
pip install git+https://github.com/ilevn/aiodictcc
```
## Example```py
import asyncio
from aiodictcc import Translate# Create a new instance of the API wrapper.
trans = Translate()
loop = asyncio.get_event_loop()async def main():
to_translate = input("Search: ")
# Get translation for `to translate` en -> de.
translated = await trans.get_translation(to_translate, "en", "de")
# Returns a list of tuples.
print(translated)loop.run_until_complete(main())
```