Skip to main content

PyYaDisk is a small wrapper over Yandex Disk Rest API V1

Project description

PyYaDisk

PyYaDisk is a wrapper over Yandex Disk Rest API V1. The library is in creation process. You can check realized features with our roadmap below.

Usage

from pyyadisk import YandexDisk

token = 'ya_oauth_token'
disk = YandexDisk(token=token)  # Make instance
print(disk.path('yandex/disk/path').get())  # Get path info
disk.path('old/yandex/disk/path').move('new/yandex/disk/path')  # Move by path
disk.path('old/yandex/disk/path').copy('new/yandex/disk/path')  # Copy by path
disk.path('yandex/disk/new_path').create()  # Make directory
disk.path('yandex/disk/path').create('new_path')  # Make directory in directory
disk.path('yandex/disk/path').delete()  # Delete directory
print(disk.path('yandex/disk/path').link())  # Get private link
print(disk.path('yandex/disk/path').share())  # Share path and get public link
disk.path('yandex/disk/path').unshare()  # Unshare path
print(disk.last_uploaded())  # Get last uploaded files info
print(disk.list_files())  # Get files list info
disk.path('yandex/disk/path').upload('/home/file.pdf')  # Upload file
disk.path('yandex/disk/path').upload_by_url('file.pdf', 'https://example.com/file.pdf')  # Upload file by url

Roadmap

  • OAuth authorization by token

/v1/disk

  • Get disk metadata

/v1/disk/resources

  • Get metadata of file or directory
  • Create directory
  • Delete of file or directory
  • Move of file or directory
  • Copy of file or directory
  • Get download link (private)
  • Share directory or file and get public link
  • Get download link (public)
  • Get list of files
  • Get last uploaded files
  • Upload file
  • Upload file by url

/v1/disk/resources/save-to-disk

  • Save public file to disk by public key or url

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

pyyadisk-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

pyyadisk-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file pyyadisk-0.1.1.tar.gz.

File metadata

  • Download URL: pyyadisk-0.1.1.tar.gz
  • Upload date:
  • Size: 4.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.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.9

File hashes

Hashes for pyyadisk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7692d6cdcb6f70bfd38c28714354a9ba389ee9d889bd8cfeaf8b39511e207af9
MD5 63251a2d7a70946577064a4ebb5a4a4d
BLAKE2b-256 9a310be57f8ad240f7cded9deada1e882283abf7f8f3029d540e20b5f990e1d7

See more details on using hashes here.

File details

Details for the file pyyadisk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyyadisk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 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.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.6.9

File hashes

Hashes for pyyadisk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d91c45f18be76340ad3276e10acbb9aaef645085b4ec49679bbcf5da0ae8adda
MD5 080153136c095cb6be1c41a86bb8539b
BLAKE2b-256 72d2ec8e7b919dad9b04dff827f926c24c4e5c3d1415a30de096eedf4ed33455

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