packg


Namepackg JSON
Version 0.21.2 PyPI version JSON
download
home_pageNone
SummaryCollection of utilities used in other python projects.
upload_time2024-11-09 23:02:53
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/14/06/ccda0d364eea2875b074f789e1378d33e3f15ee8faa36ba62aa9bd601804/packg-0.21.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.21.2",
    "project_urls": {
        "Project-URL": "https://github.com/simon-ging/packg"
    },
    "split_keywords": [
        "attrs",
        " typing",
        " dict",
        " attr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72187aefe32d7ebe2849f01f12bf73c4dda0305489fa4f83ad082d27229c10ad",
                "md5": "93aca3c26980e4f010a82aeb71f19374",
                "sha256": "d0a34b1e234300809b6625b35fd0505ad1e80de539ee25f73e8cecab7cf85a0a"
            },
            "downloads": -1,
            "filename": "packg-0.21.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "93aca3c26980e4f010a82aeb71f19374",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 80545,
            "upload_time": "2024-11-09T23:02:51",
            "upload_time_iso_8601": "2024-11-09T23:02:51.821838Z",
            "url": "https://files.pythonhosted.org/packages/72/18/7aefe32d7ebe2849f01f12bf73c4dda0305489fa4f83ad082d27229c10ad/packg-0.21.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1406ccda0d364eea2875b074f789e1378d33e3f15ee8faa36ba62aa9bd601804",
                "md5": "58c42fbc1a9c2fac07b3f4d07e90b882",
                "sha256": "9fa469ba018b6fda1865de469e1d8edc619eb01d96f8aacbfa822e364313b647"
            },
            "downloads": -1,
            "filename": "packg-0.21.2.tar.gz",
            "has_sig": false,
            "md5_digest": "58c42fbc1a9c2fac07b3f4d07e90b882",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 64283,
            "upload_time": "2024-11-09T23:02:53",
            "upload_time_iso_8601": "2024-11-09T23:02:53.789663Z",
            "url": "https://files.pythonhosted.org/packages/14/06/ccda0d364eea2875b074f789e1378d33e3f15ee8faa36ba62aa9bd601804/packg-0.21.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-09 23:02:53",
    "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.62341s