commit 43de0cc60c79b8ad72ca4a6b2cff732f9fa285b9
parent c6b0018080fc594255fca99db26ece0b1c912f03
Author: archiveanon <>
Date: Mon, 23 Jun 2025 14:58:10 +0000
Add docstrings
Diffstat:
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/gofile/api.py b/src/gofile/api.py
@@ -124,6 +124,18 @@ async def upload_single(
folder_id: Optional[str] = None,
server: Optional[str] = None,
) -> GofileUpload:
+ """
+ Uploads a single file.
+
+ :param file: An open file handle.
+ :param token: Token used for uploading. If not specified, the returned
+ ``GofileUpload.result.guest_token`` should be used for subsequent uploads to
+ the same folder.
+ :param folder_id: Folder to upload to. If not specified, the returned
+ ``GofileUpload.result.parent_folder`` should be used for subsequent
+ uploads to the same folder.
+ :param server: A specific subdomain to upload to.
+ """
# we return a GofileUpload instead of a GofileUploadResult so there's consistency between upload_single / upload_multiple
if not server:
@@ -162,7 +174,9 @@ async def upload_multiple(
folder_id: Optional[str] = None,
server: Optional[str] = None,
) -> AsyncIterator[GofileUpload]:
- # returns a generator of GofileUpload instances in the same order files were given
+ """
+ Uploads multiple files to the same folder, returning an interator of results.
+ """
first_file, *other_files = files
if not server: