A command-line tool to create python packages
Project description
A simple and quick command line tool to create python packages.
Install
$ pip install do-pack
Usage
The config command
$ do config
Use it to fill common fields once (if executed twice it will overwrite the previous configuration).
Create a default python project
$ do create <project-name>
Create a project using one of the available templates
$ do create <project-name> -t <template>
-t is the short for –template.
Available templates:
flask
django
pymin (minimal python project)
To use your own template you need to store it in a .json file in your current directory, e.g.:
my_template.json
And use it by:
$ do create my_project -t my_template
A step by step setup for new projects
$ do assistant
This command help you fill:
setup.py
AUTHORS.rst
LICENSE
.gitignore with rules for Linux, MacOs, Windows, Python, Visual Studio, VS Code, Sublime Text and Pycharm (made with https://www.gitignore.io/).
Default Folder Structure and Templates
This is the folder structure created when using do create <my_project> and do assistant.
project_folder ├── project │ ├── __init__.py │ └── project.py ├── docs │ └── index.rst ├── tests │ ├── __init__.py │ └── project_test.py ├── .gitignore ├── LICENSE ├── README.rst ├── AUTHORS.rst ├── setup.py ├── requirements.txt └── test-requirements.txt
The template system use a .json file in wich the keys are folders and the values are files.
Every time a folder is created, the program will automatically enter it. If you need to exit that folder so the next one is placed in the same directory, place a <-- in the files (values) as many times needed.
Folders (keys) base and bin are replaced with the project name.
project.py is replaced with the project name (e.g. my_project.py).
In test_projet.py, project is replaced with the project name (e.g. test_my_project.py)
This is the template for the default folder structure:
{ "base": [ "LICENSE", "setup.py", "README.rst", "AUTHORS.rst", ".gitignore", "requirements.txt", "test-requirements.txt", "MANIFEST.in" ], "bin": [ "project.py", "__init__.py", "<--" ], "docs": [ "index.rst", "<--" ], "tests": [ "__init__.py", "test_project.py", "<--" ] }
TODOs
Implement --template for the assistant command (75%).
Add github username to the config command for the project url.
Generate the documentation (sphinx).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file do-pack-0.1.4.tar.gz
.
File metadata
- Download URL: do-pack-0.1.4.tar.gz
- Upload date:
- Size: 57.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5c94b57f5252b99237142a8657a1a54e3d09dd728eeb5f2dc6fbf1cd360bff9 |
|
MD5 | 18e49eb0ba4004d9a029c3a11ed0fc7a |
|
BLAKE2b-256 | 74dd69d32efa4e873180211ee110e05e7f56b01efb2e4fda0c5a8e02a13c973c |
File details
Details for the file do_pack-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: do_pack-0.1.4-py3-none-any.whl
- Upload date:
- Size: 77.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1a73aee60921bb6fac08f67e1cda5d2b9368e702943c14d8ab1da2bafbf9742 |
|
MD5 | ddbe9a88028df18c47f45dcad6a9e42b |
|
BLAKE2b-256 | b7e5a7fe6b62561753c32e11e0ff5337b741a0742010c9210c0dda1d6834955f |