Skip to content

Commit 48b94e4

Browse files
authored
Merge pull request #61 from ivknv/dev
Merge changes from the dev branch for version 3.4.0
2 parents a51c8c9 + cbb5507 commit 48b94e4

40 files changed

+5767
-2175
lines changed

.github/workflows/lint_and_test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Perform linting and run tests
22

3-
on:
3+
permissions:
4+
contents: read
5+
6+
on:
47
push:
58
branches:
69
- master

README.en.rst

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ For synchronous API (installs :code:`requests`):
4747

4848
.. code:: bash
4949
50-
pip install yadisk[sync_defaults]
50+
pip install yadisk[sync-defaults]
5151
5252
For asynchronous API (installs :code:`aiofiles` and :code:`httpx`):
5353

5454
.. code:: bash
5555
56-
pip install yadisk[async_defaults]
56+
pip install yadisk[async-defaults]
5757
5858
Alternatively, you can manually choose which optional libraries to install:
5959

@@ -63,7 +63,7 @@ Alternatively, you can manually choose which optional libraries to install:
6363
pip install yadisk[pycurl]
6464
6565
# For use with aiohttp, will also install aiofiles
66-
pip install yadisk[async_files,aiofiles]
66+
pip install yadisk[async-files,aiofiles]
6767
6868
Examples
6969
********
@@ -182,6 +182,35 @@ Changelog
182182
.. _Migration Guide: https://yadisk.readthedocs.io/en/latest/migration_guide.html
183183
.. _PR #57: https://github.com/ivknv/yadisk/pull/57
184184

185+
* **Release 3.4.0 (2025-07-10)**
186+
187+
* New features:
188+
189+
* Added methods for managing public settings of resources:
190+
191+
* :code:`Client.update_public_settings()`
192+
* :code:`Client.get_public_settings()`
193+
* :code:`Client.get_public_available_settings()`
194+
195+
Note, it appears that these API endpoints do not fully conform to the
196+
official REST API documentation, their functionality is limited in
197+
practice.
198+
199+
* Added new exception class :code:`PasswordRequiredError`
200+
201+
* Added several new fields for :code:`DiskInfoObject`:
202+
203+
* :code:`deletion_restricion_days`
204+
* :code:`hide_screenshots_in_photoslice`
205+
* :code:`is_legal_entity`
206+
207+
* Implemented the :code:`__dir__()` method for response objects
208+
209+
* Improvements:
210+
211+
* :code:`repr()` of API response objects now only shows the keys that are
212+
actually present (instead of displaying them as :code:`None` like before)
213+
185214
* **Release 3.3.0 (2025-04-29)**
186215

187216
* New features:
@@ -197,7 +226,7 @@ Changelog
197226

198227
* Bug fixes:
199228

200-
* :code:`Client.wait_for_operation()` now uses :code:`time.monotonic()`
229+
* :code:`Client.wait_for_operation()` now uses :code:`time.monotonic()`
201230
instead of :code:`time.time()`
202231

203232
* Improvements:

README.rst

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ YaDisk
33

44
.. |RTD Badge| image:: https://img.shields.io/readthedocs/yadisk.svg
55
:alt: Read the Docs
6-
:target: https://yadisk.readthedocs.io/en/latest/
6+
:target: https://yadisk.readthedocs.io/ru/latest/
77

88
.. |CI Badge| image:: https://img.shields.io/github/actions/workflow/status/ivknv/yadisk/lint_and_test.yml
99
:alt: GitHub Actions Workflow Status
@@ -51,13 +51,13 @@ YaDisk - это библиотека-клиент REST API Яндекс.Диск
5151

5252
.. code:: bash
5353
54-
pip install yadisk[sync_defaults]
54+
pip install yadisk[sync-defaults]
5555
5656
Для асинхронного API (устанавливает :code:`httpx` и :code:`aiofiles`):
5757

5858
.. code:: bash
5959
60-
pip install yadisk[async_defaults]
60+
pip install yadisk[async-defaults]
6161
6262
Вы можете также вручную установить нужные библиотеки:
6363

@@ -67,7 +67,7 @@ YaDisk - это библиотека-клиент REST API Яндекс.Диск
6767
pip install yadisk[pycurl]
6868
6969
# Для использования совместно с aiohttp, также установит aiofiles
70-
pip install yadisk[async_files,aiohttp]
70+
pip install yadisk[async-files,aiohttp]
7171
7272
Примеры
7373
*******
@@ -186,6 +186,36 @@ YaDisk - это библиотека-клиент REST API Яндекс.Диск
186186
.. _Руководство по миграции: https://yadisk.readthedocs.io/ru/latest/migration_guide.html
187187
.. _PR #57: https://github.com/ivknv/yadisk/pull/57
188188

189+
* **Release 3.4.0 (2025-07-10)**
190+
191+
* Нововведения:
192+
193+
* Добавлены методы для управления настройками публичного доступа к ресурсам:
194+
195+
* :code:`Client.update_public_settings()`
196+
* :code:`Client.get_public_settings()`
197+
* :code:`Client.get_public_available_settings()`
198+
199+
Внимание: похоже, что эти эндпоинты не полностью соответствуют
200+
официальной документации REST API, их функциональность на практике
201+
ограничена.
202+
203+
* Добавлен новый класс исключений :code:`PasswordRequiredError`
204+
205+
* Добавлено несколько новых полей :code:`DiskInfoObject`:
206+
207+
* :code:`deletion_restricion_days`
208+
* :code:`hide_screenshots_in_photoslice`
209+
* :code:`is_legal_entity`
210+
211+
* Реализован метод :code:`__dir__()` для объектов ответов сервера
212+
213+
* Улучшения:
214+
215+
* :code:`repr()` объектов ответов API теперь показывает только те ключи,
216+
которые фактически присутствуют (вместо отображения их значений как
217+
:code:`None`, как раньше)
218+
189219
* **Release 3.3.0 (2025-04-29)**
190220

191221
* Нововведения:

README.ru.rst

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ YaDisk
33

44
.. |RTD Badge| image:: https://img.shields.io/readthedocs/yadisk.svg
55
:alt: Read the Docs
6-
:target: https://yadisk.readthedocs.io/en/latest/
6+
:target: https://yadisk.readthedocs.io/ru/latest/
77

88
.. |CI Badge| image:: https://img.shields.io/github/actions/workflow/status/ivknv/yadisk/lint_and_test.yml
99
:alt: GitHub Actions Workflow Status
@@ -51,13 +51,13 @@ YaDisk - это библиотека-клиент REST API Яндекс.Диск
5151

5252
.. code:: bash
5353
54-
pip install yadisk[sync_defaults]
54+
pip install yadisk[sync-defaults]
5555
5656
Для асинхронного API (устанавливает :code:`httpx` и :code:`aiofiles`):
5757

5858
.. code:: bash
5959
60-
pip install yadisk[async_defaults]
60+
pip install yadisk[async-defaults]
6161
6262
Вы можете также вручную установить нужные библиотеки:
6363

@@ -67,7 +67,7 @@ YaDisk - это библиотека-клиент REST API Яндекс.Диск
6767
pip install yadisk[pycurl]
6868
6969
# Для использования совместно с aiohttp, также установит aiofiles
70-
pip install yadisk[async_files,aiohttp]
70+
pip install yadisk[async-files,aiohttp]
7171
7272
Примеры
7373
*******
@@ -186,6 +186,36 @@ YaDisk - это библиотека-клиент REST API Яндекс.Диск
186186
.. _Руководство по миграции: https://yadisk.readthedocs.io/ru/latest/migration_guide.html
187187
.. _PR #57: https://github.com/ivknv/yadisk/pull/57
188188

189+
* **Release 3.4.0 (2025-07-10)**
190+
191+
* Нововведения:
192+
193+
* Добавлены методы для управления настройками публичного доступа к ресурсам:
194+
195+
* :code:`Client.update_public_settings()`
196+
* :code:`Client.get_public_settings()`
197+
* :code:`Client.get_public_available_settings()`
198+
199+
Внимание: похоже, что эти эндпоинты не полностью соответствуют
200+
официальной документации REST API, их функциональность на практике
201+
ограничена.
202+
203+
* Добавлен новый класс исключений :code:`PasswordRequiredError`
204+
205+
* Добавлено несколько новых полей :code:`DiskInfoObject`:
206+
207+
* :code:`deletion_restricion_days`
208+
* :code:`hide_screenshots_in_photoslice`
209+
* :code:`is_legal_entity`
210+
211+
* Реализован метод :code:`__dir__()` для объектов ответов сервера
212+
213+
* Улучшения:
214+
215+
* :code:`repr()` объектов ответов API теперь показывает только те ключи,
216+
которые фактически присутствуют (вместо отображения их значений как
217+
:code:`None`, как раньше)
218+
189219
* **Release 3.3.0 (2025-04-29)**
190220

191221
* Нововведения:

docs/api_reference/async_api.rst

Lines changed: 137 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,142 @@ Asynchronous API
22
================
33

44
.. autoclass:: yadisk.AsyncClient
5-
:members:
5+
6+
.. automethod:: close
67

78
.. autoclass:: yadisk.AsyncYaDisk
9+
10+
Authentication
11+
--------------
12+
13+
.. automethod:: yadisk.AsyncClient.check_token
14+
.. automethod:: yadisk.AsyncClient.get_auth_url
15+
.. automethod:: yadisk.AsyncClient.get_code_url
16+
.. automethod:: yadisk.AsyncClient.get_device_code
17+
.. automethod:: yadisk.AsyncClient.get_token
18+
.. automethod:: yadisk.AsyncClient.get_token_from_device_code
19+
.. automethod:: yadisk.AsyncClient.refresh_token
20+
.. automethod:: yadisk.AsyncClient.revoke_token
21+
22+
Disk Info
23+
---------
24+
25+
.. automethod:: yadisk.AsyncClient.get_disk_info
26+
27+
Metadata About Files
28+
--------------------
29+
30+
.. automethod:: yadisk.AsyncClient.get_meta
31+
.. automethod:: yadisk.AsyncClient.listdir
32+
.. automethod:: yadisk.AsyncClient.exists
33+
.. automethod:: yadisk.AsyncClient.get_type
34+
.. automethod:: yadisk.AsyncClient.is_file
35+
.. automethod:: yadisk.AsyncClient.is_dir
36+
.. automethod:: yadisk.AsyncClient.get_files
37+
.. automethod:: yadisk.AsyncClient.get_last_uploaded
38+
39+
Uploading Files
40+
---------------
41+
42+
.. automethod:: yadisk.AsyncClient.upload
43+
.. automethod:: yadisk.AsyncClient.get_upload_link
44+
.. automethod:: yadisk.AsyncClient.get_upload_link_object
45+
.. automethod:: yadisk.AsyncClient.upload_by_link
46+
.. automethod:: yadisk.AsyncClient.upload_url
47+
48+
Downloading Files
49+
-----------------
50+
51+
.. automethod:: yadisk.AsyncClient.download
52+
.. automethod:: yadisk.AsyncClient.get_download_link
53+
.. automethod:: yadisk.AsyncClient.download_by_link
54+
55+
56+
File Operations
57+
---------------
58+
59+
Creating Directories
60+
^^^^^^^^^^^^^^^^^^^^
61+
62+
.. automethod:: yadisk.AsyncClient.mkdir
63+
.. automethod:: yadisk.AsyncClient.makedirs
64+
65+
66+
Removing Files
67+
^^^^^^^^^^^^^^
68+
.. automethod:: yadisk.AsyncClient.remove
69+
70+
Copying Files
71+
^^^^^^^^^^^^^
72+
.. automethod:: yadisk.AsyncClient.copy
73+
74+
Moving Files
75+
^^^^^^^^^^^^
76+
77+
.. automethod:: yadisk.AsyncClient.move
78+
.. automethod:: yadisk.AsyncClient.rename
79+
80+
Setting Custom Properties
81+
^^^^^^^^^^^^^^^^^^^^^^^^^
82+
83+
.. automethod:: yadisk.AsyncClient.patch
84+
85+
Public Files
86+
------------
87+
88+
Publishing/Unpublishing Files
89+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90+
91+
.. automethod:: yadisk.AsyncClient.publish
92+
.. automethod:: yadisk.AsyncClient.unpublish
93+
94+
Metadata About Public Files
95+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
96+
97+
.. automethod:: yadisk.AsyncClient.get_public_meta
98+
.. automethod:: yadisk.AsyncClient.get_public_type
99+
.. automethod:: yadisk.AsyncClient.is_public_dir
100+
.. automethod:: yadisk.AsyncClient.is_public_file
101+
.. automethod:: yadisk.AsyncClient.public_exists
102+
103+
Downloading Public Files
104+
^^^^^^^^^^^^^^^^^^^^^^^^
105+
106+
.. automethod:: yadisk.AsyncClient.get_public_download_link
107+
.. automethod:: yadisk.AsyncClient.download_public
108+
109+
Saving Public Resources to Disk
110+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111+
112+
.. automethod:: yadisk.AsyncClient.save_to_disk
113+
114+
Listing Public Files
115+
^^^^^^^^^^^^^^^^^^^^
116+
117+
.. automethod:: yadisk.AsyncClient.get_public_resources
118+
.. automethod:: yadisk.AsyncClient.get_all_public_resources
119+
120+
Public Access Settings
121+
----------------------
122+
123+
.. automethod:: yadisk.AsyncClient.get_public_settings
124+
.. automethod:: yadisk.AsyncClient.get_public_available_settings
125+
.. automethod:: yadisk.AsyncClient.update_public_settings
126+
127+
Trash
128+
-----
129+
130+
.. automethod:: yadisk.AsyncClient.get_trash_meta
131+
.. automethod:: yadisk.AsyncClient.trash_exists
132+
.. automethod:: yadisk.AsyncClient.restore_trash
133+
.. automethod:: yadisk.AsyncClient.remove_trash
134+
.. automethod:: yadisk.AsyncClient.trash_listdir
135+
.. automethod:: yadisk.AsyncClient.get_trash_type
136+
.. automethod:: yadisk.AsyncClient.is_trash_dir
137+
.. automethod:: yadisk.AsyncClient.is_trash_file
138+
139+
Checking Operation Status
140+
-------------------------
141+
142+
.. automethod:: yadisk.AsyncClient.get_operation_status
143+
.. automethod:: yadisk.AsyncClient.wait_for_operation

0 commit comments

Comments
 (0)