directory_schema
Use JSON Schema to validate directory structures:
The specified directory is translated into a JSON structure like the output from tree -J,
and is validated against a JSON Schema, provided as a dict inside Python,
or as a JSON or YAML file through the CLI.
Sample schemas and directories are in the test fixtures.
Instructions for contributors are here.
CLI
$ directory_schema -h
usage: directory_schema [-h] DIRECTORY SCHEMA
positional arguments:
DIRECTORY Directory to validate
SCHEMA Schema (JSON or YAML) to validate against
optional arguments:
-h, --help show this help message and exit
Python
>>> from directory_schema import directory_schema
>>> directory_schema.validate_dir(
... 'tests/fixtures/just-a-placeholder',
... {'items':
... {'properties':
... {'name':
... {'pattern': 'not-placeholder'}}}}
... )
Traceback (most recent call last):
...
raise DirectoryValidationErrors(errors)
directory_schema.directory_schema.DirectoryValidationErrors: This string:
placeholder
fails this "pattern" check:
not-placeholder
...
Thank you
This package was created with Cookiecutter and the cs01/cookiecutter-pypackage project template.
Metadata
Release files for directory-schema 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| directory_schema-0.0.2.tar.gz | 5.4 kB | Without provenance | Details for directory_schema-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| directory_schema-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for directory_schema-0.0.2-py3-none-any.whl |
Total release size: 11.5 kB
Release files / directory_schema-0.0.2.tar.gz
| Download URL | directory_schema-0.0.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31119017582ac9f8122ad0ee41fc392cef73a6a1a9c6dedea83f27d90b33f1b5
|
|
BLAKE2b-256 checksum How to use checksums |
ff9d37f7f623fa813dc7409bda6f2d4a07e44c71063916c27cf778cc44db045c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
|
Release files / directory_schema-0.0.2-py3-none-any.whl
| Download URL | directory_schema-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e6b6a26a0c820740f1996cab70dc578b413c7c223eceb13a987a913a2956aa1
|
|
BLAKE2b-256 checksum How to use checksums |
7c96ca69e89cd52b10befadd8433fd56dd8863c055655045a76cbfd6da74bc89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1
|
Security for directory-schema 0.0.2
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.