FileMoon is a video hosting service were you can upload videos, share & make money.
Don't Have Account? Register Here
- HLS Streaming - Unlimited Storage - Faster Encoding - Subtitles Support - Premium bandwidthFileMoon API Python Wrapper
This is a Python wrapper for the FileMoon API. It allows you to interact with various endpoints of the FileMoon service to manage files, accounts, and other related operations.
pip install filemoon
from filemoon import FileMoon
# Initialize with your API key
filemoon = FileMoon(api_key='YOUR_API_KEY')
# Get account info
info = filemoon.info()
print(info)
Get basic info of your account
info = filemoon.info()
print(info)
Get reports of your account (default last 7 days)
stats = filemoon.stats(last='7')
print(stats)
Get DMCA reported files list (500 results per page)
dmca = filemoon.dmca(last='7')
print(dmca)
Get deleted files list (500 results per page)
deleted = filemoon.deleted(last='7')
print(deleted)
Upload files using direct links
upload = filemoon.remote_upload(direct_link='https://example.com/file.mp4')
print(upload)
Optional parameter fld_id
can be used to specify the folder ID.
upload = filemoon.remote_upload(direct_link='https://example.com/file.mp4', fld_id='FOLDER_ID')
print(upload)
To remove remote upload
remove = filemoon.remove_rup(file_code='FILE_CODE')
print(remove)
To check remote upload status
status = filemoon.rup_status(file_code='FILE_CODE')
print(status)
To get file information
f_info = filemoon.f_info(file_code='FILE_CODE')
print(f_info)
To list files
f_list = filemoon.f_list(name='example', per_page='10', page='1')
print(f_list)
Optional parameters:
fld_id
: Folder ID to list files fromname
: To fetch a file by namecreated
: To fetch by created datepublic
: To fetch by public mediaper_page
: To fetch by per pagepage
: To fetch by page
To clone a file
clone = filemoon.clone_f(file_code='FILE_CODE')
print(clone)
Optional parameter fld_id
can be used to specify the folder ID.
clone = filemoon.clone_f(file_code='FILE_CODE', fld_id='FOLDER_ID')
print(clone)
To get folder list
folders = filemoon.fld_list(fld_id='FOLDER_ID')
print(folders)
Optional parameter fld_id
can be used to specify the folder ID.
To create a folder
new_folder = filemoon.create_fld(name='New Folder')
print(new_folder)
Optional parameter parent_id
can be used to specify the parent folder ID.
new_folder = filemoon.create_fld(name='New Folder', parent_id='PARENT_ID')
print(new_folder)
Get encoding list
encoding_list = filemoon.en_list()
print(encoding_list)
Get encoding status
status = filemoon.en_status(file_code='FILE_CODE')
print(status)
Restart encoding error files
restart = filemoon.restart_en_error(file_code='FILE_CODE')
print(restart)
Delete encoding error files
delete = filemoon.delete_en_error(file_code='FILE_CODE')
print(delete)
Get thumbnail image URL
thumbnail = filemoon.thumb(file_code='FILE_CODE')
print(thumbnail)
Get splash image
splash = filemoon.splash(file_code='FILE_CODE')
print(splash)
Get video preview of specific file
preview = filemoon.vid_preview(file_code='FILE_CODE')
print(preview)
Add a remote subtitle
subtitle = filemoon.r_sub(subnum='1', sub_url='https://example.com/subtitle.srt', sub_name='English Subtitles')
print(subtitle)
Add remote subtitle in JSON format
json_subtitle = filemoon.r_subjs(sub_js='{"subtitles": [{"url": "https://example.com/subtitle.srt", "label": "English"}]}')
print(json_subtitle)
Add a remote poster
poster = filemoon.r_post(r_post='https://example.com/poster.jpg')
print(poster)
Add a remote logo
logo = filemoon.r_logo(r_logo='https://example.com/logo.png')
print(logo)
Get upload server URL
upload_server = filemoon.up_server()
print(upload_server)
This project is licensed under the MIT License.
Feel free to submit issues and pull requests to improve the codebase. All contributions are welcome!
Your Name - BalaPriyan