-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working example of using Async/Await #871
Comments
What kind of workflow would you like? Perhaps I can sketch out what you need to do, and you help update the docs? |
Thank you, I would like to learn more, see examples of how to use the reading (s3.open), writing and listing (s3.ls) methods in asynchronous code
|
all I need is an example of how to read files from the bucket, write files to the bucket and look at the listing of files on the bucket at the same time, so that it is all asynchronous 2023.4.0 or for now link only to the botocore library https://aiobotocore.readthedocs.io/en/latest/examples/s3/basic_usage.html |
Sorry to be slow, thanks for the ping.
You should note that the file-like interface (via |
do not quite understand😅
this is what this asynchronous reading looks like + - I figured it out after digging through your git😁 is there any example when writing is used?
since the only thing I found was also an issue #853 |
No, we do not have asynchronous stream writing, sorry. If you can think of a way to do it, I would be happy. |
Hello, |
I recently encountered this too and spent a long time figuring out what the problem was. There was just an error that the file was already closed. It turns out that the You could just override |
I think the following is the right way to do it. The API for async files for writing shouldn't change, but this will ensure an early not-implemented error: --- a/fsspec/asyn.py
+++ b/fsspec/asyn.py
@@ -1092,7 +1092,7 @@ class AbstractAsyncStreamedFile(AbstractBufferedFile):
raise NotImplementedError
async def _initiate_upload(self):
- pass
+ raise NotImplementedError |
What is the right way to use |
Would highly appreciate if anyone added a working example for Jupyterlab. RN this fails with async def foo():
fs = s3fs.S3FileSystem(profile=profile, asynchronous=True)
async with await fs.open(filepath, mode="rb") as f:
return pd.read_csv(f)
result = await foo()
All while simple async calls have been supported in Jupyter for quite a while now. There's something with the internal library workings, but I don't have enough time to dig into it. |
Hello, I’m working with s3fs and haven’t found any examples of how to work with asynchrony; after looking through your checklog I saw that you’ve already added functionality. Could you please tell me how to use asynchronous methods for reading/writing and listing files
the same question was asked in 2020
then this functionality was not ready and only a link to a small piece was provided https://s3fs.readthedocs.io/en/latest/#async
Thanks in advance for your attention!)
The text was updated successfully, but these errors were encountered: