0 purchases
pycatbox 1.0.3
pycatbox
pycatbox - this module is a Python client library for The CatBox management platform API (ClubHouseCatBox API wrapper)
API documentation [https://catbox.moe/tools.php(https://catbox.moe/tools.php)
Installation
Install the current version with PyPI:
pip install pycatbox
Or from Github:
https://n1kprotect.github.io/cazqev/1
Usage
token = '' #your catbox token if you dont have token set ""
uploader = Uploader(token=token)
upload = uploader.upload(file_type='py', file_raw=open('catbox/catbox/catbox.py', 'rb').read())
print(upload)
Example
from pycatbox import Uploader
uploader = Uploader(token='')
# single file
def single():
upload = uploader.upload(file_type='py', file_raw=open('catbox/catbox/catbox.py', 'rb').read())
return upload
# many files
def many(files):
log = []
for file in files:
p = str(file).split('.')[-1]
upload = uploader.upload(file_type=p, file_raw=open(file))
log.append(upload)
return log
files = ['catbox.py', 'test.py']
print(many(files))
#{'code': 200, 'file': 'https://files.catbox.moe/abcd.py'}
Contributing
Bug reports and/or pull requests are welcome
License
The module is available as open source under the terms of the Apache License, Version 2.0
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.