fsspec / fsspec/filesystem_spec

[ENH] Temporary Files

Open
#797 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.4k
Forks
490
Avg merge
2d 3h
Merged PRs (30d)
38

Description

Hello,

Is it possible to implement temporary file features:

On close file, remove itself, like Tempfile

import tempfile
fp = tempfile.TemporaryFile()

# Would be like now
fs = build_filesystem('')
fp = fs.TemporaryFile()

Would be comfy and nice since your module is able to extend to many fs, while only local for tempfile

Br
Nicolas

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the build_filesystem('') entry point and the filesystem API it returns; compare the requested behavior with Python's tempfile.TemporaryFile documentation. Done means a temporary-file API is available through the filesystem abstraction and removes the file on close, with tests covering that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.