Skip to content

pvpscript/pytar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pytar

An extremely simple tar wrapper that adds data as files in a tarball

Introduction

I wrote this code for a script I was writing that required raw data to be added as files and compressed inside a tarball. It makes use of the native python lib, tarfile

Usage

from pytar import Tar

with Tar('/home/user/filename.tar.gz') as tarball:
    tarball.add_file('hello.txt', 'Hello, World!')
    tarball.add_file('bye.txt', 'Goodbye, World!')

The example above will create, in the /home/user path, a file called filename.tar.gz that will have two files, hello.txt and bye.txt.

About

An extremely simple tar wrapper that adds data as files in a tarball

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages