packg


Namepackg JSON
Version 0.12.11 PyPI version JSON
download
home_pageNone
SummaryCollection of utilities used in other python projects.
upload_time2024-05-02 11:45:47
maintainerNone
docs_urlNone
authorsimon-ging
requires_python>=3.7
licenseApache-2.0
keywords attrs typing dict attr
VCS
bugtrack_url
requirements attrs numpy joblib importlib_resources loguru natsort typedparser pyyaml python-dotenv pathspec zstandard tqdm requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # packg

<p align="center">
<a href="https://github.com/simon-ging/packg/actions/workflows/build-py37.yml">
  <img alt="build 3.7 status" title="build 3.7 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py37.yml?branch=main&label=python%203.7" />
</a>
<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>
<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.7`

```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.7",
    "maintainer_email": null,
    "keywords": "attrs, typing, dict, attr",
    "author": "simon-ging",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e0/c4/79c65743d06536ce6a9ec34567fc24958705943707d780b2aa45520c00ba/packg-0.12.11.tar.gz",
    "platform": "any",
    "description": "# packg\n\n<p align=\"center\">\n<a href=\"https://github.com/simon-ging/packg/actions/workflows/build-py37.yml\">\n  <img alt=\"build 3.7 status\" title=\"build 3.7 status\" src=\"https://img.shields.io/github/actions/workflow/status/simon-ging/packg/build-py37.yml?branch=main&label=python%203.7\" />\n</a>\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<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.7`\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.12.11",
    "project_urls": {
        "Project-URL": "https://github.com/simon-ging/packg"
    },
    "split_keywords": [
        "attrs",
        " typing",
        " dict",
        " attr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f15c020a7b0352fca1dd7d10e4259dc2fe02fa3fdca129ae742d93e6089bfb2",
                "md5": "441112297faea45e37c9a48818ca6318",
                "sha256": "e656f9e6eeaa33de1f035f7081a3c4638f4e669b6c0804f14675a2f594ced81d"
            },
            "downloads": -1,
            "filename": "packg-0.12.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "441112297faea45e37c9a48818ca6318",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 68503,
            "upload_time": "2024-05-02T11:45:45",
            "upload_time_iso_8601": "2024-05-02T11:45:45.007572Z",
            "url": "https://files.pythonhosted.org/packages/4f/15/c020a7b0352fca1dd7d10e4259dc2fe02fa3fdca129ae742d93e6089bfb2/packg-0.12.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0c479c65743d06536ce6a9ec34567fc24958705943707d780b2aa45520c00ba",
                "md5": "64dbf43fb2174c736aed29c061e2d40d",
                "sha256": "cd113bdd340494cece350bac994ae8466927a94832dd658d809cea8e46bd90fc"
            },
            "downloads": -1,
            "filename": "packg-0.12.11.tar.gz",
            "has_sig": false,
            "md5_digest": "64dbf43fb2174c736aed29c061e2d40d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 56576,
            "upload_time": "2024-05-02T11:45:47",
            "upload_time_iso_8601": "2024-05-02T11:45:47.548487Z",
            "url": "https://files.pythonhosted.org/packages/e0/c4/79c65743d06536ce6a9ec34567fc24958705943707d780b2aa45520c00ba/packg-0.12.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-02 11:45:47",
    "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": "attrs",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "joblib",
            "specs": []
        },
        {
            "name": "importlib_resources",
            "specs": []
        },
        {
            "name": "loguru",
            "specs": []
        },
        {
            "name": "natsort",
            "specs": []
        },
        {
            "name": "typedparser",
            "specs": []
        },
        {
            "name": "pyyaml",
            "specs": []
        },
        {
            "name": "python-dotenv",
            "specs": []
        },
        {
            "name": "pathspec",
            "specs": []
        },
        {
            "name": "zstandard",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        }
    ],
    "lcname": "packg"
}
        
Elapsed time: 0.26401s