E3SM-Project / zstash

Long term HPSS archiving tool for E3SM
BSD 3-Clause "New" or "Revised" License
8 stars 11 forks source link

[Feature]: Expose zstash commands via `import ztash` #331

Open aerorahul opened 7 months ago

aerorahul commented 7 months ago

How will this affect the next version number?

New feature (increment MINOR version)

Is your feature request related to a problem?

No problem. I would like to use zstash within an existing python program. For e.g.

from zstash import create
create(kwargs_to_create)

Similarly, other functions of zstash such as ls, extract, chgrp etc. could also be exposed.

Describe the solution you'd like

Making the methods such as setup_create in create.py take in optional arguments to allow passing the parser arguments as a dictionary. Doing so will allow create to be used directly from a calling python program.

There may be better more elegant solutions, but may need a redesign or refactor.

Describe alternatives you've considered

No response

Additional context

No response