Skip to main content

A Python Wrapper for the im-a-dev.xyz uploader.

Project description

iad

iadpy is a wrapper for the Im A Dev file uploader in python.

  • Async wrapper (async, await)
  • Proper rate limiting

Usage

Installation

Pypi

pip install iad.py

From GitHub

pip install git+https://github.com/Fxcilities/iad.py.git

Examples

  • Upload an image
from iad import ImADev
from asyncio import get_event_loop
from io import BytesIO

uploader = ImADev('token here')

async def main():
    # from file path
    upload = await uploader.upload('image.png')
    print(upload.url)
    
    # from bytes
    upload = await uploader.upload(bytes_here, file_format='png')
    print(upload.url)
    
    # from buffer
    upload = await uploader.upload(BytesIO(), file_format='png')
    print(upload.url)

loop = get_event_loop()
loop.run_until_complete(main())
  • Getting a upload information
from iad import ImADev
from asyncio import get_event_loop

uploader = ImADev('token here')

async def main():
    upload = await uploader.get_upload('filename.png')
    print(upload.url)

loop = get_event_loop()
loop.run_until_complete(main())

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

iad.py-1.0.3.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file iad.py-1.0.3.tar.gz.

File metadata

  • Download URL: iad.py-1.0.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for iad.py-1.0.3.tar.gz
Algorithm Hash digest
SHA256 98378444bf927cd973cee96e2d5f686d8f4c6459707866894e20421a71f0e095
MD5 a99f8d449ce2681d176e8d3b6725b102
BLAKE2b-256 bab3b6cd26b861f1091271d241e6ab27be489f1ef7d4284ee3d716c75ce80e9f

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