Package Info

python-temps


Context managers for creating and cleaning up temporary directories and files


Development/Languages/Python

temps is a python module containing context managers for creating and cleaning up temporary files and directories.

  • It has a context manager for creating a temp dir and another for temp files.
  • The context manager cleans up the dir or file upon context exit, not upon file closure.
  • No ambiguity about whether you can or cannot open a file twice.
  • You can set the permissions of the temp file or dir to what you want.
  • It is very clear what the implementation is:
    • directories are created and the path is returned.
    • files are not created, since you'll want to do that in a with open(filename) ... statement, and the path is returned.
    • directories and files are cleaned up by the context managers.
    • file and dir names are generated using the uuid module, which presumably will avoid race conditions.

License: MIT
URL: https://github.com/todddeluca/temps

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.3.0-bp153.1.13 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python-temps
0.3.0-bp152.3.15 info GA Release 2020-04-17 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python-temps
0.3.0-bp151.3.1 info GA Release 2019-07-17 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python-temps
0.3.0-bp151.2.10 info GA Release 2019-05-18 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python-temps
0.3.0-bp150.2.4 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • python-temps