Skip to main content

Templatree directory and file structure with predefined templates.

Project description

Templatree

Templatree is a lightweight Python CLI tool that scaffolds directory structures from simple text templates, flat paths or file lists. It also supports automatic virtual environment creation.

Features

  • Generate project folders from:
    • A tree-style structure (e.g., ├── main.py)
    • A flat path list (project/static/index.html)
  • Load structure from an external .txt file using --from-file
  • Create a virtual environment inside the project with -venv
  • Clean and simple CLI interface

Example use cases:

Template:

templatree create exampleproject
Would you like to send a (1) tree-style template or (2) flat path list? (1 or 2): 1
Enter your structure (end with a line containing only 'EOD'):
exampleproject/
├── main.py
├── static/
│   ├── index.html
│   ├── index.css
│   └── index.js
├── config/
│   └── settings.py
├── requirements.txt
└── README.md
EOD

Flat paths:

templatree create myproj
Would you like to send a (1) tree-style template or (2) flat path list? (1 or 2): 2
Enter your structure (end with a line containing only 'EOD'):
myproj/main.py
myproj/static/index.html
myproj/static/index.css
myproj/static/index.js
myproj/config/settings.py
myproj/requirements.txt
myproj/README.md
EOD

From a file:

templatree create -venv example_virtualenv --from-file example.txt exampleproject

Installation

pip install templatree

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

templatree-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

templatree-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file templatree-0.1.0.tar.gz.

File metadata

  • Download URL: templatree-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for templatree-0.1.0.tar.gz
Algorithm Hash digest
SHA256 37567e32d3320c41985675f2a4a8a5e4f6dc348a4ad792dea7538904ee1aaf76
MD5 87c32d99f95e3d2f35ff02ea6d92b2e4
BLAKE2b-256 072bfb43b272958b7be277960e35d8c6783c6727ce6a371cb20c0774673e1674

See more details on using hashes here.

File details

Details for the file templatree-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: templatree-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for templatree-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1721994a2354c08a910f46c5646772855ac9fde91ce5b48b13c25c8831dc1992
MD5 41bbd2faffdc77b967a754a14bcb2527
BLAKE2b-256 6a4fb3ea6c6fca76f3a15e57fa87e90c62baa02b9abe4bc2d6aaf537fec10e9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page