metadata-please


Namemetadata-please JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/python-packaging/metadata-please/
SummarySimple extractor for python artifact metadata
upload_time2024-11-14 01:04:23
maintainerNone
docs_urlNone
authorTim Hatch
requires_python>=3.7
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # metadata\_please

There are a couple of pretty decent ways to read metadata (`importlib-metadata`,
and `pkginfo`) but they tend to be pretty heavyweight.  This lib aims to do two
things, with as minimal dependencies as possible:

1. Support just enough metadata to be able to look up deps.
2. Do "the thing that pip does" when deciding what dist-info dir to look at.

# Usage

Example snippet to show how to get the metadata from a wheel.

```python
from zipfile import ZipFile
from metadata_please import basic_metadata_from_wheel

zf = ZipFile('somepkg.whl')
print(basic_metadata_from_wheel(zf, "somepkg"))
```

### Output

```
BasicMetadata(
    reqs=[
        'cli-helpers[styles] >=2.2.1',
        'click >=4.1',
        'configobj >=5.0.5',
        'prompt-toolkit <4.0.0,>=3.0.3',
        'pygments >=1.6',
        'sqlparse >=0.4.4',
        "behave >=1.2.6 ; extra == 'dev'",
        "coverage >=7.2.7 ; extra == 'dev'",
        "pexpect >=4.9.0 ; extra == 'dev'",
        "pytest >=7.4.4 ; extra == 'dev'",
        "pytest-cov >=4.1.0 ; extra == 'dev'",
        "tox >=4.8.0 ; extra == 'dev'",
        "pdbpp >=0.10.3 ; extra == 'dev'"
    ],
    provides_extra=frozenset({'dev'}),
    name='litecli',
    version='1.12.4',
    requires_python='>=3.7',
    url=None,
    project_urls={'homepage, https://github.com/dbcli/litecli': ''},
    author=None,
    author_email='dbcli <litecli-users@googlegroups.com>',
    summary='CLI for SQLite Databases with auto-completion and syntax highlighting.',
    description='# litecli\n\n[![GitHub
Actions](https://github.com/dbcli/litecli/actions/workflows/ci.yml/badge.svg)](https://github.com/dbcli/litecli/actions/workflows/ci.yml "GitHub
Actions")\n\n[Docs](https://litecli.com)\n\nA command-line client for SQLite databases that has auto-completion and syntax
highlighting.\n\n![Completion](screenshots/litecli.png)\n![CompletionGif](screenshots/litecli.gif)\n\n## Installation\n\nIf you already know how to install python
packages, then you can install it via pip:\n\nYou might need sudo on linux.\n\n```\n$ pip install -U litecli\n```\n\nThe package is also available on Arch Linux through
AUR in two versions: [litecli](https://aur.archlinux.org/packages/litecli/) is based the latest release (git tag) and
[litecli-git](https://aur.archlinux.org/packages/litecli-git/) is based on the master branch of the git repo. You can install them manually or with an AUR helper such as
`yay`:\n\n```\n$ yay -S litecli\n```\n\nor\n\n```\n$ yay -S litecli-git\n```\n\nFor MacOS users, you can also use Homebrew to install it:\n\n```\n$ brew install
litecli\n```\n\n## Usage\n\n```\n$ litecli --help\n\nUsage: litecli [OPTIONS] [DATABASE]\n\nExamples:\n  - litecli sqlite_db_name\n```\n\nA config file is automatically
created at `~/.config/litecli/config` at first launch. For Windows machines a config file is created at `~\\AppData\\Local\\dbcli\\litecli\\config` at first launch. See
the file itself for a description of all available options.\n\n## Docs\n\nVisit: [litecli.com/features](https://litecli.com/features)\n',
    keywords=None,
    long_description_content_type='text/markdown'
)

```

The metadata can be extracted from a `wheel`, `sdist` (zip or tarball) or a source checkout (best effort). Check [`__init__.py`](metadata_please/__init__.py) file for all available functions.

# Version Compat

Usage of this library should work back to 3.7, but development (and mypy
compatibility) only on 3.10-3.12.  Linting requires 3.12 for full fidelity.

# License

metadata\_please is copyright [Tim Hatch](https://timhatch.com/), and licensed under
the MIT license.  I am providing code in this repository to you under an open
source license.  This is my personal repository; the license you receive to
my code is from me and not from my employer. See the `LICENSE` file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/python-packaging/metadata-please/",
    "name": "metadata-please",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Tim Hatch",
    "author_email": "tim@timhatch.com",
    "download_url": "https://files.pythonhosted.org/packages/06/2d/fed45153dd5343ab972422b9a4cdc30725376e3406dbb0ceaf81746344bd/metadata_please-0.2.0.tar.gz",
    "platform": null,
    "description": "# metadata\\_please\n\nThere are a couple of pretty decent ways to read metadata (`importlib-metadata`,\nand `pkginfo`) but they tend to be pretty heavyweight.  This lib aims to do two\nthings, with as minimal dependencies as possible:\n\n1. Support just enough metadata to be able to look up deps.\n2. Do \"the thing that pip does\" when deciding what dist-info dir to look at.\n\n# Usage\n\nExample snippet to show how to get the metadata from a wheel.\n\n```python\nfrom zipfile import ZipFile\nfrom metadata_please import basic_metadata_from_wheel\n\nzf = ZipFile('somepkg.whl')\nprint(basic_metadata_from_wheel(zf, \"somepkg\"))\n```\n\n### Output\n\n```\nBasicMetadata(\n    reqs=[\n        'cli-helpers[styles] >=2.2.1',\n        'click >=4.1',\n        'configobj >=5.0.5',\n        'prompt-toolkit <4.0.0,>=3.0.3',\n        'pygments >=1.6',\n        'sqlparse >=0.4.4',\n        \"behave >=1.2.6 ; extra == 'dev'\",\n        \"coverage >=7.2.7 ; extra == 'dev'\",\n        \"pexpect >=4.9.0 ; extra == 'dev'\",\n        \"pytest >=7.4.4 ; extra == 'dev'\",\n        \"pytest-cov >=4.1.0 ; extra == 'dev'\",\n        \"tox >=4.8.0 ; extra == 'dev'\",\n        \"pdbpp >=0.10.3 ; extra == 'dev'\"\n    ],\n    provides_extra=frozenset({'dev'}),\n    name='litecli',\n    version='1.12.4',\n    requires_python='>=3.7',\n    url=None,\n    project_urls={'homepage, https://github.com/dbcli/litecli': ''},\n    author=None,\n    author_email='dbcli <litecli-users@googlegroups.com>',\n    summary='CLI for SQLite Databases with auto-completion and syntax highlighting.',\n    description='# litecli\\n\\n[![GitHub\nActions](https://github.com/dbcli/litecli/actions/workflows/ci.yml/badge.svg)](https://github.com/dbcli/litecli/actions/workflows/ci.yml \"GitHub\nActions\")\\n\\n[Docs](https://litecli.com)\\n\\nA command-line client for SQLite databases that has auto-completion and syntax\nhighlighting.\\n\\n![Completion](screenshots/litecli.png)\\n![CompletionGif](screenshots/litecli.gif)\\n\\n## Installation\\n\\nIf you already know how to install python\npackages, then you can install it via pip:\\n\\nYou might need sudo on linux.\\n\\n```\\n$ pip install -U litecli\\n```\\n\\nThe package is also available on Arch Linux through\nAUR in two versions: [litecli](https://aur.archlinux.org/packages/litecli/) is based the latest release (git tag) and\n[litecli-git](https://aur.archlinux.org/packages/litecli-git/) is based on the master branch of the git repo. You can install them manually or with an AUR helper such as\n`yay`:\\n\\n```\\n$ yay -S litecli\\n```\\n\\nor\\n\\n```\\n$ yay -S litecli-git\\n```\\n\\nFor MacOS users, you can also use Homebrew to install it:\\n\\n```\\n$ brew install\nlitecli\\n```\\n\\n## Usage\\n\\n```\\n$ litecli --help\\n\\nUsage: litecli [OPTIONS] [DATABASE]\\n\\nExamples:\\n  - litecli sqlite_db_name\\n```\\n\\nA config file is automatically\ncreated at `~/.config/litecli/config` at first launch. For Windows machines a config file is created at `~\\\\AppData\\\\Local\\\\dbcli\\\\litecli\\\\config` at first launch. See\nthe file itself for a description of all available options.\\n\\n## Docs\\n\\nVisit: [litecli.com/features](https://litecli.com/features)\\n',\n    keywords=None,\n    long_description_content_type='text/markdown'\n)\n\n```\n\nThe metadata can be extracted from a `wheel`, `sdist` (zip or tarball) or a source checkout (best effort). Check [`__init__.py`](metadata_please/__init__.py) file for all available functions.\n\n# Version Compat\n\nUsage of this library should work back to 3.7, but development (and mypy\ncompatibility) only on 3.10-3.12.  Linting requires 3.12 for full fidelity.\n\n# License\n\nmetadata\\_please is copyright [Tim Hatch](https://timhatch.com/), and licensed under\nthe MIT license.  I am providing code in this repository to you under an open\nsource license.  This is my personal repository; the license you receive to\nmy code is from me and not from my employer. See the `LICENSE` file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple extractor for python artifact metadata",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/python-packaging/metadata-please/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02f909fab74c6abd79d2b1110c22b15b44dae705971d0c00cbc2a8d862881598",
                "md5": "2ca1d10b49f1c8e75649e9c4f71d8500",
                "sha256": "1edb628483b5eb44de6cacacdc1b353f1f42e6229c4fe8aff6a1abe5d6dd9ff2"
            },
            "downloads": -1,
            "filename": "metadata_please-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2ca1d10b49f1c8e75649e9c4f71d8500",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 17797,
            "upload_time": "2024-11-14T01:04:21",
            "upload_time_iso_8601": "2024-11-14T01:04:21.682132Z",
            "url": "https://files.pythonhosted.org/packages/02/f9/09fab74c6abd79d2b1110c22b15b44dae705971d0c00cbc2a8d862881598/metadata_please-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "062dfed45153dd5343ab972422b9a4cdc30725376e3406dbb0ceaf81746344bd",
                "md5": "2995ac4c9e49b6a660ab08afddab39b6",
                "sha256": "5cf150bda519e54401e95ca58854c66303366176e34cc633f6d2b3f21c9b32c7"
            },
            "downloads": -1,
            "filename": "metadata_please-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2995ac4c9e49b6a660ab08afddab39b6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 18077,
            "upload_time": "2024-11-14T01:04:23",
            "upload_time_iso_8601": "2024-11-14T01:04:23.611466Z",
            "url": "https://files.pythonhosted.org/packages/06/2d/fed45153dd5343ab972422b9a4cdc30725376e3406dbb0ceaf81746344bd/metadata_please-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 01:04:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "python-packaging",
    "github_project": "metadata-please",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "metadata-please"
}
        
Elapsed time: 2.69038s