Skip to main content

No project description provided

Project description

Typing SVG

🔥 My Stats:

GitHub Streak

projectstructuremanager

ProjectStructureManager is a Python project for creating folder and file structures exactly as the developer modeled the project.

ProjectStructureManager Structure

The project has the following structure:

|--docs/
||--__init__.py
||--README_DE.md
||--README_RU.md
||--README_UA.md
|--psmanager/
||--__init__.py
||--project_structure_manager.py
|--tests/
||--__init__.py
||--test_psmanager.py
||--test_structure.json
|--LICENSE
|--main.py
|--README.md
|--requirements.txt
|--structure.json

Tech Stack

Server: Python 3.9^


Clone this repository

gh repo clone komanch7/projectstructuremanager psm-pro

cd psm-cli

  or

git clone https://github.com/komanch7/projectstructuremanager psm-pro

cd psm-pro

Create and activate a virtual environment

python -m venv venv

venv\Scripts\activate

python -m pip install --upgrade pip
  or
python3 -m pip install --upgrade pip

Usage

# main.py

from psmanager.project_structure_manager import ProjectStructureManager

if __name__ == "__main__":
    path = "."
    file_struct = "structure.json"
    manager = ProjectStructureManager(path, file_struct)
    manager.create_structure()

Installing modules from requirements.txt

  • If the requirements.txt file contains models, then enter the following command in the terminal
pip install -r requirements.txt

Command to run tests

python -m unittest discover -s tests 

Response

>> test_create_structure (test_psmanager.TestProjectStructureManager) ... ok
>> test_create_structure_with_content (test_psmanager.TestProjectStructureManager) ... ok
>> test_load_structure_from_json (test_psmanager.TestProjectStructureManager) ... ok
>> 
>> ----------------------------------------------------------------------
>> Ran 3 tests in 0.425s
>> 
>> OK

Create the structure

python main.py
  or
python3 main.py

Deactivate environment

  • Command to deactivate the virtual environment upon completion of work
deactivate

JSON test project model

{
    "mypackage": {
        "mypackage": {
            "controllers": {
                "__init__.py": "",
                "control_one.py": "",
                "control_two.py": "",
                "control_three.py": "",
                "control_four.py": ""
            },
            "__init__.py": "",
            "models": {
                "__init__.py": "",
                "model_one.py": "",
                "model_two.py": "",
                "model_three.py": "",
                "model_four.py": ""
            }
        },
        "__init__.py": "# None",
        "tests": {
            "__init__.py": "",
            "test_one.py": "",
            "test_two.py": "",
            "test_three.py": "",
            "test_four.py": ""
        },
        "docs": {
            "__init__.py": "",
            "README.md": ""
        },
        "main.py": "# main()",
        "requirements.txt": "# requirements.txt"
    }
}

Test Structure

Folder and file structure for the future project:

|--mypackage/
||--mypackage/
|||--__init__.py
|||--controllers/
||||--__init__.py
||||--control_one.py
||||--control_two.py
||||--control_three.py
||||--control_four.py
|||--models/
||||--__init__.py
||||--model_one.py
||||--model_two.py
||||--model_three.py
||||--model_four.py
||--tests/
||||--__init__.py
||||--test_one.py
||||--test_two.py
||||--test_three.py
||||--test_four.py
||--__init__.py
||--docs/
||||--__init__.py
||||--README.md
||--main.py
||--requirements.txt
||--LICENSE

🚀 About Me

  • I'm a beginner in Python development. Thank you for your understanding and support.

License

MIT

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

ProjectStructureManager-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

ProjectStructureManager-1.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file ProjectStructureManager-1.0.0.tar.gz.

File metadata

  • Download URL: ProjectStructureManager-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for ProjectStructureManager-1.0.0.tar.gz
Algorithm Hash digest
SHA256 44458b1db0521824568af40a8e2566a0f7b7266194002dcab3a019278e0aaa37
MD5 0870f921f29645218bb2a19b11697670
BLAKE2b-256 45da99e7aae67c9bd919cd9c3c8c8510f515ddcf44caff9b26dd029bd1ebc021

See more details on using hashes here.

File details

Details for the file ProjectStructureManager-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ProjectStructureManager-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d9d8322e82e731f6d0b06b22903587beddca77ac691a9acc70a080b1d2a7837
MD5 287c9499b1411e7b352b7a673ded6b42
BLAKE2b-256 02cea9cb758b67a1cb0983e260e9e04532c996968fd2e4ad746b1e5a57783a97

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