Trace.moe python wrapper
Project description
tracemoepy
trace.moe python wrapper, does not support all api methods yet. Work in progress.
Install
- Install using pip:
pip install tracemoepy
Examples
- All the examples below are after this piece of code:
import tracemoepy
tracemoe = tracemoepy.tracemoe.TraceMoe()
- You can search image like:
print(tracemoe.search('https://trace.moe/img/flipped-good.jpg', is_url = True))
- Or if you provide base64 encoded image:
print(tracemoe.search(image, encode=False))
- Or if you want to just provide the image, The wrapper will encode image using base64:
print(tracemoe.search('a.jpg', encode=True))
- Video Preview (Gives content):
output = tracemoe.search('https://trace.moe/img/flipped-good.jpg', is_url = True)
tracemoe.video_preview(output)
- Save video preview
output = tracemoe.search('https://trace.moe/img/flipped-good.jpg', is_url = True)
video = tracemoe.video_preview(output)
with open('preview.mp4', 'wb') as f:
f.write(video)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tracemoepy-3.0.tar.gz
(3.6 kB
view hashes)