CreatePackage
Python package which creates the filestructure, basic readme, setup.py with dependencies provided on your requirements file, code blocks with class and function templates with doc strings.
Prerequisites
-
MakeTreeDir
Python package to easily create complex directory structures.
https://github.com/Sreekiranar/MakeTreeDir.git
from MakeTreeDir import MAKETREEDIR md=MAKETREEDIR() md.makedir('this/is/a/testing/package/creation') ### Corner cases md.makedir('/media/username/New Volume/folderName') md.makedir('../../../folderName') md.makedir('C:\\Users\\userName\\folderName')
Installation
You can easily install the package by
pip install createPackage
Running the tests
If you have to create a package with the following setup:
- Package Name:
demoPackage - code Blocks:
demoBlock1demoBlock2
- dependencies: contained inside a
requirements.txtin this structure :library1==0.1.0orlibrary2
After installing createPackage ,
from createPackage import createPackage
packageName='demoPackage'
codeBlocks=['demoBlock1','demoBlock2']
requirements='path/to/requirements.txt'
##init class
cp=createPackage(packageName,codeBlocks,requirements)
##call main function
cp.pythonPackage()
This will create the following folder structure.
demoPackage
│ README.md
│ setup.py
│
└───demoPackage
│ │ __init__.py
│ │ demoBlock1.py
│ │ demoBlock2.py
-
demoBlock1.pyanddemoBlock2.pywill have basic class structure and doc strings to be filled and modifed by the user. It will also be included in the init.py -
setup.pywill have all the dependencies from therequirements.txtmentioned like shown below:from setuptools import setup with open('README.md','r') as f: long_description = f.read() setup(name='demoPackage', version='0.1', description='enter the package description', long_description=long_description, long_description_content_type="text/markdown", url='enter the url', authors='author', author_email='emailid', license='MIT', packages=['demoPackage'], install_requires=['library1==0.1.0','library2'], include_package_data=True, zip_safe=False)
-
There will a standard
README.mdtemplate which can be filled accordingly.
Authors
- Sreekiran A R - Analytics Consultant, AI Labs, Bridgei2i Analytics Solutions - Github , Stackoverflow
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Metadata
Release files for createPackage 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| createPackage-1.0.tar.gz | 4.0 kB | Without provenance | Details for createPackage-1.0.tar.gz |
Release files / createPackage-1.0.tar.gz
| Download URL | createPackage-1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55db77d53bd98c00dfa8b2ef6b05efe4ff555ccc9bd3dba560cf69ec1a93917f
|
|
BLAKE2b-256 checksum How to use checksums |
8754af8cc30994ab8391b71b21f03a4e1e5736720f5d0b4dc4da578e2aa1e076
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.2
|
Security for createPackage 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.