The second generation of IcodeYoudao API framework.
Project description
icodeapi, the The second generation of IcodeYoudao API framework.
More Powerful and Faster than TuringAPI and TuringIO.
icodeapi is easy to use, and it supports for sync and async.
from icodeapi import *
import asyncio
cookie = input('Enter cookie: ')
syncAPI = IcodeAPI(cookie = cookie)
print(syncAPI.updateIntro('hello, icodeapi!'))
asyncAPI = AsyncIcodeAPI(cookie = cookie)
async def main(api : AsyncIcodeAPI):
await api.login()
print(await api.updateIntro('hello, async icodeapi!'))
await api.closeClient()
asyncio.run(main(asyncAPI))
Use icodeapi to build your server
import icodeapi
from icodeapi import server
cookie = input("Enter cookie: ")
api = icodeapi.AsyncIcodeAPI(cookie = cookie)
Server = server.IcodeServer(api = api)
@Server.CheckMessage()
async def AutoReply(userId, bot):
try:
await bot.fastReply(userId, 'Hello world!')
except AssertionError:
pass
except:
print('Unknown Error')
server.RunServer(Server)
Use pip to install
pip install icodeapi
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
icodeapi-1.4.0.tar.gz
(22.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
icodeapi-1.4.0-py3-none-any.whl
(22.5 kB
view details)
File details
Details for the file icodeapi-1.4.0.tar.gz.
File metadata
- Download URL: icodeapi-1.4.0.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a832442f0eb6b19ab1bb3522b312a641bd2474523100f7758ed0aa7708b34c40
|
|
| MD5 |
5deeae74a3f838317b84586702ce705b
|
|
| BLAKE2b-256 |
18f795b4face568efe566a5545f035e99080ecc743eac8fa1667185c4865bbc0
|
File details
Details for the file icodeapi-1.4.0-py3-none-any.whl.
File metadata
- Download URL: icodeapi-1.4.0-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a43782109f2cb071843195a802464b158d1a2db3cf0c92e6ed6f02c762e5be93
|
|
| MD5 |
1d42d0fc7166cae1989787e54d34ee0f
|
|
| BLAKE2b-256 |
eebb5377e918636d2b180803bf77b829e8992e02456f5c2c0839382f9c6a603f
|