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
Metadata
Release files for icodeapi 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| icodeapi-1.4.0.tar.gz | 22.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| icodeapi-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.9 kB
Release files / icodeapi-1.4.0.tar.gz
| Download URL | icodeapi-1.4.0.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a832442f0eb6b19ab1bb3522b312a641bd2474523100f7758ed0aa7708b34c40
|
|
BLAKE2b-256 checksum How to use checksums |
18f795b4face568efe566a5545f035e99080ecc743eac8fa1667185c4865bbc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / icodeapi-1.4.0-py3-none-any.whl
| Download URL | icodeapi-1.4.0-py3-none-any.whl |
|---|---|
| Size | 22.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a43782109f2cb071843195a802464b158d1a2db3cf0c92e6ed6f02c762e5be93
|
|
BLAKE2b-256 checksum How to use checksums |
eebb5377e918636d2b180803bf77b829e8992e02456f5c2c0839382f9c6a603f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|