Skip to main content

Create a boilerplate folder and file structure for python projects.

Project description


     _____ / /_ _____ __  __ _____ / /_ __  __ _____ ___         ____ ___   ___ 
    / ___// __// ___// / / // ___// __// / / // ___// _ \       / __ `__ \ / _ \
   (__  )/ /_ / /   / /_/ // /__ / /_ / /_/ // /   /  __/      / / / / / //  __/
  /____/ \__//_/    \__,_/ \___/ \__/ \__,_//_/    \___/______/_/ /_/ /_/ \___/ 
                                                       /_____/                 

Helping newbies and pros in creating a starting structure for python projects, following some of the general guidelines and principles widely used.

Table of Contents

Quick start

Instalation:

  • pip:
    pip install structure_me
  • github:
    git clone https://github.com/the-marcos/structure_me.git

General Guidance

The usage should be rather straight forward. Following Django's default approach and using setuptools to package your software, with the intent to hosting it in pypi. These are the steps I recommend:

  1. Create a root folder for your project, by default the same as your project's name. See the Examples section below for a sample tree of how your folder structure should look like after running the program.

  2. Navigate to the root folder you created and run the script following the recipe described in the Examples section below.

  3. I recommend using the --verbose argument as it will create files with descriptions that are easy to follow along. If you know what you are doing, or feeling adventurous be my guest to generate empty files and populating them yourselves.

  4. Create a repository in github, and clone it to the root folder of your project. It is a good idea to have github start a repo with a .gitignore. This file is not generated by default, and I do not intend in creating it this way. Let github do the work.

  5. GO DEVELOP YOUR IDEAS!

  6. Once you are ready to ship an alpha or beta version of your software, ensure you have setuptools installed and follow along the instructions here.

Examples

Example usage can be checked by running:
python structure_me -h

There are two predefined ways of running this program:

  1. Verbose files: create folder/file structures with django like comments on the files making it easier for new users to create their first programs.

python structure_me -n <project_name> -v

  1. Simple: create a simple folder/file structure. No comments.

python structure_me -n <project_name>

Considering you follow the guidance and execute the above commands in a folder named 'project_name' a succesful execution will generate the following folder tree:

project_name  
    ├── examples  
    │   └── example.py  
    ├── src  
    │    └── project_name  
    │        └── __init__.py  
    ├── tests  
    │   └── __init__.py  
    ├── LICENSE.txt  
    ├── README.MD  
    └── setup.py  

Author

Marcos Paterson

Inspiration and background

In May 2020, while in the initial steps of learning django, I was amazed to see how easy it was to create a new project/app, and that django had a functionality that would create an entire folder structure and the baseline files with helpful tips along the way.

Then started the search to find a similar package that would do just that. Create a baseline/boiler plate folder and file structure, so I could dig into the core of the development, without worrying about having the structure around it.

I found none. That would fit my needs. Simple. Straight Forward. So here we go! If by any chance you know of other more fitted alternatives, I'd love to hear about it.

Inspirations:

Copyright and license

Code and documentation copyright 2020 the-marcos. Code released under the MIT License.

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

structure_me-0.41a0.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file structure_me-0.41a0.tar.gz.

File metadata

  • Download URL: structure_me-0.41a0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for structure_me-0.41a0.tar.gz
Algorithm Hash digest
SHA256 25bdf2f93683bd8f638ae3af12e9ac4ae7a8b01b2d0c3d8f4f7342ff4bab0cea
MD5 535b8037e38d6aff3767f7b9f5d4de75
BLAKE2b-256 17cc76f2ba8198d7d2a721efeb13894a90f7cfa21359c488d450651344273769

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