carcass is a Python command line tool to generate python package scaffolding based on best practices
Getting Started
To use carcass you can run it directly. Since carcass is mainly considered a command line tool, once installed, you run it directly:
# Default generated package path is the current users directory `~/`
carcass
# Provide an alternate path location
carcass -P ~/my_packages/path
carcass --path ~/my_packages/path
Once you run carcass you will be prompted to provide answers to the following questions:
Enter your package name: mytestpackage
Enter your first and last name: Josh Rickard
Enter your GitHub user name: MSAdministrator
Enter your email address: josh.rickard@letsautomate.it
Additionally, you have additional package options that you can select all, some, or none of them using your space key.
Currently, carcass supports the following additional package options. I will continue to add additional options as needed/wanted:
Please select all package options which you want carcass to generate
* Logger
Exceptions
Microsoft Graph OAuth2
Flask App
Package Template Structure
carcass generates packages based on your provided inputs as well as selected options during creation.
Below is the structure outline for a template python package generated by carcass with all options selected:
📦test package
┣ 📂test package
┃ ┣ 📂app
┃ ┃ ┣ 📂api
┃ ┃ ┃ ┗ 📜api.py
┃ ┃ ┣ 📂frontend
┃ ┃ ┃ ┗ 📜frontend.py
┃ ┃ ┣ 📂templates
┃ ┃ ┃ ┣ 📜404.html
┃ ┃ ┃ ┣ 📜500.html
┃ ┃ ┃ ┣ 📜base.html
┃ ┃ ┃ ┗ 📜index.html
┃ ┃ ┣ 📜__init__.py
┃ ┃ ┗ 📜config.py
┃ ┣ 📂utils
┃ ┃ ┣ 📜__init__.py
┃ ┃ ┣ 📜exceptions.py
┃ ┃ ┣ 📜logger.py
┃ ┃ ┗ 📜version.py
┃ ┣ 📜__init__.py
┃ ┣ 📜__main__.py
┃ ┣ 📜graphconnector.py
┃ ┗ 📜test package.py
┣ 📜.gitignore
┣ 📜CONTRIBUTING.md
┣ 📜Dockerfile
┣ 📜LICENSE.md
┣ 📜README.md
┣ 📜docker-compose.yml
┣ 📜logger.yml
┣ 📜requirements.txt
┗ 📜setup.py
Installation
In order to use carcass you can install it via pip or clone this repository.
pip install carcass
git clone git@github.com:MSAdministrator/carcass.git
cd carcass
pip install -r requirements.txt
Development
To get a development env running, you can clone this repository
Say what the step will be
pip install --user pipenv
git clone git@github.com:MSAdministrator/carcass.git
cd carcass
Next, install and setup a virtual environment:
pip install virtualenv
virtualenv venv
pip install -r requirements.txt
carcass
Running the tests
To run unit tests, you will need to clone this repository:
pip install --user pipenv
git clone git@github.com:MSAdministrator/carcass.git
cd carcass
Next, you run tests using the following command:
python -m pytest
Break down into end to end tests
Tests within this package test to ensure that the correct files are being created as requested as well as some tests check the contents of the template files:
# testing the creation of a README.md template
def test_creation_of_readme_template_exists(carcass_fixture):
'''
Testing the creation of README.md template file
'''
carcass = carcass_fixture.create_package(pytest.configuration['package_path'], pytest.package)
assert os.path.exists(os.path.join(str(pytest.configuration['package_path']), 'README.md'))
Upcoming Additions
[x] Add Flask application template [] Add Database templates [] Add Celery worker templates [] Add Redis templates [] Add GraphQL templates
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning.
Authors
- Josh Rickard - Initial work - MSAdministrator
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for carcass 1.2.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 | |
|---|---|---|---|---|
| carcass-1.2.0.tar.gz | 20.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| carcass-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.3 kB
Release files / carcass-1.2.0.tar.gz
| Download URL | carcass-1.2.0.tar.gz |
|---|---|
| Size | 20.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
123dbe4eef25ffcf457301ce0fab9983a4c00b49851a624c37e17a00f02cb053
|
|
BLAKE2b-256 checksum How to use checksums |
aa1867ffc0104f8cfa03f531906be6a54ab897bfca65694727744ba0f1fe8960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.5
|
Release files / carcass-1.2.0-py3-none-any.whl
| Download URL | carcass-1.2.0-py3-none-any.whl |
|---|---|
| Size | 28.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55a9fc2e8fe4aa4d027a20cc5e528e2a22adb2d812be9588057901ee1a8529f3
|
|
BLAKE2b-256 checksum How to use checksums |
548cba973783695e3077f5814bf6a9c5c6294485402ba46795dfa982f0a02537
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.5
|
Security for carcass 1.2.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.