Skip to main content

Unofficial python api wrapper from https://filemoon.sx/api

Project description

FileMoon

FileMoon is a video hosting service were you can upload videos, share & make money.

Don't Have Account? Register Here

Features

- HLS Streaming - Unlimited Storage - Faster Encoding - Subtitles Support - Premium bandwidth

FileMoon 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.

Table of Contents

Installation

pip install filemoon

Usage

from filemoon import FileMoon

# Initialize with your API key
filemoon = FileMoon(api_key='YOUR_API_KEY')

# Get account info
info = filemoon.info()
print(info)

Methods

Account Information

Get basic info of your account
info = filemoon.info()
print(info)

Account Statistics

Get reports of your account (default last 7 days)
stats = filemoon.stats(last='7')
print(stats)

DMCA List

Get DMCA reported files list (500 results per page)
dmca = filemoon.dmca(last='7')
print(dmca)

Deleted Files List

Get deleted files list (500 results per page)
deleted = filemoon.deleted(last='7')
print(deleted)

Remote Upload

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)

Remove Remote Upload

To remove remote upload
remove = filemoon.remove_rup(file_code='FILE_CODE')
print(remove)

Remote Upload Status

To check remote upload status
status = filemoon.rup_status(file_code='FILE_CODE')
print(status)

File Information

To get file information
f_info = filemoon.f_info(file_code='FILE_CODE')
print(f_info)

File List

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 from
  • name: To fetch a file by name
  • created: To fetch by created date
  • public: To fetch by public media
  • per_page: To fetch by per page
  • page: To fetch by page

Clone File

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)

Folder List

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.

Create Folder

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)

Encoding Operations

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)

Image Operations

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)

Video Preview

Get video preview of specific file
preview = filemoon.vid_preview(file_code='FILE_CODE')
print(preview)

Remote Subtitle Management

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)

Server Management

Get upload server URL
upload_server = filemoon.up_server()
print(upload_server)

License

This project is licensed under the MIT License.

Contributing

Feel free to submit issues and pull requests to improve the codebase. All contributions are welcome!

Author

Your Name - BalaPriyan


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

filemoon-0.2.6.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filemoon-0.2.6-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file filemoon-0.2.6.tar.gz.

File metadata

  • Download URL: filemoon-0.2.6.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for filemoon-0.2.6.tar.gz
Algorithm Hash digest
SHA256 2588e9d139783c6dd97e9c54695245fe0ef9443cd826ccb2eeab808fef83b698
MD5 3a8ebd5d259c392fc6262f1c2edffeaf
BLAKE2b-256 ab147577f55df247da323465ecc3b6968272351a7cd5d432ccf30538f86a7a26

See more details on using hashes here.

File details

Details for the file filemoon-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: filemoon-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for filemoon-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c567cf5ef3bd7a5d8d4d751af9ed4000798a825bc336284a808fc84b19b5d06f
MD5 36472a8ea39717a78a9805a4f95dba62
BLAKE2b-256 1c9a79a736129b05c3f52c8532e85420c92dc704c1d8172ffcce0afb10bc06b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page