packg


Namepackg JSON
Version 0.22.2 PyPI version JSON
download
home_pageNone
SummaryCollection of utilities used in other python projects.
upload_time2024-12-18 17:42:17
maintainerNone
docs_urlNone
authorsimon-ging
requires_python>=3.8
licenseApache-2.0
keywords attrs typing dict attr
VCS
bugtrack_url
requirements typedparser attrs numpy joblib loguru natsort pyyaml python-dotenv pathspec zstandard tqdm requests deprecated tomlkit chardet
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # packg

<p align="center">
<a href="https://github.com/simon-ging/packg/actions/workflows/build-py38.yml">
  <img alt="build 3.8 status" title="build 3.8 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py38.yml?branch=main&label=python%203.8" />
</a>
<a href="https://github.com/simon-ging/packg/actions/workflows/build-py39.yml">
  <img alt="build 3.9 status" title="build 3.9 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py39.yml?branch=main&label=python%203.9" />
</a>
<a href="https://github.com/simon-ging/packg/actions/workflows/build-py310.yml">
  <img alt="build 3.10 status" title="build 3.10 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py310.yml?branch=main&label=python%203.10" />
</a>
<a href="https://github.com/simon-ging/packg/actions/workflows/build-py311.yml">
  <img alt="build 3.11 status" title="build 3.11 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py311.yml?branch=main&label=python%203.11" />
</a>
<a href="https://github.com/simon-ging/packg/actions/workflows/build-py312.yml">
  <img alt="build 3.12 status" title="build 3.12 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py312.yml?branch=main&label=python%203.12" />
</a>
<a href="https://github.com/simon-ging/packg/actions/workflows/build-py313.yml">
  <img alt="build 3.13 status" title="build 3.13 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py313.yml?branch=main&label=python%203.13" />
</a>
<img alt="coverage" title="coverage" src="https://raw.githubusercontent.com/simon-ging/packg/main/docs/coverage.svg" />
<a href="https://pypi.org/project/packg/">
  <img alt="version" title="version" src="https://img.shields.io/pypi/v/packg?color=success" />
</a>
</p>

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.8`

```bash
pip install packg
```

## Setup environment paths

```bash
# 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:

```bash
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:

```bash
pip install -e .
pip install pytest pytest-cov pylint

python -m pytest --cov

pylint packg
pylint tests
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "packg",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "attrs, typing, dict, attr",
    "author": "simon-ging",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/81/47/33d918dc0bdad44b33c8d1fbe442e45e614891ac80d276cd0ac910ce633e/packg-0.22.2.tar.gz",
    "platform": "any",
    "description": "# packg\n\n<p align=\"center\">\n<a href=\"https://github.com/simon-ging/packg/actions/workflows/build-py38.yml\">\n  <img alt=\"build 3.8 status\" title=\"build 3.8 status\" src=\"https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py38.yml?branch=main&label=python%203.8\" />\n</a>\n<a href=\"https://github.com/simon-ging/packg/actions/workflows/build-py39.yml\">\n  <img alt=\"build 3.9 status\" title=\"build 3.9 status\" src=\"https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py39.yml?branch=main&label=python%203.9\" />\n</a>\n<a href=\"https://github.com/simon-ging/packg/actions/workflows/build-py310.yml\">\n  <img alt=\"build 3.10 status\" title=\"build 3.10 status\" src=\"https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py310.yml?branch=main&label=python%203.10\" />\n</a>\n<a href=\"https://github.com/simon-ging/packg/actions/workflows/build-py311.yml\">\n  <img alt=\"build 3.11 status\" title=\"build 3.11 status\" src=\"https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py311.yml?branch=main&label=python%203.11\" />\n</a>\n<a href=\"https://github.com/simon-ging/packg/actions/workflows/build-py312.yml\">\n  <img alt=\"build 3.12 status\" title=\"build 3.12 status\" src=\"https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py312.yml?branch=main&label=python%203.12\" />\n</a>\n<a href=\"https://github.com/simon-ging/packg/actions/workflows/build-py313.yml\">\n  <img alt=\"build 3.13 status\" title=\"build 3.13 status\" src=\"https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py313.yml?branch=main&label=python%203.13\" />\n</a>\n<img alt=\"coverage\" title=\"coverage\" src=\"https://raw.githubusercontent.com/simon-ging/packg/main/docs/coverage.svg\" />\n<a href=\"https://pypi.org/project/packg/\">\n  <img alt=\"version\" title=\"version\" src=\"https://img.shields.io/pypi/v/packg?color=success\" />\n</a>\n</p>\n\nCollection of utilities used in other python projects.\n\n## Features\n\n* `caching`: Cache objects to disk (using `joblib`) or to memory\n* `constclass.Const`: Base class for defining constants, as alternative to `enum.Enum`\n* `debugging`: Connect to PyCharm debug server\n* `dtime`: Wrappers and formatters for `datetime` and other timing utilities\n* `log`: Wrapper for `loguru`, utilities for stdlib `logging`\n* `iotools`: Index paths, compress and read files, git utilities, wrappers to load json/yaml\n* `magic`: Wrapper around `importlib`\n* `maths`: Various small mathematical utilities\n* `misc`: \n  * `format_exception(e)` outputs the exception as it appears in the stacktrace.\n  * `suppress_stdout_stderr` context manager to suppress all output of a block of code.\n* `multiproc`: Multiprocessing utilities\n* `packaging`: Code to handle creation and running of python packages\n* `paths`: Load paths from the global environment or .env files using `python-dotenv`\n* `stats`: Simple statistics utilities\n* `strings`: Base64, quote strings, create random strings, create hashes of objects\n* `system`: Wrapper for `subprocess.Popen`\n* `testing`: Import all modules from a package and other utilities\n* `tqdmext`: Wrapper `tqdm_max_ncols` that limits the width of a `tqdm` progressbar by default\n* `typext`: Type definitions\n* `web`: Download file and resume a partial download, disable web access \n\n## Install\n\nRequires `python>=3.8`\n\n```bash\npip install packg\n```\n\n## Setup environment paths\n\n```bash\n# show environment\npython -m packg.cli.show_env\n\n# or\npackg show_env\n\n```\n\nTo override the defaults with your own values:\n\n- Set the environment variables in your shell e.g. using .bashrc\n- Create a file named `.env` in the root of your project as follows:\n\n```bash\nENV_DATA_DIR=data\nENV_RESULT_DIR=results\nENV_ANNO_DIR=annotations\nENV_CODE_DIR=/home/${USER}/code\nENV_CACHE_DIR=/home/${USER}/.cache\n```\n\n## Dev install\n\nClone repository and cd into, then:\n\n```bash\npip install -e .\npip install pytest pytest-cov pylint\n\npython -m pytest --cov\n\npylint packg\npylint tests\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Collection of utilities used in other python projects.",
    "version": "0.22.2",
    "project_urls": {
        "Project-URL": "https://github.com/simon-ging/packg"
    },
    "split_keywords": [
        "attrs",
        " typing",
        " dict",
        " attr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8bcd579feead07bb62b61a646ad010cda7a41803d79902016b7c278d4dded42a",
                "md5": "722da3a917e5fa49697c8aa607c15d02",
                "sha256": "37abc8330280ea2290d096a97ecbb79acb44096cd76a4e763445b47c20495419"
            },
            "downloads": -1,
            "filename": "packg-0.22.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "722da3a917e5fa49697c8aa607c15d02",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 84333,
            "upload_time": "2024-12-18T17:42:15",
            "upload_time_iso_8601": "2024-12-18T17:42:15.775435Z",
            "url": "https://files.pythonhosted.org/packages/8b/cd/579feead07bb62b61a646ad010cda7a41803d79902016b7c278d4dded42a/packg-0.22.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "814733d918dc0bdad44b33c8d1fbe442e45e614891ac80d276cd0ac910ce633e",
                "md5": "35e8f18f83926096e7d9ff058ed8abd3",
                "sha256": "a00c96b1ad2c8528792b1256bb1664d2fac16523402dc795ed2db889734605fe"
            },
            "downloads": -1,
            "filename": "packg-0.22.2.tar.gz",
            "has_sig": false,
            "md5_digest": "35e8f18f83926096e7d9ff058ed8abd3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 65655,
            "upload_time": "2024-12-18T17:42:17",
            "upload_time_iso_8601": "2024-12-18T17:42:17.461478Z",
            "url": "https://files.pythonhosted.org/packages/81/47/33d918dc0bdad44b33c8d1fbe442e45e614891ac80d276cd0ac910ce633e/packg-0.22.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 17:42:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simon-ging",
    "github_project": "packg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "typedparser",
            "specs": []
        },
        {
            "name": "attrs",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "joblib",
            "specs": []
        },
        {
            "name": "loguru",
            "specs": []
        },
        {
            "name": "natsort",
            "specs": []
        },
        {
            "name": "pyyaml",
            "specs": []
        },
        {
            "name": "python-dotenv",
            "specs": []
        },
        {
            "name": "pathspec",
            "specs": []
        },
        {
            "name": "zstandard",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "deprecated",
            "specs": []
        },
        {
            "name": "tomlkit",
            "specs": []
        },
        {
            "name": "chardet",
            "specs": []
        }
    ],
    "lcname": "packg"
}
        
Elapsed time: 0.48217s