Pathtype

Latest version: v1.0.0

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.0.0

**First release of the package !**

Introduces `pathtype.Path`, a class you can use as a `type` argument to use with `argparse`.

Contains the following predefined validations:
* `exists`, `not_exists`
* `readable`, `writable`, `executable`
* `parent_exists`
* `creatable`, `writable_or_creatable`
* `name_matches_re`, `name_matches_glob`
* `path_matches_re`, `path_matches_glob`

Also introduces the `pathtype.validation` module containing all the predefined validations to use in your custom validations.

Allows the user to create their own validator.

See the [README](https://github.com/xfrenette/pathtype) for full documentation.

0.1

- `pathtype.Path` created
- Supports custom validation through the `validator` parameter
- Predefined validations triggered by parameters to the `Path` class:
- `exists=True`: validate that the file or directory exists
- `readable=True`: validate that the current user has read access on the file or directory
- `writable=True`: validate that the current user has write access
- `executable=True`: validate that the current user has execute access

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.