template-python-project

A baseline for creating python projects for security projects.

https://github.com/developerstoolbox/template-python-project

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary

Keywords

baseline defensive-security neutral-security offsensive-security security security-tools wolfsoftware
Last synced: 4 months ago · JSON representation ·

Repository

A baseline for creating python projects for security projects.

Basic Info
  • Host: GitHub
  • Owner: DevelopersToolbox
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 190 KB
Statistics
  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • Open Issues: 3
  • Releases: 2
Topics
baseline defensive-security neutral-security offsensive-security security security-tools wolfsoftware
Created about 3 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing Funding License Code of conduct Citation Codeowners Security

README.md

GreyTeamToolbox logo
Github Build Status License Created
Release Released Commits since release

Overview

This is the template project template that we use internally when creating new python tools. It includes features such as argument parsing, configuration management, and a modular structure to facilitate scalable and maintainable code development.

We decided to make this available along with our other tools to allow people to use a well engineered starting point when creating their own tools.

We also proide 2 other templates which we use.

Features

  • Modular Architecture: Organize your code into modules for better maintainability.
  • Argument Parsing: Easily handle command-line arguments using argparse.
  • Configuration Management: Generate configuration objects from command-line arguments.
  • Custom Exceptions: Implement custom exceptions for specific error handling.

Installation

To install the template roject, clone the repository and navigate to the project directory:

bash git clone https://github.com/DevelopersToolbox/template-python-project.git cd template-python-project

It is recommended to use a virtual environment to manage dependencies. You can create and activate a virtual environment using the following commands:

bash python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`

Install the required dependencies:

bash pip install -r requirements.txt

Usage

To run the template roject, execute the run function from the main script:

bash python main.py --required <value>

Command-Line Arguments

The application supports several command-line arguments:

  • -h, --help: Show help message and exit.
  • -d, --debug: Enable debug mode for verbose output.
  • -v, --verbose: Enable verbose output to show scan results as they come in.
  • -V, --version: Show the program's version number and exit.
  • -i, --optional-integer: An optional integer argument (default: 2).
  • -s, --optional-string: An optional string argument (default: "me").
  • -r, --required: A required string argument.

Example usage:

bash python main.py -r "required_value" -i 10 -s "optional_string"

Project Structure

The project is organized as follows:

template-python-project/ ├── modules/ │ ├── __init__.py │ ├── cli.py │ ├── config.py │ ├── exceptions.py │ └── globals.py ├── main.py ├── requirements.txt └── README.md

  • modules/: Contains the core modules of the application.
    • cli.py: Handles the command-line arguments and main program flow.
    • config.py: Handles configuration creation from command-line arguments.
    • exceptions.py: Handles custom exceptions.
    • globals.py: Defines global constants used across the application.
  • main.py: The main script that orchestrates argument parsing and program execution.
  • requirements.txt: Lists the dependencies required for the project.
  • README.md: The file you are currently reading.


Owner

  • Name: Developers Toolbox
  • Login: DevelopersToolbox
  • Kind: organization
  • Email: github@wolfsoftware.com
  • Location: United Kingdom

A selection of tools to help developers. Created by Wolf Software.

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: Template Project
abstract: A template Python project.
type: software
version: 0.1.0
date-released: 2024-05-27
repository-code: https://github.com/DevelopersToolbox/template-python-project
keywords:
  - "Wolf Software"
  - "Software"
license: MIT
authors:
  - family-names: "Wolf"
    orcid: "https://orcid.org/0009-0007-0983-2072"

GitHub Events

Total
  • Delete event: 61
  • Issue comment event: 138
  • Push event: 125
  • Pull request event: 125
  • Pull request review event: 111
  • Create event: 64
Last Year
  • Delete event: 61
  • Issue comment event: 138
  • Push event: 125
  • Pull request event: 125
  • Pull request review event: 111
  • Create event: 64

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 0
  • Total pull requests: 112
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.53
  • Merged pull requests: 99
  • Bot issues: 0
  • Bot pull requests: 112
Past Year
  • Issues: 0
  • Pull requests: 70
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.76
  • Merged pull requests: 61
  • Bot issues: 0
  • Bot pull requests: 70
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (154)
Top Labels
Issue Labels
Pull Request Labels
dependabot: dependencies (154) dependabot: auto approve (139) dependabot: auto merge (138) dependabot: ecosystem : github actions (136) dependabot: ecosystem : python (18) dependabot: manual merge (8) dependabot: manual approve (5)

Dependencies

requirements.txt pypi
  • colorama ==0.4.6
  • pytest ==7.4.0