Skip to main content

This is a very simple action for argparse that allows you to specify a readable or a writeable directory as an argparse action. I found it on StackOverflow years ago and used it since then, unfortunately I cannot find the original source now.

I guess it would be best to have this added directly into argparse anyway.

Usage

Just import and use as an action:

import argparse
import argparsedirs

argparser = argparse.ArgumentParser()

argparser.add_argument('indir', type=argparsedirs.ReadableDirType)
argparser.add_argument('outdir', type=argparsedirs.WriteableDirType)

args = argparser.parse_args()

Metadata

Release files for argparsedirs 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argparsedirs 0.2.1
File Size Uploaded Provenance
argparsedirs-0.2.1.tar.gz 1.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for argparsedirs 0.2.1
File Interpreter ABI Platform
argparsedirs-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.6 kB

Release files / argparsedirs-0.2.1.tar.gz

Download URL argparsedirs-0.2.1.tar.gz
Size 1.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3db491a9a6735c25cb46aab161551b1f910a1747e2768b469a92189ed65a5ea9
BLAKE2b-256 checksum
How to use checksums
6a1c1d37d36110e15a2fbc2d5b67d943d94aa6507c2a608cc990ec620eaff2a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.2 Linux/6.1.0-41-amd64

Release files / argparsedirs-0.2.1-py3-none-any.whl

Download URL argparsedirs-0.2.1-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9a243110a8af10e297deb5a3602d8860909563ab240de0753f4a1275965163c
BLAKE2b-256 checksum
How to use checksums
c35cf13a1c0e338143824bc24964dfccf0622047ef21e20cb35e1a0fdd620155
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.2 Linux/6.1.0-41-amd64

Security for argparsedirs 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page