Skip to main content

packg

build 3.10 status build 3.11 status build 3.12 status build 3.13 status build 3.14 status coverage version

Collection of utilities used in other python projects.

Features

  • caching: Cache objects to disk (using joblib) or to memory
  • constclass.Const: Base class for defining constants, as alternative to enum.Enum
  • debugging: Connect to PyCharm debug server
  • dtime: Wrappers and formatters for datetime and other timing utilities
  • log: Wrapper for loguru, utilities for stdlib logging
  • iotools: Index paths, compress and read files, git utilities, wrappers to load json/yaml
  • magic: Wrapper around importlib
  • maths: Various small mathematical utilities
  • misc:
    • format_exception(e) outputs the exception as it appears in the stacktrace.
    • suppress_stdout_stderr context manager to suppress all output of a block of code.
  • multiproc: Multiprocessing utilities
  • packaging: Code to handle creation and running of python packages
  • paths: Load paths from the global environment or .env files using python-dotenv
  • stats: Simple statistics utilities
  • strings: Base64, quote strings, create random strings, create hashes of objects
  • system: Wrapper for subprocess.Popen
  • testing: Import all modules from a package and other utilities
  • tqdmext: Wrapper tqdm_max_ncols that limits the width of a tqdm progressbar by default
  • typext: Type definitions
  • web: 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 .env in 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)

Source distribution for packg 0.36.2
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)

Table of built distributions (wheels) for packg 0.36.2
File Interpreter ABI Platform Actions
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.

Release history Release notifications | RSS feed

This release

0.36.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page