huntermakespy
Easy Python functions making making functional Python functions easier.
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 (9.6%) to scientific vocabulary
Repository
Easy Python functions making making functional Python functions easier.
Basic Info
- Host: GitHub
- Owner: hunterhogan
- License: other
- Language: Python
- Default Branch: main
- Size: 144 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
- Releases: 8
Metadata Files
README.md
hunterMakesPy
A modular Python toolkit for defensive programming, parameter validation, file system utilities, and flexible data structure manipulation.
Overview
hunterMakesPy provides utilities for safe error handling, flexible input validation, dynamic module and attribute importing, and merging or transforming complex data structures. The package emphasizes clear identifiers, robust type handling, and reusable components for building reliable Python applications.
Installation
bash
pip install hunterMakesPy
Defensive Programming
Utilities for handling None values and defensive programming patterns.
```python from hunterMakesPy import raiseIfNone
Ensure a function result is not None
def findConfiguration(configName: str) -> dict[str, str] | None: # ... search logic ... return None
config = raiseIfNone( findConfiguration("database"), "I could not find Configuration 'database', but I need it to continue." ) ```
Parameter Validation
Parameter validation, integer parsing, and concurrency handling.
```python import hunterMakesPy as humpy
Smart concurrency limit calculation
cpuLimit = humpy.defineConcurrencyLimit(limit=0.75) # Use 75% of available CPUs cpuLimit = humpy.defineConcurrencyLimit(limit=True) # Use exactly 1 CPU cpuLimit = humpy.defineConcurrencyLimit(limit=4) # Use exactly 4 CPUs
Robust integer validation
validatedIntegers = humpy.intInnit([1, "2", 3.0, "4"], "port_numbers")
String-to-boolean conversion for configuration
userInput = "True" booleanValue = humpy.oopsieKwargsie(userInput) # Returns True ```
File System Utilities
Safe file operations and dynamic module importing.
```python import hunterMakesPy as humpy
Dynamic imports
gcdFunction = humpy.importLogicalPath2Identifier("math", "gcd") customFunction = humpy.importPathFilename2Identifier("path/to/module.py", "functionName")
Safe file operations
pathFilename = Path("deep/nested/directory/file.txt") humpy.writeStringToHere("content", pathFilename) # Creates directories automatically ```
Data Structure Manipulation
Utilities for string extraction, data flattening, and array compression.
```python import hunterMakesPy as humpy import numpy
Extract all strings from nested data structures
nestedData = {"config": [1, "host", {"port": 8080}], "users": ["alice", "bob"]} allStrings = humpy.stringItUp(nestedData) # ['config', 'host', 'port', 'users', 'alice', 'bob']
Merge dictionaries containing lists
dictionaryAlpha = {"servers": ["chicago", "tokyo"], "databases": ["elm"]} dictionaryBeta = {"servers": ["mumbai"], "databases": ["oak", "cedar"]} merged = humpy.updateExtendPolishDictionaryLists(dictionaryAlpha, dictionaryBeta, destroyDuplicates=True)
Compress NumPy arrays with run-length encoding
arrayData = numpy.array([1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9]) compressed = humpy.autoDecodingRLE(arrayData) # "[1,range(2,6)]+[5]2+[*range(6,10)]" ```
Testing
The package includes comprehensive test suites that you can import and run:
```python from hunterMakesPy.tests.testparseParameters import ( PytestFordefineConcurrencyLimit, PytestForintInnit, PytestForoopsieKwargsie )
Run tests on the built-in functions
listOfTests = PytestFor_defineConcurrencyLimit() for nameOfTest, callablePytest in listOfTests: callablePytest()
Or test your own compatible functions
@pytest.mark.parametrize( "nameOfTest,callablePytest" , PytestForintInnit(callableToTest=myFunction)) def testmyFunction(nameOfTest, callablePytest): callablePytest() ```
My recovery
How to code
Coding One Step at a Time:
- WRITE CODE.
- Don't write stupid code that's hard to revise.
- Write good code.
- When revising, write better code.
Owner
- Name: Hunter Hogan
- Login: hunterhogan
- Kind: user
- Website: www.hunterthinks.com
- Repositories: 1
- Profile: https://github.com/hunterhogan
Citation (CITATION.cff)
abstract: "hunterMakesPy is a modular Python toolkit for defensive programming, parameter validation, file system operations, and data structure manipulation. It provides utilities for safe error handling, flexible input validation, dynamic module and attribute importing, and merging or transforming complex data structures. The package emphasizes clear identifiers, robust type handling, and reusable components for building reliable Python applications.\n" authors: - given-names: Hunter family-names: Hogan email: HunterHogan@pm.me cff-version: 1.2.0 commit: 2315d00675176f43a7b800a3677e6de68a803baa date-released: '2025-08-15' identifiers: - type: url value: https://github.com/hunterhogan/hunterMakesPy/releases/tag/0.2.4 description: The URL for hunterMakesPy 0.2.4. keywords: - attribute loading - concurrency limit - configuration - defensive programming - dictionary merging - directory creation - dynamic import - error propagation - file system utilities - input validation - integer parsing - module loading - nested data structures - package settings - parameter validation - pytest - string extraction - test utilities license: CC-BY-NC-4.0 message: Cite this software with the metadata in this file. repository: https://github.com/hunterhogan/hunterMakesPy repository-artifact: https://pypi.org/project/huntermakespy/0.2.4/ repository-code: https://github.com/hunterhogan/hunterMakesPy/releases/tag/0.2.4 title: hunterMakesPy url: https://github.com/hunterhogan/hunterMakesPy version: 0.2.4
GitHub Events
Total
- Create event: 6
- Issues event: 1
- Release event: 5
- Issue comment event: 1
- Push event: 27
Last Year
- Create event: 6
- Issues event: 1
- Release event: 5
- Issue comment event: 1
- Push event: 27
Packages
- Total packages: 1
-
Total downloads:
- pypi 403 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 7
- Total maintainers: 1
pypi.org: huntermakespy
Easy Python functions making making functional Python functions easier.
- Homepage: https://github.com/hunterhogan/hunterMakesPy
- Documentation: https://huntermakespy.readthedocs.io/
- License: CC-BY-NC-4.0
-
Latest release: 0.2.4
published 7 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- charset_normalizer *
- more_itertools *
- numpy *
- python_minifier *
- tomli *
