No project description provided
Project description
pyResourceHandler: Small package to help with resource handling
pyResourceHandler provides a few functions to easily handle resources.
It requires Python 3.9+ to run.
Key Features
- Small package
- 100% coverage
- Easy to use
- Functions are type-hinted.
- Handles regular files, directories and even malformed python files as resources/assets.
How to Install
Install from PyPi
pip install pyResourceHandler
Import 'extractFile' and/or 'extractDir'
from pyResourceHandler import extractFile
How to Use
1.The module should have a root directory with one of the following names:
- data
- resources
- assets
2.Place files and/or directories within your resource directory.
3.Done!
- To extract a file
extractFile( "Example_Module", "file_example.txt", r"C:\Users\user\Desktop\your_file.txt" )
- To extract a directory
extractDirectory( "Example_Module", "directory_example", r"C:\Users\user\Desktop\your_directory" )
1st Argument - Module import as a string.
2nd Argument - Path to file/directory
3rd Argument - Output path for file/directory
Do note, the above functions will not overwrite an existing file by default.
To enable overwriting, set the argument named overwrite argument to True when invoking the functions.
Why?
Writing similar pieces of code to access non-Python files across projects can be tedious.
This reduces boilerplate code for repetitive operations down to a single function call.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyResourceHandler-1.0.4.tar.gz.
File metadata
- Download URL: pyResourceHandler-1.0.4.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.9.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2d23d7d48db11c79380030a72ae398e98d7ca7e47783d7f6d2b1dee323a5678
|
|
| MD5 |
f3618a108285451680fc3b9cbb91aa2a
|
|
| BLAKE2b-256 |
aa8fc923dafa030c82f2386769dc805f895167e0763ffeca435bcfafd251fe27
|
File details
Details for the file pyresourcehandler-1.0.4-py3-none-any.whl.
File metadata
- Download URL: pyresourcehandler-1.0.4-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.9.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47bea9c120f755b243e437f4b03c767b2a07dd116344714076371738df83bb31
|
|
| MD5 |
310f835a5a8d12819100fd7dbb3d28c5
|
|
| BLAKE2b-256 |
cd88b15ded400ca0da1250146e8894df033697c585de8bf9ce749d0e25e97366
|