-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Donald Stufft <[email protected]> Co-authored-by: Paul Moore <[email protected]> Co-authored-by: Shantanu <[email protected]>
- Loading branch information
1 parent
96d85be
commit 7722044
Showing
9 changed files
with
749 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ You can install packaging with ``pip``: | |
specifiers | ||
markers | ||
requirements | ||
metadata | ||
tags | ||
utils | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Metadata | ||
======== | ||
|
||
.. currentmodule:: packaging.markers | ||
|
||
|
||
Both `source distributions`_ and `binary distributions` | ||
(_sdists_ and _wheels_, respectively) contain files recording the | ||
`core metadata`_ for the distribution. This information is used for | ||
everything from recording the name of the distribution to the | ||
installation dependencies. | ||
|
||
|
||
Usage | ||
----- | ||
|
||
.. doctest:: | ||
|
||
>>> from packaging.metadata import parse_email | ||
>>> metadata = "Metadata-Version: 2.3\nName: packaging\nVersion: 24.0" | ||
>>> raw, unparsed = parse_email(metadata) | ||
>>> raw["metadata_version"] | ||
'2.3' | ||
>>> raw["name"] | ||
'packaging' | ||
>>> raw["version"] | ||
'24.0' | ||
|
||
|
||
Reference | ||
--------- | ||
|
||
Low Level Interface | ||
''''''''''''''''''' | ||
|
||
.. automodule:: packaging.metadata | ||
:members: | ||
|
||
|
||
.. _source distributions: https://packaging.python.org/en/latest/specifications/source-distribution-format/ | ||
.. _binary distributions: https://packaging.python.org/en/latest/specifications/binary-distribution-format/ | ||
.. _core metadata: https://packaging.python.org/en/latest/specifications/core-metadata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.