{"id":18584662,"url":"https://github.com/ivknv/yadisk-async","last_synced_at":"2026-04-04T06:34:08.608Z","repository":{"id":45280713,"uuid":"195554896","full_name":"ivknv/yadisk-async","owner":"ivknv","description":"Библиотека-клиент REST API Яндекс.Диска с поддержкой async/await / Yandex.Disk REST API client library with async/await support","archived":false,"fork":false,"pushed_at":"2023-12-14T18:41:40.000Z","size":633,"stargazers_count":25,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-16T01:32:35.120Z","etag":null,"topics":["async","python","python3","rest-api","yandex","yandex-disk"],"latest_commit_sha":null,"homepage":"https://yadisk-async.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivknv.png","metadata":{"files":{"readme":"README.en.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-06T15:30:03.000Z","updated_at":"2024-08-05T17:46:56.000Z","dependencies_parsed_at":"2023-12-14T20:08:49.231Z","dependency_job_id":null,"html_url":"https://github.com/ivknv/yadisk-async","commit_stats":{"total_commits":201,"total_committers":4,"mean_commits":50.25,"dds":0.3980099502487562,"last_synced_commit":"a5357bf106d28418e05641d9adceeea9635819eb"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ivknv/yadisk-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivknv%2Fyadisk-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivknv%2Fyadisk-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivknv%2Fyadisk-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivknv%2Fyadisk-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivknv","download_url":"https://codeload.github.com/ivknv/yadisk-async/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivknv%2Fyadisk-async/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260967282,"owners_count":23090096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","python","python3","rest-api","yandex","yandex-disk"],"created_at":"2024-11-07T00:28:21.846Z","updated_at":"2026-04-04T06:34:08.571Z","avatar_url":"https://github.com/ivknv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"YaDisk-async\n============\n\n.. image:: https://img.shields.io/readthedocs/yadisk-async.svg\n   :alt: Read the Docs\n   :target: https://yadisk-async.readthedocs.io/en/latest/\n\n.. image:: https://img.shields.io/pypi/v/yadisk-async.svg\n   :alt: PyPI\n   :target: https://pypi.org/project/yadisk-async\n\nYaDisk-async is a Yandex.Disk REST API client library with async/await support.\n\n\n    This library is no longer maintained, use\n    `yadisk \u003chttps://pypi.org/project/yadisk\u003e`__\u003e=2.0.0 instead, it also\n    supports async API.\n\n.. _Read the Docs (EN): http://yadisk-async.readthedocs.io\n.. _Read the Docs (RU): http://yadisk-async.readthedocs.io/ru/latest\n\nDocumentation is available at `Read the Docs (EN)`_ and `Read the Docs (RU)`_.\n\nInstallation\n************\n\n.. code:: bash\n\n    pip install yadisk-async\n\nor\n\n.. code:: bash\n\n    python setup.py install\n\nExamples\n********\n\n.. code:: python\n\n    import yadisk_async\n\n    y = yadisk_async.YaDisk(token=\"\u003ctoken\u003e\")\n    # or\n    # y = yadisk_async.YaDisk(\"\u003capplication-id\u003e\", \"\u003capplication-secret\u003e\", \"\u003ctoken\u003e\")\n\n    # Check if the token is valid\n    print(await y.check_token())\n\n    # Get disk information\n    print(await y.get_disk_info())\n\n    # Print files and directories at \"/some/path\"\n    print([i async for i in await y.listdir(\"/some/path\")])\n\n    # Upload \"file_to_upload.txt\" to \"/destination.txt\"\n    await y.upload(\"file_to_upload.txt\", \"/destination.txt\")\n\n    # Same thing\n    async with aiofiles.open(\"file_to_upload.txt\", \"rb\") as f:\n        await y.upload(f, \"/destination.txt\")\n\n    # Same thing but with regular files\n    with open(\"file_to_upload.txt\", \"rb\") as f:\n        await y.upload(f, \"/destination.txt\")\n\n    # Download \"/some-file-to-download.txt\" to \"downloaded.txt\"\n    await y.download(\"/some-file-to-download.txt\", \"downloaded.txt\")\n\n    # Same thing\n    async with aiofiles.open(\"downloaded.txt\", \"wb\") as f:\n        await y.download(\"/some-file-to-download.txt\", f)\n\n    # Permanently remove \"/file-to-remove\"\n    await y.remove(\"/file-to-remove\", permanently=True)\n\n    # Create a new directory at \"/test-dir\"\n    print(await y.mkdir(\"/test-dir\"))\n\n    # Always remember to close all the connections or you'll get a warning\n    await y.close()\n\nChangelog\n*********\n\n.. _yadisk: https://github.com/ivknv/yadisk\n\n.. _issue #2: https://github.com/ivknv/yadisk/issues/2\n.. _issue #4: https://github.com/ivknv/yadisk/issues/4\n.. _issue #7: https://github.com/ivknv/yadisk/issues/7\n.. _PR #1: https://github.com/ivknv/yadisk-async/pull/1\n.. _issue #23: https://github.com/ivknv/yadisk/issues/23\n.. _PR #6: https://github.com/ivknv/yadisk-async/pull/6\n.. _issue #26: https://github.com/ivknv/yadisk/issues/26\n.. _issue #28: https://github.com/ivknv/yadisk/issues/28\n.. _issue #29: https://github.com/ivknv/yadisk/issues/29\n.. _PR #31: https://github.com/ivknv/yadisk/pull/31\n\n* **Release 1.4.5 (2023-12-14)**\n\n  * Added a deprecation warning on import\n  * This library is no longer maintained, use\n    `yadisk \u003chttps://pypi.org/project/yadisk\u003e`__\u003e=2.0.0 instead, it also\n    supports async API.\n\n* **Release 1.4.4 (2023-10-15)**\n\n  * :code:`upload()` and :code:`download()` (and related) methods can now\n    upload/download non-seekable file-like objects (e.g. :code:`stdin` or :code:`stdout`\n    when open in binary mode), see `PR #31`_\n\n* **Release 1.4.3 (2023-04-22)**\n\n  * :code:`app:/` paths now work correctly (see `issue #26`_)\n\n* **Release 1.4.2 (2023-03-20)**\n\n  * Fixed `issue #29`_: TypeError: 'type' object is not subscriptable\n  * Fixed a bug affecting Python \u003c3.9: TypeError: Too many parameters for typing.AsyncIterable; actual 2, expected 1\n\n* **Release 1.4.1 (2023-02-28)**\n\n  * Fixed `issue #28`_: calling :code:`download_public()` with :code:`path` keyword argument raises :code:`TypeError`\n  * Fixed :code:`AttributeError` raised when calling :code:`ResourceLinkObject.public_listdir()`\n\n* **Release 1.4.0 (2023-01-30)**\n\n  * Added convenience methods to :code:`...Object` objects (e.g. see :code:`ResourceObject` in docs)\n  * Added type hints\n  * Improved error checking and response validation\n  * Added :code:`InvalidResponseError`, :code:`PayloadTooLargeError`, :code:`UploadTrafficLimitExceededError`\n  * Added a few missing fields to :code:`DiskInfoObject` and :code:`SystemFoldersObject`\n  * Added :code:`rename()`, :code:`upload_by_link()` and :code:`download_by_link()` methods\n  * Added :code:`default_args` field for :code:`YaDisk` object\n  * :code:`download()` and :code:`upload()` now return :code:`ResourceLinkObject`\n  * Returned :code:`LinkObject` instances have been replaced by more specific subclasses\n  * :code:`TimeoutError` now also triggers a retry\n  * Added support for async files for :code:`download()` and :code:`upload()`\n  * Use :code:`aiofiles` to open files by default\n\n* **Release 1.3.6 (2023-01-20)**\n\n  * Fixed `issue #26`_: ':' character in filenames causes :code:`BadRequestError`.\n    This is due the behavior of Yandex.Disk's REST API itself but is avoided\n    on the library level with this fix.\n\n* **Release 1.3.5 (2022-11-10)**\n\n  * Fixed a bug in :code:`is_file()` and :code:`is_dir()`: a typo was causing\n    :code:`AttributeError` (`PR #6`_).\n\n* **Release 1.3.4 (2022-08-17)**\n\n  * Fixed a bug in :code:`check_token()`: could throw :code:`ForbiddenError` if\n    the application lacks necessary permissions (`issue #23`_).\n\n* **Release 1.3.3 (2021-12-31)**\n\n  * Fixed an issue where :code:`http://` links were not recognized as operation links\n    (they were assumed to always be :code:`https://`, since all the other\n    requests are always HTTPS).\n    Occasionally, Yandex.Disk can for some reason return an :code:`http://` link\n    to an asynchronous operation instead of :code:`https://`.\n    Both links are now recognized correctly and an :code:`https://` version will\n    always be used by :code:`get_operation_status()`, regardless of which one\n    Yandex.Disk returned.\n\n* **Release 1.3.2 (2021-07-10)**\n\n  * Fixed :code:`__version__` having the old value\n\n* **Release 1.3.1 (2021-07-10)**\n\n  * Fixed :code:`AttributeError` in :code:`SessionWithHeaders` (`PR #1`_)\n  * Fixed trash bin tests\n\n* **Release 1.3.0 (2019-07-06)**\n\n  * Modified the original library (`yadisk`_) to support `async/await`\n  * The library was renamed to `yadisk-async`\n\nThe following releases are for `yadisk`_, the original library:\n\n* **Release 1.2.14 (2019-03-26)**\n\n  * Fixed a :code:`TypeError` in :code:`get_public_*` functions when passing :code:`path` parameter\n    (see `issue #7`_)\n  * Added :code:`unlimited_autoupload_enabled` attribute for :code:`DiskInfoObject`\n\n* **Release 1.2.13 (2019-02-23)**\n\n  * Added :code:`md5` parameter for :code:`remove()`\n  * Added :code:`UserPublicInfoObject`\n  * Added :code:`country` attribute for :code:`UserObject`\n  * Added :code:`photoslice_time` attribute for :code:`ResourceObject`, :code:`PublicResourceObject`\n    and :code:`TrashResourceObject`\n\n* **Release 1.2.13 (2019-02-23)**\n\n  * Added :code:`md5` parameter for :code:`remove()`\n  * Added :code:`UserPublicInfoObject`\n  * Added :code:`country` attribute for :code:`UserObject`\n  * Added :code:`photoslice_time` attribute for :code:`ResourceObject`, :code:`PublicResourceObject`\n    and :code:`TrashResourceObject`\n\n* **Release 1.2.12 (2018-10-11)**\n\n  * Fixed `fields` parameter not working properly in `listdir()` (`issue #4`_)\n\n* **Release 1.2.11 (2018-06-30)**\n\n  * Added the missing parameter :code:`sort` for :code:`get_meta()`\n  * Added :code:`file` and :code:`antivirus_status` attributes for :code:`ResourceObject`,\n    :code:`PublicResourceObject` and :code:`TrashResourceObject`\n  * Added :code:`headers` parameter\n  * Fixed a typo in :code:`download()` and :code:`download_public()` (`issue #2`_)\n  * Removed :code:`*args` parameter everywhere\n\n* **Release 1.2.10 (2018-06-14)**\n\n  * Fixed :code:`timeout=None` behavior. :code:`None` is supposed to mean 'no timeout' but\n    in the older versions it was synonymous with the default timeout.\n\n* **Release 1.2.9 (2018-04-28)**\n\n  * Changed the license to LGPLv3 (see :code:`COPYING` and :code:`COPYING.lesser`)\n  * Other package info updates\n\n* **Release 1.2.8 (2018-04-17)**\n\n  * Fixed a couple of typos: :code:`PublicResourceListObject.items` and\n    :code:`TrashResourceListObject.items` had wrong types\n  * Substitute field aliases in :code:`fields` parameter when performing\n    API requests (e.g. :code:`embedded` -\u003e :code:`_embedded`)\n\n* **Release 1.2.7 (2018-04-15)**\n\n  * Fixed a file rewinding bug when uploading/downloading files after a retry\n\n* **Release 1.2.6 (2018-04-13)**\n\n  * Now caching :code:`requests` sessions so that open connections\n    can be reused (which can significantly speed things up sometimes)\n  * Disable :code:`keep-alive` when uploading/downloading files by default\n\n* **Release 1.2.5 (2018-03-31)**\n\n  * Fixed an off-by-one bug in :code:`utils.auto_retry()`\n    (which could sometimes result in :code:`AttributeError`)\n  * Retry the whole request for :code:`upload()`, :code:`download()` and :code:`download_public()`\n  * Set :code:`stream=True` for :code:`download()` and :code:`download_public()`\n  * Other minor fixes\n\n* **Release 1.2.4 (2018-02-19)**\n\n  * Fixed :code:`TokenObject` having :code:`exprires_in` instead of :code:`expires_in` (fixed a typo)\n\n* **Release 1.2.3 (2018-01-20)**\n\n  * Fixed a :code:`TypeError` when :code:`WrongResourceTypeError` is raised\n\n* **Release 1.2.2 (2018-01-19)**\n\n  * :code:`refresh_token()` no longer requires a valid or empty token.\n\n* **Release 1.2.1 (2018-01-14)**\n\n  * Fixed auto retries not working. Whoops.\n\n* **Release 1.2.0 (2018-01-14)**\n\n  * Fixed passing :code:`n_retries=0` to :code:`upload()`,\n    :code:`download()` and :code:`download_public()`\n  * :code:`upload()`, :code:`download()` and :code:`download_public()`\n    no longer return anything (see the docs)\n  * Added :code:`utils` module (see the docs)\n  * Added :code:`RetriableYaDiskError`, :code:`WrongResourceTypeError`,\n    :code:`BadGatewayError` and :code:`GatewayTimeoutError`\n  * :code:`listdir()` now raises :code:`WrongResourceTypeError`\n    instead of :code:`NotADirectoryError`\n\n* **Release 1.1.1 (2017-12-29)**\n\n  * Fixed argument handling in :code:`upload()`, :code:`download()` and :code:`download_public()`.\n    Previously, passing :code:`n_retries` and :code:`retry_interval` would raise an exception (:code:`TypeError`).\n\n* **Release 1.1.0 (2017-12-27)**\n\n  * Better exceptions (see the docs)\n  * Added support for :code:`force_async` parameter\n  * Minor bug fixes\n\n* **Release 1.0.8 (2017-11-29)**\n\n  * Fixed yet another :code:`listdir()` bug\n\n* **Release 1.0.7 (2017-11-04)**\n\n  * Added :code:`install_requires` argument to :code:`setup.py`\n\n* **Release 1.0.6 (2017-11-04)**\n\n  * Return :code:`OperationLinkObject` in some functions\n\n* **Release 1.0.5 (2017-10-29)**\n\n  * Fixed :code:`setup.py` to exclude tests\n\n* **Release 1.0.4 (2017-10-23)**\n\n  * Fixed bugs in :code:`upload`, :code:`download` and :code:`listdir` functions\n  * Set default :code:`listdir` :code:`limit` to :code:`10000`\n\n* **Release 1.0.3 (2017-10-22)**\n\n  * Added settings\n\n* **Release 1.0.2 (2017-10-19)**\n\n  * Fixed :code:`get_code_url` function (added missing parameters)\n\n* **Release 1.0.1 (2017-10-18)**\n\n  * Fixed a major bug in :code:`GetTokenRequest` (added missing parameter)\n\n* **Release 1.0.0 (2017-10-18)**\n\n  * Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivknv%2Fyadisk-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivknv%2Fyadisk-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivknv%2Fyadisk-async/lists"}