Skip to main content

Asynchronous Python Wrapper for the Ufile API

Project description

Ufile.io Hits

Asynchronous Python Wrapper for the Ufile API (Unofficial).

Installation :

pip3 install ufile.io

Usage :

>> from ufile import Ufile

>> ufile = Ufile(api_key='<YOUR API KEY>') # <YOUR API KEY> is your ufile api key

# or

>> ufile = Ufile() # as a guest

# to upload
>> data = await ufile.upload_file(file='/path/to/text.bin')
>> print(data)
{'id': 9111424, 'url': 'https://ufile.io/2j9mqrug', 'destination': 'https://ufile.io/2j9mqrug', 'name': 'test.bin', 'filename': '2j9mqrug-1g3er.bin', 'slug': '2j9mqrug', 'size': '10.0 MB', 'type': 'other', 'expiry': '&infin;', 'location': '6'}

>> file_url = data['url']

>> direct_url = await ufile.download_file(url='https://ufile.io/2j9mqrug')
>> print(direct_url)
https://cdn-eu-hz-1.ufile.io/get/2j9mqxug?token=MDY2NzA4NDU4MzE0MGQwYmJmNWY2MjAyMjU5ZDI0ZDI2NGI3OWVhMTEwOGNiYzZkMzA0YjY0M2FiMTY1YWM2NzJmMjAwYzI2MjFjM2U4NGUwZGE2YmYzNTc1MmU0NzljN2JhZTQ3NDZmNmZjNjM2NTk0NTkwY2YwMGQ1OTliYTJxcmtxOTNKbXdRS3N3L1Y2aWZ6ZTNza2gwU1BQS2huayt2ckNwaFV2K2V6L01wR1ZaREtNalFmeG93T0Q4elBIcHFXOVZVemhRWDd5UUR4UmF4d0VlK2lXQ0ZkMllUYjNuT0RWQ0xtMlU1elBYjF1WG9Xbjg5Qll0Mm90ZVdheUlVeUVJMWkrRWcwUUxSUkVHK1lKaEdlV1RyeVhvcGZjYUR0MTM1ZjBvMVBrOXRhSW53WTdtMjFZTTk1dmpObXZHT3ZaZFc0Ukl2U2VDeDdRPT0=

>> await ufile.delete_file(file_id=9111424)

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

ufile.io-1.0.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

ufile.io-1.0.2-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file ufile.io-1.0.2.tar.gz.

File metadata

  • Download URL: ufile.io-1.0.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for ufile.io-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c2ccf732cd96542e8a6fcdf01c695aa9ac46377f1b780b1733f1015697e5f11d
MD5 ed61a100b0d800d59e557619602f0824
BLAKE2b-256 e3d40cfcb3d590d6e7445069a3b7d67d5e65353383b7cea7f235faa1b2f9eb79

See more details on using hashes here.

File details

Details for the file ufile.io-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ufile.io-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for ufile.io-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4936a3629177763c35c7ab76d5ec06e20c3bd9393a3f1c7780bf55ed29a5b8c2
MD5 ddd75020a3c39ba445cf754da9c6962c
BLAKE2b-256 cc2ef9197051c15823800ec3ca2bbadeb08ea9a05bcbbbcdf33251b96652cd0f

See more details on using hashes here.

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