> For the complete documentation index, see [llms.txt](https://xbz-studio.gitbook.io/turingapi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xbz-studio.gitbook.io/turingapi/readme.md).

# 简介

{% hint style="success" %}
该项目已基本完成并可以正常使用

正式版已发布！
{% endhint %}

{% hint style="danger" %}
TuringAPI从2023.10.02起已经被停止支持，推荐使用更强大的[icodeapi](https://pypi.org/project/icodeapi)
{% endhint %}

该文作者：[下北泽工作室](https://xbzstudio.github.io)

该项目作者：[下北泽工作室](https://xbzstudio.github.io)

<figure><img src="/files/6LiaWm4ErGtfJg0JavLX" alt=""><figcaption><p>图标.</p></figcaption></figure>

turingAPI是一个基于urllib3和asyncio的有道小图灵创作社区API调用Python库。

它可以帮助您高效地使用Python程序对有道小图灵进行各种各样的操作！

它支持同步和异步！它允许您使用事件流和事件池管理您的API调用程序，并更快地并发您的程序。

在alpha0.35版本之后的turingAPI，需要在Python 3.10及以上版本才可以正常运作。

现在已经有一些很棒的项目开始使用，或基于turingAPI ， 如[TuringBot机器人](https://icodeshequ.youdao.com/work/a4e222d8f5a9456f977c46e7c8d8ff83) 和 icodeBot Python Lib.你也应该使用。

#### 示例：

```python
import turingAPI , json
user=turingAPI.icodeUser('your cookie')
print(json.loads(user.comment('4c0dae24c0e24c6897c051ded9f0c5d9',
'hello turingAPI').data.decode('utf-8'))['code'])
#will print : 0
```

您可以使用cookie登录一个有道小图灵账号，并使用该账号的各种方法完成针对于该账号的自动化操作。

那么，现在开始吧！
