Skip to main content

An Unofficial Mdiskpro.xyz API

Project description

MdiskPro

A Unofficial Wrapper for Mdiskpro.xyz
· Report Bug / Request Feature · Usage · Reference


MdiskPro

An Unofficial Python version of Mdiskpro.xyz. Used to Short your long link and let you Earn from it.

Installation

Install shortzy with pip

pip install mdiskpro

To Upgrade

pip install --upgrade mdiskpro

Usage

from mdiskpro import MdiskPro
import asyncio

mdiskpro = MdiskPro('<YOUR API KEY>')

async def main():
    link = await mdiskpro.convert('https://example.com/')
    print(link)

asyncio.run(main())
Output: https://mdiskpro.in/mVkra

Features

  • Single URL Convert
  • Batch Convert from List
  • Convert from Text

Contributing

Contributions are always welcome!

Reference

Init

from mdiskpro import Shortzy
import asyncio

mdiskpro = MdiskPro(api_key="Your API Key") 

Convert a single URL

convert(link, alias, silently_fail, quick_link) -> str
Parameter Type Description
link string Required. Long URL Link
alias string Custom alias for the link
silently_fail bool Raise an exception or not if error ocuurs
quick_link bool Returns the quick link

Example:

async def main():
    link = await mdiskpro.convert('https://www.youtube.com/watch?v=d8RLHL3Lizw')
    print(link)

asyncio.run(main())

Convert from Text

convert_from_text(text:str, silently_fail:bool=True, quick_link:bool=False) -> str
Parameter Type Description
text str Required. Text containing Long URLS to short

Example:

async def main():
    text = """
Unstoppable:-https://www.youtube.com/watch?v=330xlOv8p9M
Night Changes:-https://www.youtube.com/watch?v=syFZfO_wfMQ
"""
    link = await MdiskPro.convert_from_text(text)
    print(link)

asyncio.run(main())

Get quick link

get_quick_link(link:str)
Parameter Type Description
link str Required. Long Link

Example:

async def main():
    link = "https://www.youtube.com/watch?v=syFZfO_wfMQ"
    quick_link = await MdiskPro.get_quick_link(link)
    print(quick_link)

asyncio.run(main())

Credits

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

mdiskpro-0.0.11.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

mdiskpro-0.0.11-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file mdiskpro-0.0.11.tar.gz.

File metadata

  • Download URL: mdiskpro-0.0.11.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for mdiskpro-0.0.11.tar.gz
Algorithm Hash digest
SHA256 2c61b6eb3a3e5620bbf8d1a570667483719f10fdc7eb71b30a9d21b419cc2a4d
MD5 66ea94b43664ba05f34b880ebb9f0410
BLAKE2b-256 cf1f80864315b31c542000a09d678d8eb359c36d4dfd397b5251b3731e7da254

See more details on using hashes here.

Provenance

File details

Details for the file mdiskpro-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: mdiskpro-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for mdiskpro-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 35230af9eae6960ced250901482c57f9f3a890c11917b84bdfdeac8527a3ee66
MD5 30c61abf8afeed369e72728790a35306
BLAKE2b-256 cbebcefd154ee178682a62d7a70da9698b68375346bc96e4627bfd5c4cfe2caa

See more details on using hashes here.

Provenance

Supported by

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