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
Release files for pycatbox 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pycatbox-1.0.3.tar.gz | 6.7 kB | Details |
Release files / pycatbox-1.0.3.tar.gz
| Download URL | pycatbox-1.0.3.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b7332058cb64b47d6a17f0252dd8abde8ecfe5e440feae72a38995bc8376b29
|
|
BLAKE2b-256 checksum How to use checksums |
c5aa78116b14a8cd1960cb922606c5a94bff3c7599efc329c752a8c997bda61a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|