tarfile
Stdlib — CompressionPython 2.0+Intermediate
Read and write tar archives (.tar.gz, .tar.bz2)
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
- Dependencies
- None — Python Standard Library
- Install
Included with Python
Learn by Difficulty
Quick Example
python
import tarfile print(f"Module: tarfile") print(f"Contents: {dir(tarfile)[:10]}")
The tarfile module is part of Python's standard library. Read and write tar archives (.tar.gz, .tar.bz2).
Try in PlaygroundTags
stdlibcompressionarchive