packg
Collection of utilities used in other python projects.
Features
caching: Cache objects to disk (usingjoblib) or to memoryconstclass.Const: Base class for defining constants, as alternative toenum.Enumdebugging: Connect to PyCharm debug serverdtime: Wrappers and formatters fordatetimeand other timing utilitieslog: Wrapper forloguru, utilities for stdlibloggingiotools: Index paths, compress and read files, git utilities, wrappers to load json/yamlmagic: Wrapper aroundimportlibmaths: Various small mathematical utilitiesmisc:format_exception(e)outputs the exception as it appears in the stacktrace.suppress_stdout_stderrcontext manager to suppress all output of a block of code.
multiproc: Multiprocessing utilitiespackaging: Code to handle creation and running of python packagespaths: Load paths from the global environment or .env files usingpython-dotenvstats: Simple statistics utilitiesstrings: Base64, quote strings, create random strings, create hashes of objectssystem: Wrapper forsubprocess.Popentesting: Import all modules from a package and other utilitiestqdmext: Wrappertqdm_max_ncolsthat limits the width of atqdmprogressbar by defaulttypext: Type definitionsweb: Download file and resume a partial download, disable web access
Install
Requires python>=3.10
pip install packg
Setup environment paths
# show environment
python -m packg.cli.show_env
# or
packg show_env
To override the defaults with your own values:
- Set the environment variables in your shell e.g. using .bashrc
- Create a file named
.envin the root of your project as follows:
ENV_DATA_DIR=data
ENV_RESULT_DIR=results
ENV_ANNO_DIR=annotations
ENV_CODE_DIR=/home/${USER}/code
ENV_CACHE_DIR=/home/${USER}/.cache
Dev install
Clone repository and cd into, then:
pip install -e .
pip install pytest pytest-cov pylint
python -m pytest --cov
pylint packg
pylint tests
Metadata
Release files for packg 0.36.2
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 |
|---|---|---|---|---|
| packg-0.36.2.tar.gz | 93.2 kB | Without provenance | Details for packg-0.36.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| packg-0.36.2-py3-none-any.whl | Python 3 | none | any | Details for packg-0.36.2-py3-none-any.whl |
Total release size: 213.9 kB
Release files / packg-0.36.2.tar.gz
| Download URL | packg-0.36.2.tar.gz |
|---|---|
| Size | 93.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a8bd7799e6f66f8b110d3d6b0876fa35400c461aaf5825c4546c96ac2a15f12
|
|
BLAKE2b-256 checksum How to use checksums |
db3f73333053a6816cc8d5f7e7b5539b60f2c8ebd025a0fca2de78ddc51e5ae9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / packg-0.36.2-py3-none-any.whl
| Download URL | packg-0.36.2-py3-none-any.whl |
|---|---|
| Size | 120.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3662267280cd2ac66e07716caa73e8e5ce438be460d926483e29355d77db5921
|
|
BLAKE2b-256 checksum How to use checksums |
9c24a88b9c37640098892f008acee6dcdd3f6632bd0cbc393245e387da9084b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for packg 0.36.2
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.