https://github.com/samuelmarks/python-package-gen
Simple code-generator using only stdlib. Supports two modes, single file and folder.
https://github.com/samuelmarks/python-package-gen
Last synced: 9 months ago
JSON representation
Simple code-generator using only stdlib. Supports two modes, single file and folder.
- Host: GitHub
- URL: https://github.com/samuelmarks/python-package-gen
- Owner: SamuelMarks
- License: apache-2.0
- Created: 2015-02-12T21:03:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T17:43:25.000Z (over 2 years ago)
- Last Synced: 2025-03-23T01:27:49.332Z (over 1 year ago)
- Language: Python
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
python package gen
==================
[](http://unmaintained.tech)

[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/psf/black)
Simple code-generator using only stdlib. Supports two modes, single file and folder.
Both provide tests (unittest) and support for:
python setup.py install
python setup.py test
## Install
pip install https://github.com/SamuelMarks/python-package-gen/zipball/master#egg=python_package_gen
## Example run
python -m python_package_gen -n bar -o bar
### Generates
$ tree -a bar --charset=ascii
bar
|-- .editorconfig
|-- .gitignore
|-- README.md
|-- bar
| |-- __init__.py
| `-- _data
| `-- logging.yml
|-- requirements.txt
`-- setup.py
2 directories, 7 files
## Usage
$ python -m python_package_gen -h
usage: __main__.py [-h] -n NAME [-a AUTHOR] [-d DESCRIPTION] [-v VERSION] [-t]
[-o OUTPUT_DIRECTORY] [-s] [-f]
Generate project scaffold
optional arguments:
-h, --help show this help message and exit
-n NAME, --name NAME Package name
-a AUTHOR, --author AUTHOR
Author name [Samuel Marks]
-d DESCRIPTION, --description DESCRIPTION
Description
-v VERSION, --version VERSION
Version number [0.0.1]
-t, --tests Generate unittests [True]
-o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
Directory to extract to [tempdir/ISO-time with s/:/_]
-s, --single-file single-file project [False]
-f, --flatten on bad module-name, generate p-kg/p_kg,p-kg/setup.py
not p-kg/p_kg/setup.py [False]
## License
Licensed under any of:
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or )
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )
- CC0 license ([LICENSE-CC0](LICENSE-CC0) or )
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
licensed as above, without any additional terms or conditions.