Skip to main content

json2dir

A Python package that converts JSON to directory structure and vice versa.

Installation

pip install json2dir

Usage

Command Line Interface

# Convert JSON to directory structure
json2dir convert --input structure.json --output ./output_dir

# Convert directory structure to JSON
json2dir export --input ./my_directory --output structure.json

Python API

from json2dir import json_to_dir, dir_to_json

# Convert JSON to directory structure
json_to_dir("structure.json", "./output_dir")

# Convert directory structure to JSON
dir_to_json("./my_directory", "structure.json")

Example

Input JSON:

{
    "project": {
        "src": {
            "main.py": null,
            "utils": {
                "helper.py": null
            }
        },
        "tests": {
            "test_main.py": null
        },
        "README.md": null
    }
}

This will create a directory structure:

project/
├── src/
│   ├── main.py
│   └── utils/
│       └── helper.py
├── tests/
│   └── test_main.py
└── README.md

License

MIT License

Metadata

Release files for json2dir 0.1.0

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

Source distribution (sdist)

Source distribution for json2dir 0.1.0
File Size Uploaded Provenance
json2dir-0.1.0.tar.gz 2.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.0 kB

Release files / json2dir-0.1.0.tar.gz

Download URL json2dir-0.1.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
32b0dd1e3f0b6b8e21d2a2cea9f6d22790f45099112d525710cada39039b3863
BLAKE2b-256 checksum
How to use checksums
d139c57782f8bdae41905af5ba2998f5b64abd5eef5a2f56d50e8ba67e8d18c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / json2dir-0.1.0-py3-none-any.whl

Download URL json2dir-0.1.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
433254ef6adaed4af952716c68a52adc26ad10033ac32ae8a36710d71efeb22b
BLAKE2b-256 checksum
How to use checksums
ac726ce3dcf0bfeb66cefe3f7df147c38540c47a6c6ff3924bba4243e6cba012
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.6

Security for json2dir 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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