Releases: DragSama/tracemoepy
Releases · DragSama/tracemoepy
Migrate to new tracemoe api
Major Changes:
natural_preview
is now same asvideo_preview
.encode
no longer exists as a parameter in search.- Use
response.result
instead ofresponse.docs
and AniList info is now underresponse.anilist
. - Now
save
method usespreview_type
instead ofpreview_path
, expected values are 'image' or 'video'.
Minor Changes:
- New parameter
cut_black_borders
andinclude_anilist_info
were added tosearch
method, both areTrue
by default. To see what they do runhelp(tracemoepy.tracemoe.TraceMoe.search)
.
For more info check: https://soruly.github.io/trace.moe-api/#/migrate
Bug fixes
Use Attrify instead of SuperDict
Use Attrify instead of SuperDict (Attrify is basically same but with more stuff and bug fixes)
More friendly method and bug fixes
- Fixed error while initializing aiohttp client in latest aiohttp version.
- Sorted method in directories
- Add more examples
- Add
.save(...)
method result- This is just to easy way to directly save file.
output.docs[0].save('natural-preview.mp4')
- Raises
InvalidPath
if path doesn't exist. - Check examples to know how to save other preview types
Bug fixes
Allow accessing dict keys as attributes
Now you can access dict keys as attributes
Example:
import tracemoepy
tracemoe = tracemoepy.TraceMoe()
result = tracemoe.search(...)
print(result.docs)
print(result['docs'])
Fixes and custom session support
trace.moe recently changed some stuff which made this wrapper broken, So to fix this I have added a new option called "upload_file".
Here is a example one how to use this:
tracemoe.search('test.png', encode = False, upload_file = True) # You can ignore the encode = False ONLY on Async_Trace class not normal one ( Note: In version 3.6+ all args default to False, So you can ignore this )
It is now recommended to use "natural_preview" function.
Also added support for custom aiohttp session
import tracemoepy
import aiohttp
async_moe = tracemoepy.Async_Trace(session = aiohttp.ClientSession())
await async_moe.search('test.png', upload_file = True)
Better documentation
v3.2 Change version
Nothing because I messed up releases
v3.1 Change version