Name | wheel-filename JSON |
Version |
1.4.2
JSON |
| download |
home_page | None |
Summary | Parse wheel filenames |
upload_time | 2024-12-01 13:03:16 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
filename
pep427
wheel
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
|repostatus| |ci-status| |coverage| |pyversions| |license|
.. |repostatus| image:: https://www.repostatus.org/badges/latest/active.svg
:target: https://www.repostatus.org/#active
:alt: Project Status: Active — The project has reached a stable, usable
state and is being actively developed.
.. |ci-status| image:: https://github.com/wheelodex/wheel-filename/actions/workflows/test.yml/badge.svg
:target: https://github.com/wheelodex/wheel-filename/actions/workflows/test.yml
:alt: CI Status
.. |coverage| image:: https://codecov.io/gh/wheelodex/wheel-filename/branch/master/graph/badge.svg
:target: https://codecov.io/gh/wheelodex/wheel-filename
.. |pyversions| image:: https://img.shields.io/pypi/pyversions/wheel-filename.svg
:target: https://pypi.org/project/wheel-filename/
.. |license| image:: https://img.shields.io/github/license/wheelodex/wheel-filename.svg
:target: https://opensource.org/licenses/MIT
:alt: MIT License
`GitHub <https://github.com/wheelodex/wheel-filename>`_
| `PyPI <https://pypi.org/project/wheel-filename/>`_
| `Issues <https://github.com/wheelodex/wheel-filename/issues>`_
| `Changelog <https://github.com/wheelodex/wheel-filename/blob/master/CHANGELOG.md>`_
``wheel-filename`` lets you verify wheel_ filenames and parse them into their
component fields.
.. _wheel: https://packaging.python.org/en/latest/specifications
/binary-distribution-format/
This package adheres strictly to the standard, with the following exceptions:
- Version components may be any sequence of the relevant set of characters;
they are not verified for PEP 440 compliance.
- The ``.whl`` file extension is matched case-insensitively.
Installation
============
``wheel-filename`` requires Python 3.8 or higher. Just use `pip
<https://pip.pypa.io>`_ for Python 3 (You have pip, right?) to install it::
python3 -m pip install wheel-filename
Example
=======
>>> from wheel_filename import parse_wheel_filename
>>> pwf = parse_wheel_filename('pip-18.0-py2.py3-none-any.whl')
>>> str(pwf)
'pip-18.0-py2.py3-none-any.whl'
>>> pwf.project
'pip'
>>> pwf.version
'18.0'
>>> pwf.build is None
True
>>> pwf.python_tags
['py2', 'py3']
>>> pwf.abi_tags
['none']
>>> pwf.platform_tags
['any']
>>> list(pwf.tag_triples())
['py2-none-any', 'py3-none-any']
API
===
``parse_wheel_filename(filename)``
Parses a wheel filename (a ``str``, ``bytes``, or ``os.PathLike``) and
returns a ``ParsedWheelFilename`` instance. Any leading directory
components are stripped from the argument before processing. If the
filename is not a valid wheel filename, raises an ``InvalidFilenameError``.
``ParsedWheelFilename``
A namedtuple representing the components of a wheel filename. It has the
following attributes and methods:
``project: str``
The name of the project distributed by the wheel
``version: str``
The version of the project distributed by the wheel
``build: Optional[str]``
The wheel's build tag (``None`` if not defined)
``python_tags: List[str]``
A list of Python tags for the wheel
``abi_tags: List[str]``
A list of ABI tags for the wheel
``platform_tags: List[str]``
A list of platform tags for the wheel
``str(pwf)``
Stringifying a ``ParsedWheelFilename`` returns the original filename
``tag_triples() -> Iterator[str]``
Returns an iterator of all simple tag triples formed from the
compatibility tags in the filename
``InvalidFilenameError``
A subclass of ``ValueError`` raised when an invalid wheel filename is passed
to ``parse_wheel_filename()``. It has a ``filename`` attribute containing
the basename of the invalid filename.
Command
=======
*New in version 1.4.0*
``wheel-filename`` also provides a command of the same name that takes a wheel
filename (The actual wheel does not have to exist) and outputs the filename
components as JSON.
Example::
$ wheel-filename pip-18.0-py2.py3-none-any.whl
{
"project": "pip",
"version": "18.0",
"build": null,
"python_tags": [
"py2",
"py3"
],
"abi_tags": [
"none"
],
"platform_tags": [
"any"
]
}
Raw data
{
"_id": null,
"home_page": null,
"name": "wheel-filename",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "filename, pep427, wheel",
"author": null,
"author_email": "John Thorvald Wodder II <wheel-filename@varonathe.org>",
"download_url": "https://files.pythonhosted.org/packages/38/be/726dab762b770d0417e505c58e26d661aac1ec0c831e483cda4817ca2417/wheel_filename-1.4.2.tar.gz",
"platform": null,
"description": "|repostatus| |ci-status| |coverage| |pyversions| |license|\n\n.. |repostatus| image:: https://www.repostatus.org/badges/latest/active.svg\n :target: https://www.repostatus.org/#active\n :alt: Project Status: Active \u2014 The project has reached a stable, usable\n state and is being actively developed.\n\n.. |ci-status| image:: https://github.com/wheelodex/wheel-filename/actions/workflows/test.yml/badge.svg\n :target: https://github.com/wheelodex/wheel-filename/actions/workflows/test.yml\n :alt: CI Status\n\n.. |coverage| image:: https://codecov.io/gh/wheelodex/wheel-filename/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/wheelodex/wheel-filename\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/wheel-filename.svg\n :target: https://pypi.org/project/wheel-filename/\n\n.. |license| image:: https://img.shields.io/github/license/wheelodex/wheel-filename.svg\n :target: https://opensource.org/licenses/MIT\n :alt: MIT License\n\n`GitHub <https://github.com/wheelodex/wheel-filename>`_\n| `PyPI <https://pypi.org/project/wheel-filename/>`_\n| `Issues <https://github.com/wheelodex/wheel-filename/issues>`_\n| `Changelog <https://github.com/wheelodex/wheel-filename/blob/master/CHANGELOG.md>`_\n\n``wheel-filename`` lets you verify wheel_ filenames and parse them into their\ncomponent fields.\n\n.. _wheel: https://packaging.python.org/en/latest/specifications\n /binary-distribution-format/\n\nThis package adheres strictly to the standard, with the following exceptions:\n\n- Version components may be any sequence of the relevant set of characters;\n they are not verified for PEP 440 compliance.\n\n- The ``.whl`` file extension is matched case-insensitively.\n\n\nInstallation\n============\n``wheel-filename`` requires Python 3.8 or higher. Just use `pip\n<https://pip.pypa.io>`_ for Python 3 (You have pip, right?) to install it::\n\n python3 -m pip install wheel-filename\n\n\nExample\n=======\n\n>>> from wheel_filename import parse_wheel_filename\n>>> pwf = parse_wheel_filename('pip-18.0-py2.py3-none-any.whl')\n>>> str(pwf)\n'pip-18.0-py2.py3-none-any.whl'\n>>> pwf.project\n'pip'\n>>> pwf.version\n'18.0'\n>>> pwf.build is None\nTrue\n>>> pwf.python_tags\n['py2', 'py3']\n>>> pwf.abi_tags\n['none']\n>>> pwf.platform_tags\n['any']\n>>> list(pwf.tag_triples())\n['py2-none-any', 'py3-none-any']\n\n\nAPI\n===\n\n``parse_wheel_filename(filename)``\n Parses a wheel filename (a ``str``, ``bytes``, or ``os.PathLike``) and\n returns a ``ParsedWheelFilename`` instance. Any leading directory\n components are stripped from the argument before processing. If the\n filename is not a valid wheel filename, raises an ``InvalidFilenameError``.\n\n``ParsedWheelFilename``\n A namedtuple representing the components of a wheel filename. It has the\n following attributes and methods:\n\n ``project: str``\n The name of the project distributed by the wheel\n\n ``version: str``\n The version of the project distributed by the wheel\n\n ``build: Optional[str]``\n The wheel's build tag (``None`` if not defined)\n\n ``python_tags: List[str]``\n A list of Python tags for the wheel\n\n ``abi_tags: List[str]``\n A list of ABI tags for the wheel\n\n ``platform_tags: List[str]``\n A list of platform tags for the wheel\n\n ``str(pwf)``\n Stringifying a ``ParsedWheelFilename`` returns the original filename\n\n ``tag_triples() -> Iterator[str]``\n Returns an iterator of all simple tag triples formed from the\n compatibility tags in the filename\n\n``InvalidFilenameError``\n A subclass of ``ValueError`` raised when an invalid wheel filename is passed\n to ``parse_wheel_filename()``. It has a ``filename`` attribute containing\n the basename of the invalid filename.\n\n\nCommand\n=======\n\n*New in version 1.4.0*\n\n``wheel-filename`` also provides a command of the same name that takes a wheel\nfilename (The actual wheel does not have to exist) and outputs the filename\ncomponents as JSON.\n\nExample::\n\n $ wheel-filename pip-18.0-py2.py3-none-any.whl\n {\n \"project\": \"pip\",\n \"version\": \"18.0\",\n \"build\": null,\n \"python_tags\": [\n \"py2\",\n \"py3\"\n ],\n \"abi_tags\": [\n \"none\"\n ],\n \"platform_tags\": [\n \"any\"\n ]\n }\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Parse wheel filenames",
"version": "1.4.2",
"project_urls": {
"Bug Tracker": "https://github.com/wheelodex/wheel-filename/issues",
"Source Code": "https://github.com/wheelodex/wheel-filename"
},
"split_keywords": [
"filename",
" pep427",
" wheel"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b40f6e97a3bc38cdde32e3ec49f8c0903fe3559ec9ec9db181782f0bb4417717",
"md5": "372f22385dc489b0feec3a267d5c7c46",
"sha256": "3fa599046443d4ca830d06e3d180cd0a675d5871af0a68daa5623318bb4d17e3"
},
"downloads": -1,
"filename": "wheel_filename-1.4.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "372f22385dc489b0feec3a267d5c7c46",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6195,
"upload_time": "2024-12-01T13:03:00",
"upload_time_iso_8601": "2024-12-01T13:03:00.536117Z",
"url": "https://files.pythonhosted.org/packages/b4/0f/6e97a3bc38cdde32e3ec49f8c0903fe3559ec9ec9db181782f0bb4417717/wheel_filename-1.4.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "38be726dab762b770d0417e505c58e26d661aac1ec0c831e483cda4817ca2417",
"md5": "0c819ae4be56884f0d1ccd7eceb8b060",
"sha256": "87891c465dcbb40b40394a906f01a93214bdd51aa5d25e3a9a59cae62bc298fd"
},
"downloads": -1,
"filename": "wheel_filename-1.4.2.tar.gz",
"has_sig": false,
"md5_digest": "0c819ae4be56884f0d1ccd7eceb8b060",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7911,
"upload_time": "2024-12-01T13:03:16",
"upload_time_iso_8601": "2024-12-01T13:03:16.012739Z",
"url": "https://files.pythonhosted.org/packages/38/be/726dab762b770d0417e505c58e26d661aac1ec0c831e483cda4817ca2417/wheel_filename-1.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-01 13:03:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wheelodex",
"github_project": "wheel-filename",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "wheel-filename"
}