chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
cdf9ca97-ddee-48ab-a3c7-2afb28d74869
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,306
supabase-export-v2
2af5e7126cabcf8c
you can emulate immutability. In that case, dataclasses will add :meth:`~object.__setattr__` and :meth:`~object.__delattr__` methods to the class. These methods will raise a :exc:`FrozenInstanceError` when invoked. There is a tiny performance penalty when using ``frozen=True``: :meth:`~object.__init__` cannot use simpl...
trusted_official_docs
CPython Docs
you can emulate immutability. In that case, dataclasses will add :meth:`~object.__setattr__` and :meth:`~object.__delattr__` methods to the class. These methods will raise a :exc:`FrozenInstanceError` when invoked. There is a tiny performance penalty when using ``frozen=True``: :meth:`~object.__init__` cannot use simpl...
you can emulate immutability. In that case, dataclasses will add :meth:`~object.__setattr__` and :meth:`~object.__delattr__` methods to the class. These methods will raise a :exc:`FrozenInstanceError` when invoked. There is a tiny performance penalty when using ``frozen=True``: :meth:`~object.__init__` cannot use simpl...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d5f964c3-2b76-4f87-8b09-f1e23d4bda44
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,223
supabase-export-v2
0c93d24168aaae1b
.. class:: Field :class:`!Field` objects describe each defined field. These objects are created internally, and are returned by the :func:`fields` module-level method (see below). Users should never instantiate a :class:`!Field` object directly. Its documented attributes are:
trusted_official_docs
CPython Docs
.. class:: Field :class:`!Field` objects describe each defined field. These objects are created internally, and are returned by the :func:`fields` module-level method (see below). Users should never instantiate a :class:`!Field` object directly. Its documented attributes are:
.. class:: Field :class:`!Field` objects describe each defined field. These objects are created internally, and are returned by the :func:`fields` module-level method (see below). Users should never instantiate a :class:`!Field` object directly. Its documented attributes are:
python, official-docs, cpython, P0
Local_Trusted_Corpus
d9b7dc81-b8bb-4984-a6ce-2f30791fc565
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,201
supabase-export-v2
28efdb44091a5756
information. To satisfy this need for additional information, you can replace the default field value with a call to the provided :func:`!field` function. For example:: @dataclass class C: mylist: list[int] = field(default_factory=list)
trusted_official_docs
CPython Docs
information. To satisfy this need for additional information, you can replace the default field value with a call to the provided :func:`!field` function. For example:: @dataclass class C: mylist: list[int] = field(default_factory=list)
information. To satisfy this need for additional information, you can replace the default field value with a call to the provided :func:`!field` function. For example:: @dataclass class C: mylist: list[int] = field(default_factory=list)
python, official-docs, cpython, P0
Local_Trusted_Corpus
da0c5be1-d5e2-4dd3-929e-de7df95b0e2a
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,174
supabase-export-v2
e200b0632faa742c
in order. Both instances in the comparison must be of the identical type. If *order* is true and *eq* is false, a :exc:`ValueError` is raised. If the class already defines any of :meth:`!__lt__`, :meth:`!__le__`, :meth:`!__gt__`, or :meth:`!__ge__`, then :exc:`TypeError` is raised.
trusted_official_docs
CPython Docs
in order. Both instances in the comparison must be of the identical type. If *order* is true and *eq* is false, a :exc:`ValueError` is raised. If the class already defines any of :meth:`!__lt__`, :meth:`!__le__`, :meth:`!__gt__`, or :meth:`!__ge__`, then :exc:`TypeError` is raised.
in order. Both instances in the comparison must be of the identical type. If *order* is true and *eq* is false, a :exc:`ValueError` is raised. If the class already defines any of :meth:`!__lt__`, :meth:`!__le__`, :meth:`!__gt__`, or :meth:`!__ge__`, then :exc:`TypeError` is raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
daf18a4b-369d-45d8-a87c-01b26c66fef2
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,171
supabase-export-v2
ca96b969f51f14d0
If the class already defines :meth:`!__repr__`, this parameter is ignored. - *eq*: If true (the default), an :meth:`~object.__eq__` method will be generated. This method compares the class as if it were a tuple of its fields, in order. Both instances in the comparison must be of the identical type.
trusted_official_docs
CPython Docs
If the class already defines :meth:`!__repr__`, this parameter is ignored. - *eq*: If true (the default), an :meth:`~object.__eq__` method will be generated. This method compares the class as if it were a tuple of its fields, in order. Both instances in the comparison must be of the identical type.
If the class already defines :meth:`!__repr__`, this parameter is ignored. - *eq*: If true (the default), an :meth:`~object.__eq__` method will be generated. This method compares the class as if it were a tuple of its fields, in order. Both instances in the comparison must be of the identical type.
python, official-docs, cpython, P0
Local_Trusted_Corpus
deb376d6-557d-47f0-8788-ce0cec73af5b
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,347
supabase-export-v2
177a416f6c754575
* The value for the field passed to the dataclass's :meth:`~object.__init__` method is passed to the descriptor's :meth:`~object.__set__` method rather than overwriting the descriptor object. * Similarly, when getting or setting the field, the descriptor's :meth:`~object.__get__` or :meth:`!__set__` method is called r...
trusted_official_docs
CPython Docs
* The value for the field passed to the dataclass's :meth:`~object.__init__` method is passed to the descriptor's :meth:`~object.__set__` method rather than overwriting the descriptor object. * Similarly, when getting or setting the field, the descriptor's :meth:`~object.__get__` or :meth:`!__set__` method is called r...
* The value for the field passed to the dataclass's :meth:`~object.__init__` method is passed to the descriptor's :meth:`~object.__set__` method rather than overwriting the descriptor object. * Similarly, when getting or setting the field, the descriptor's :meth:`~object.__get__` or :meth:`!__set__` method is called r...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e231da66-f06b-4602-8ae9-cab6d18fad99
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,195
supabase-export-v2
3c25cbab90dea404
``field``\s may optionally specify a default value, using normal Python syntax:: @dataclass class C: a: int # 'a' has no default value b: int = 0 # assign a default value for 'b'
trusted_official_docs
CPython Docs
``field``\s may optionally specify a default value, using normal Python syntax:: @dataclass class C: a: int # 'a' has no default value b: int = 0 # assign a default value for 'b'
``field``\s may optionally specify a default value, using normal Python syntax:: @dataclass class C: a: int # 'a' has no default value b: int = 0 # assign a default value for 'b'
python, official-docs, cpython, P0
Local_Trusted_Corpus
e3e12ba0-2b93-4c3a-9885-e373e5279177
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,266
supabase-export-v2
ce94c05b45d4413f
Return ``True`` if its parameter is a dataclass (including subclasses of a dataclass) or an instance of one, otherwise return ``False``. If you need to know if a class is an instance of a dataclass (and not a dataclass itself), then add a further check for ``not isinstance(obj, type)``::
trusted_official_docs
CPython Docs
Return ``True`` if its parameter is a dataclass (including subclasses of a dataclass) or an instance of one, otherwise return ``False``. If you need to know if a class is an instance of a dataclass (and not a dataclass itself), then add a further check for ``not isinstance(obj, type)``::
Return ``True`` if its parameter is a dataclass (including subclasses of a dataclass) or an instance of one, otherwise return ``False``. If you need to know if a class is an instance of a dataclass (and not a dataclass itself), then add a further check for ``not isinstance(obj, type)``::
python, official-docs, cpython, P0
Local_Trusted_Corpus
e68d2076-7150-4ecb-b3e8-bf6fd559579f
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,159
supabase-export-v2
c450a3a3e455761a
This function is a :term:`decorator` that is used to add generated :term:`special methods <special method>` to classes, as described below. The ``@dataclass`` decorator examines the class to find ``field``\s. A ``field`` is defined as a class variable that has a :term:`type annotation <variable annotation>`. With two...
trusted_official_docs
CPython Docs
This function is a :term:`decorator` that is used to add generated :term:`special methods <special method>` to classes, as described below. The ``@dataclass`` decorator examines the class to find ``field``\s. A ``field`` is defined as a class variable that has a :term:`type annotation <variable annotation>`. With two...
This function is a :term:`decorator` that is used to add generated :term:`special methods <special method>` to classes, as described below. The ``@dataclass`` decorator examines the class to find ``field``\s. A ``field`` is defined as a class variable that has a :term:`type annotation <variable annotation>`. With two...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e68efb87-9d2f-4549-939c-f4a83ee41853
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,258
supabase-export-v2
079c8b3590ee9b51
.. function:: replace(obj, /, **changes) Creates a new object of the same type as *obj*, replacing fields with values from *changes*. If *obj* is not a Data Class, raises :exc:`TypeError`. If keys in *changes* are not field names of the given dataclass, raises :exc:`TypeError`.
trusted_official_docs
CPython Docs
.. function:: replace(obj, /, **changes) Creates a new object of the same type as *obj*, replacing fields with values from *changes*. If *obj* is not a Data Class, raises :exc:`TypeError`. If keys in *changes* are not field names of the given dataclass, raises :exc:`TypeError`.
.. function:: replace(obj, /, **changes) Creates a new object of the same type as *obj*, replacing fields with values from *changes*. If *obj* is not a Data Class, raises :exc:`TypeError`. If keys in *changes* are not field names of the given dataclass, raises :exc:`TypeError`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e965eb3b-1a66-4bd9-853b-1ff699898593
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,220
supabase-export-v2
42a09291f05849a4
@dataclass class C: x: int y: int = field(repr=False) z: int = field(repr=False, default=10) t: int = 20 The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!C.t` will be ``20``, and the class attributes :attr:`!C.x` and :attr:`!C.y` will not be set.
trusted_official_docs
CPython Docs
@dataclass class C: x: int y: int = field(repr=False) z: int = field(repr=False, default=10) t: int = 20 The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!C.t` will be ``20``, and the class attributes :attr:`!C.x` and :attr:`!C.y` will not be set.
@dataclass class C: x: int y: int = field(repr=False) z: int = field(repr=False, default=10) t: int = 20 The class attribute :attr:`!C.z` will be ``10``, the class attribute :attr:`!C.t` will be ``20``, and the class attributes :attr:`!C.x` and :attr:`!C.y` will not be set.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ea11a737-3dd7-4965-9c1a-0fd14b1feda2
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,177
supabase-export-v2
97919b99ba8725b4
that depends on the programmer's intent, the existence and behavior of :meth:`!__eq__`, and the values of the *eq* and *frozen* flags in the ``@dataclass`` decorator. By default, ``@dataclass`` will not implicitly add a :meth:`~object.__hash__` method unless it is safe to do so. Neither will it add or change an exist...
trusted_official_docs
CPython Docs
that depends on the programmer's intent, the existence and behavior of :meth:`!__eq__`, and the values of the *eq* and *frozen* flags in the ``@dataclass`` decorator. By default, ``@dataclass`` will not implicitly add a :meth:`~object.__hash__` method unless it is safe to do so. Neither will it add or change an exist...
that depends on the programmer's intent, the existence and behavior of :meth:`!__eq__`, and the values of the *eq* and *frozen* flags in the ``@dataclass`` decorator. By default, ``@dataclass`` will not implicitly add a :meth:`~object.__hash__` method unless it is safe to do so. Neither will it add or change an exist...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ed4e0d4d-1004-4936-beed-682f308b9fb5
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,181
supabase-export-v2
51958e2cb50a933a
untouched meaning the :meth:`!__hash__` method of the superclass will be used (if the superclass is :class:`object`, this means it will fall back to id-based hashing). - *frozen*: If true (the default is ``False``), assigning to fields will generate an exception. This emulates read-only frozen instances. See the :ref:...
trusted_official_docs
CPython Docs
untouched meaning the :meth:`!__hash__` method of the superclass will be used (if the superclass is :class:`object`, this means it will fall back to id-based hashing). - *frozen*: If true (the default is ``False``), assigning to fields will generate an exception. This emulates read-only frozen instances. See the :ref:...
untouched meaning the :meth:`!__hash__` method of the superclass will be used (if the superclass is :class:`object`, this means it will fall back to id-based hashing). - *frozen*: If true (the default is ``False``), assigning to fields will generate an exception. This emulates read-only frozen instances. See the :ref:...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ed685de9-ecc1-4bf2-8ce4-283cc9b51a4e
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,328
supabase-export-v2
cacc96bcc57da6da
mylist: list = field(default_factory=list) If a field is excluded from :meth:`~object.__init__` (using ``init=False``) and the field also specifies *default_factory*, then the default factory function will always be called from the generated :meth:`!__init__` function. This happens because there is no other way to give...
trusted_official_docs
CPython Docs
mylist: list = field(default_factory=list) If a field is excluded from :meth:`~object.__init__` (using ``init=False``) and the field also specifies *default_factory*, then the default factory function will always be called from the generated :meth:`!__init__` function. This happens because there is no other way to give...
mylist: list = field(default_factory=list) If a field is excluded from :meth:`~object.__init__` (using ``init=False``) and the field also specifies *default_factory*, then the default factory function will always be called from the generated :meth:`!__init__` function. This happens because there is no other way to give...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f2bd3584-4ccc-4560-8ee5-750efe96054c
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,179
supabase-export-v2
ee88eb0034160916
be the case if your class is logically immutable but can still be mutated. This is a specialized use case and should be considered carefully. Here are the rules governing implicit creation of a :meth:`!__hash__` method. Note that you cannot both have an explicit :meth:`!__hash__` method in your dataclass and set ``un...
trusted_official_docs
CPython Docs
be the case if your class is logically immutable but can still be mutated. This is a specialized use case and should be considered carefully. Here are the rules governing implicit creation of a :meth:`!__hash__` method. Note that you cannot both have an explicit :meth:`!__hash__` method in your dataclass and set ``un...
be the case if your class is logically immutable but can still be mutated. This is a specialized use case and should be considered carefully. Here are the rules governing implicit creation of a :meth:`!__hash__` method. Note that you cannot both have an explicit :meth:`!__hash__` method in your dataclass and set ``un...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f3bff882-804b-4a0f-85d0-bcf51fb9b223
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,272
supabase-export-v2
b78a1d735bab6513
name of ``_`` is used for a :const:`!KW_ONLY` field. Keyword-only fields signify :meth:`~object.__init__` parameters that must be specified as keywords when the class is instantiated. In this example, the fields ``y`` and ``z`` will be marked as keyword-only fields::
trusted_official_docs
CPython Docs
name of ``_`` is used for a :const:`!KW_ONLY` field. Keyword-only fields signify :meth:`~object.__init__` parameters that must be specified as keywords when the class is instantiated. In this example, the fields ``y`` and ``z`` will be marked as keyword-only fields::
name of ``_`` is used for a :const:`!KW_ONLY` field. Keyword-only fields signify :meth:`~object.__init__` parameters that must be specified as keywords when the class is instantiated. In this example, the fields ``y`` and ``z`` will be marked as keyword-only fields::
python, official-docs, cpython, P0
Local_Trusted_Corpus
f92fab1e-42d0-4447-99e1-16ea8c113117
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,218
supabase-export-v2
d1f749e37e314ee0
.. versionadded:: 3.14 If the default value of a field is specified by a call to :func:`!field`, then the class attribute for this field will be replaced by the specified *default* value. If *default* is not provided, then the class attribute will be deleted. The intent is that after the :deco:`dataclass` decorator...
trusted_official_docs
CPython Docs
.. versionadded:: 3.14 If the default value of a field is specified by a call to :func:`!field`, then the class attribute for this field will be replaced by the specified *default* value. If *default* is not provided, then the class attribute will be deleted. The intent is that after the :deco:`dataclass` decorator...
.. versionadded:: 3.14 If the default value of a field is specified by a call to :func:`!field`, then the class attribute for this field will be replaced by the specified *default* value. If *default* is not provided, then the class attribute will be deleted. The intent is that after the :deco:`dataclass` decorator...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f9d58861-137c-42a2-a759-1b467c83765a
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,263
supabase-export-v2
4b5ad54b9ceb0274
they are used, it might be wise to have alternate class constructors, or perhaps a custom :func:`!replace` (or similarly named) method which handles instance copying. Dataclass instances are also supported by generic function :func:`copy.replace`.
trusted_official_docs
CPython Docs
they are used, it might be wise to have alternate class constructors, or perhaps a custom :func:`!replace` (or similarly named) method which handles instance copying. Dataclass instances are also supported by generic function :func:`copy.replace`.
they are used, it might be wise to have alternate class constructors, or perhaps a custom :func:`!replace` (or similarly named) method which handles instance copying. Dataclass instances are also supported by generic function :func:`copy.replace`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fd2d16fa-f409-4b47-a0e4-7e2b98145a6a
CPython Docs
file://datasets/cpython/Doc/library/dataclasses.rst
unknown
728fa76a-0041-43a1-a7a5-465d49abb21b
5,313
supabase-export-v2
05876a0a3326a9c7
@dataclass class C(Base): z: int = 10 x: int = 15 The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. The final type of :attr:`!x` is :class:`int`, as specified in class :class:`!C`.
trusted_official_docs
CPython Docs
@dataclass class C(Base): z: int = 10 x: int = 15 The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. The final type of :attr:`!x` is :class:`int`, as specified in class :class:`!C`.
@dataclass class C(Base): z: int = 10 x: int = 15 The final list of fields is, in order, :attr:`!x`, :attr:`!y`, :attr:`!z`. The final type of :attr:`!x` is :class:`int`, as specified in class :class:`!C`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
03b6cddb-fd37-4945-9603-590fbf074205
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,370
supabase-export-v2
36abc8b258fc2c38
`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT>`_ Documentation on the ZIP file format by Phil Katz, the creator of the format and algorithms used. :pep:`273` - Import Modules from Zip Archives Written by James C. Ahlstrom, who also provided an implementation. Python 2.3 follows ...
trusted_official_docs
CPython Docs
`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT>`_ Documentation on the ZIP file format by Phil Katz, the creator of the format and algorithms used. :pep:`273` - Import Modules from Zip Archives Written by James C. Ahlstrom, who also provided an implementation. Python 2.3 follows ...
`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT>`_ Documentation on the ZIP file format by Phil Katz, the creator of the format and algorithms used. :pep:`273` - Import Modules from Zip Archives Written by James C. Ahlstrom, who also provided an implementation. Python 2.3 follows ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
14d359aa-b0a3-4b8e-ab19-d9759359bb66
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,363
supabase-export-v2
4aded5d06baf2ace
needed to use the :mod:`!zipimport` module explicitly; it is automatically used by the built-in :keyword:`import` mechanism for :data:`sys.path` items that are paths to ZIP archives. Typically, :data:`sys.path` is a list of directory names as strings. This module also allows an item of :data:`sys.path` to be a string n...
trusted_official_docs
CPython Docs
needed to use the :mod:`!zipimport` module explicitly; it is automatically used by the built-in :keyword:`import` mechanism for :data:`sys.path` items that are paths to ZIP archives. Typically, :data:`sys.path` is a list of directory names as strings. This module also allows an item of :data:`sys.path` to be a string n...
needed to use the :mod:`!zipimport` module explicitly; it is automatically used by the built-in :keyword:`import` mechanism for :data:`sys.path` items that are paths to ZIP archives. Typically, :data:`sys.path` is a list of directory names as strings. This module also allows an item of :data:`sys.path` to be a string n...
python, official-docs, cpython, P0
Local_Trusted_Corpus
23bf710b-f183-4030-b093-45e9e8f14bb3
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,410
supabase-export-v2
8979466eeeb1cb37
within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file. The :attr:`archive` and :attr:`prefix` attributes, when combined with a slash, equal the original *archivepath* argument given to the :class:`zipimporter` constructor.
trusted_official_docs
CPython Docs
within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file. The :attr:`archive` and :attr:`prefix` attributes, when combined with a slash, equal the original *archivepath* argument given to the :class:`zipimporter` constructor.
within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file. The :attr:`archive` and :attr:`prefix` attributes, when combined with a slash, equal the original *archivepath* argument given to the :class:`zipimporter` constructor.
python, official-docs, cpython, P0
Local_Trusted_Corpus
30479270-159b-4599-b38b-3d4a77f19a6a
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,401
supabase-export-v2
5475cbab0edfcf86
.. method:: get_source(fullname) Return the source code for the specified module. Raise :exc:`ZipImportError` if the module couldn't be found, return :const:`None` if the archive does contain the module, but has no source for it.
trusted_official_docs
CPython Docs
.. method:: get_source(fullname) Return the source code for the specified module. Raise :exc:`ZipImportError` if the module couldn't be found, return :const:`None` if the archive does contain the module, but has no source for it.
.. method:: get_source(fullname) Return the source code for the specified module. Raise :exc:`ZipImportError` if the module couldn't be found, return :const:`None` if the archive does contain the module, but has no source for it.
python, official-docs, cpython, P0
Local_Trusted_Corpus
37dfd907-e941-4758-8914-7452f48b91b8
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,364
supabase-export-v2
045eb7ba4c867679
archive can be specified to only import from a subdirectory. For example, the path :file:`example.zip/lib/` would only import from the :file:`lib/` subdirectory within the archive. Any files may be present in the ZIP archive, but importers are only invoked for :file:`.py` and :file:`.pyc` files. ZIP import of dynamic m...
trusted_official_docs
CPython Docs
archive can be specified to only import from a subdirectory. For example, the path :file:`example.zip/lib/` would only import from the :file:`lib/` subdirectory within the archive. Any files may be present in the ZIP archive, but importers are only invoked for :file:`.py` and :file:`.pyc` files. ZIP import of dynamic m...
archive can be specified to only import from a subdirectory. For example, the path :file:`example.zip/lib/` would only import from the :file:`lib/` subdirectory within the archive. Any files may be present in the ZIP archive, but importers are only invoked for :file:`.py` and :file:`.pyc` files. ZIP import of dynamic m...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3a384036-e3d8-49d0-835b-6ede9460f6e5
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,365
supabase-export-v2
8b495a1fd38e083e
to modify the archive by adding the corresponding :file:`.pyc` file, meaning that if a ZIP archive doesn't contain :file:`.pyc` files, importing may be rather slow. .. versionchanged:: 3.15 Zstandard (*zstd*) compressed zip file entries are supported.
trusted_official_docs
CPython Docs
to modify the archive by adding the corresponding :file:`.pyc` file, meaning that if a ZIP archive doesn't contain :file:`.pyc` files, importing may be rather slow. .. versionchanged:: 3.15 Zstandard (*zstd*) compressed zip file entries are supported.
to modify the archive by adding the corresponding :file:`.pyc` file, meaning that if a ZIP archive doesn't contain :file:`.pyc` files, importing may be rather slow. .. versionchanged:: 3.15 Zstandard (*zstd*) compressed zip file entries are supported.
python, official-docs, cpython, P0
Local_Trusted_Corpus
4e843dd5-eb0c-44ce-b5bb-5e9aa940fd5e
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,371
supabase-export-v2
fbc47f0bd5fba4e4
implementation. Python 2.3 follows the specification in :pep:`273`, but uses an implementation written by Just van Rossum that uses the import hooks described in :pep:`302`. :mod:`importlib` - The implementation of the import machinery Package providing the relevant protocols for all importers to implement.
trusted_official_docs
CPython Docs
implementation. Python 2.3 follows the specification in :pep:`273`, but uses an implementation written by Just van Rossum that uses the import hooks described in :pep:`302`. :mod:`importlib` - The implementation of the import machinery Package providing the relevant protocols for all importers to implement.
implementation. Python 2.3 follows the specification in :pep:`273`, but uses an implementation written by Just van Rossum that uses the import hooks described in :pep:`302`. :mod:`importlib` - The implementation of the import machinery Package providing the relevant protocols for all importers to implement.
python, official-docs, cpython, P0
Local_Trusted_Corpus
86c513ba-d6e7-4b9e-aff3-82e5cd7bbe68
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,379
supabase-export-v2
886d66bab6d4aa66
.. class:: zipimporter(archivepath) Create a new zipimporter instance. *archivepath* must be a path to a ZIP file, or to a specific path within a ZIP file. For example, an *archivepath* of :file:`foo/bar.zip/lib` will look for modules in the :file:`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided tha...
trusted_official_docs
CPython Docs
.. class:: zipimporter(archivepath) Create a new zipimporter instance. *archivepath* must be a path to a ZIP file, or to a specific path within a ZIP file. For example, an *archivepath* of :file:`foo/bar.zip/lib` will look for modules in the :file:`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided tha...
.. class:: zipimporter(archivepath) Create a new zipimporter instance. *archivepath* must be a path to a ZIP file, or to a specific path within a ZIP file. For example, an *archivepath* of :file:`foo/bar.zip/lib` will look for modules in the :file:`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided tha...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c216ab20-1cfe-46a3-b3e1-326a1518d736
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,380
supabase-export-v2
f0cf1c771b9d3245
ZIP file. For example, an *archivepath* of :file:`foo/bar.zip/lib` will look for modules in the :file:`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided that it exists). :exc:`ZipImportError` is raised if *archivepath* doesn't point to a valid ZIP archive.
trusted_official_docs
CPython Docs
ZIP file. For example, an *archivepath* of :file:`foo/bar.zip/lib` will look for modules in the :file:`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided that it exists). :exc:`ZipImportError` is raised if *archivepath* doesn't point to a valid ZIP archive.
ZIP file. For example, an *archivepath* of :file:`foo/bar.zip/lib` will look for modules in the :file:`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided that it exists). :exc:`ZipImportError` is raised if *archivepath* doesn't point to a valid ZIP archive.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c2d9f57e-8753-47ac-9ceb-ea21defbe2e2
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,409
supabase-export-v2
2d0b71355788f54b
.. attribute:: prefix The subpath within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file.
trusted_official_docs
CPython Docs
.. attribute:: prefix The subpath within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file.
.. attribute:: prefix The subpath within the ZIP file where modules are searched. This is the empty string for zipimporter objects which point to the root of the ZIP file.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e4b1e8f2-666b-44f9-8e16-ebdfd2b74832
CPython Docs
file://datasets/cpython/Doc/library/zipimport.rst
unknown
2072bf49-e932-46a9-ba90-2458cfaefc9c
5,362
supabase-export-v2
647f13db1f52b4a4
-------------- This module adds the ability to import Python modules (:file:`\*.py`, :file:`\*.pyc`) and packages from ZIP-format archives. It is usually not needed to use the :mod:`!zipimport` module explicitly; it is automatically used by the built-in :keyword:`import` mechanism for :data:`sys.path` items that are pa...
trusted_official_docs
CPython Docs
-------------- This module adds the ability to import Python modules (:file:`\*.py`, :file:`\*.pyc`) and packages from ZIP-format archives. It is usually not needed to use the :mod:`!zipimport` module explicitly; it is automatically used by the built-in :keyword:`import` mechanism for :data:`sys.path` items that are pa...
-------------- This module adds the ability to import Python modules (:file:`\*.py`, :file:`\*.pyc`) and packages from ZIP-format archives. It is usually not needed to use the :mod:`!zipimport` module explicitly; it is automatically used by the built-in :keyword:`import` mechanism for :data:`sys.path` items that are pa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
04a24852-bfdf-42dc-ab24-05f52d313cf9
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,466
supabase-export-v2
1b2fb7a9f077cd8f
>>> import glob >>> glob.glob('./[0-9].*') ['./1.gif', './2.txt'] >>> glob.glob('*.gif') ['1.gif', 'card.gif'] >>> glob.glob('?.gif') ['1.gif'] >>> glob.glob('**/*.txt', recursive=True) ['2.txt', 'sub/3.txt'] >>> glob.glob('./**/', recursive=True) ['./', './sub/'] If the directory contains files starting with ``.`` the...
trusted_official_docs
CPython Docs
>>> import glob >>> glob.glob('./[0-9].*') ['./1.gif', './2.txt'] >>> glob.glob('*.gif') ['1.gif', 'card.gif'] >>> glob.glob('?.gif') ['1.gif'] >>> glob.glob('**/*.txt', recursive=True) ['2.txt', 'sub/3.txt'] >>> glob.glob('./**/', recursive=True) ['./', './sub/'] If the directory contains files starting with ``.`` the...
>>> import glob >>> glob.glob('./[0-9].*') ['./1.gif', './2.txt'] >>> glob.glob('*.gif') ['1.gif', 'card.gif'] >>> glob.glob('?.gif') ['1.gif'] >>> glob.glob('**/*.txt', recursive=True) ['2.txt', 'sub/3.txt'] >>> glob.glob('./**/', recursive=True) ['./', './sub/'] If the directory contains files starting with ``.`` the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
059dcecd-1c86-4f15-8120-c1eef3df7b48
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,430
supabase-export-v2
8bbb82350e697499
that satisfies conditions is removed or added during the call of this function, whether a path name for that file will be included is unspecified. If *root_dir* is not ``None``, it should be a :term:`path-like object` specifying the root directory for searching. It has the same effect on :func:`!glob` as changing the...
trusted_official_docs
CPython Docs
that satisfies conditions is removed or added during the call of this function, whether a path name for that file will be included is unspecified. If *root_dir* is not ``None``, it should be a :term:`path-like object` specifying the root directory for searching. It has the same effect on :func:`!glob` as changing the...
that satisfies conditions is removed or added during the call of this function, whether a path name for that file will be included is unspecified. If *root_dir* is not ``None``, it should be a :term:`path-like object` specifying the root directory for searching. It has the same effect on :func:`!glob` as changing the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
097fe87a-5a61-4958-911c-e8ff1f17bf2b
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,429
supabase-export-v2
0fd0a659a78d0e6a
.. function:: glob(pathname, *, root_dir=None, dir_fd=None, recursive=False, \ include_hidden=False) Return a possibly empty list of path names that match *pathname*, which must be a string containing a path specification. *pathname* can be either absolute (like :file:`/usr/src/Python-1.5/Makefile`) or relative (like...
trusted_official_docs
CPython Docs
.. function:: glob(pathname, *, root_dir=None, dir_fd=None, recursive=False, \ include_hidden=False) Return a possibly empty list of path names that match *pathname*, which must be a string containing a path specification. *pathname* can be either absolute (like :file:`/usr/src/Python-1.5/Makefile`) or relative (like...
.. function:: glob(pathname, *, root_dir=None, dir_fd=None, recursive=False, \ include_hidden=False) Return a possibly empty list of path names that match *pathname*, which must be a string containing a path specification. *pathname* can be either absolute (like :file:`/usr/src/Python-1.5/Makefile`) or relative (like...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0c7741db-e1f3-481a-8a76-2ce7bba4d748
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,431
supabase-export-v2
d47c64324af598b3
the same effect on :func:`!glob` as changing the current directory before calling it. If *pathname* is relative, the result will contain paths relative to *root_dir*. This function can support :ref:`paths relative to directory descriptors <dir_fd>` with the *dir_fd* parameter.
trusted_official_docs
CPython Docs
the same effect on :func:`!glob` as changing the current directory before calling it. If *pathname* is relative, the result will contain paths relative to *root_dir*. This function can support :ref:`paths relative to directory descriptors <dir_fd>` with the *dir_fd* parameter.
the same effect on :func:`!glob` as changing the current directory before calling it. If *pathname* is relative, the result will contain paths relative to *root_dir*. This function can support :ref:`paths relative to directory descriptors <dir_fd>` with the *dir_fd* parameter.
python, official-docs, cpython, P0
Local_Trusted_Corpus
309a5e6a-b54e-4f4b-9a46-c5d2d43c9e76
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,425
supabase-export-v2
fc70b7b0180331d5
.. note:: The pathnames are returned in no particular order. If you need a specific order, sort the results. Files beginning with a dot (``.``) can only be matched by patterns that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`. For tilde and shell variable expansion, use :func:`os.p...
trusted_official_docs
CPython Docs
.. note:: The pathnames are returned in no particular order. If you need a specific order, sort the results. Files beginning with a dot (``.``) can only be matched by patterns that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`. For tilde and shell variable expansion, use :func:`os.p...
.. note:: The pathnames are returned in no particular order. If you need a specific order, sort the results. Files beginning with a dot (``.``) can only be matched by patterns that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`. For tilde and shell variable expansion, use :func:`os.p...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3c9e1e70-a52e-4755-9919-207392ade69e
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,457
supabase-export-v2
ab4f2332cfb97444
>>> import glob, re >>> >>> regex = glob.translate('**/*.txt', recursive=True, include_hidden=True) >>> regex '(?s:(?:.+/)?[^/]*\\.txt)\\z' >>> reobj = re.compile(regex) >>> reobj.prefixmatch('foo/bar/baz.txt') <re.Match object; span=(0, 15), match='foo/bar/baz.txt'> Path separators and segments are meaningful to this ...
trusted_official_docs
CPython Docs
>>> import glob, re >>> >>> regex = glob.translate('**/*.txt', recursive=True, include_hidden=True) >>> regex '(?s:(?:.+/)?[^/]*\\.txt)\\z' >>> reobj = re.compile(regex) >>> reobj.prefixmatch('foo/bar/baz.txt') <re.Match object; span=(0, 15), match='foo/bar/baz.txt'> Path separators and segments are meaningful to this ...
>>> import glob, re >>> >>> regex = glob.translate('**/*.txt', recursive=True, include_hidden=True) >>> regex '(?s:(?:.+/)?[^/]*\\.txt)\\z' >>> reobj = re.compile(regex) >>> reobj.prefixmatch('foo/bar/baz.txt') <re.Match object; span=(0, 15), match='foo/bar/baz.txt'> Path separators and segments are meaningful to this ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
43cb5bb6-4c8b-4c97-831a-f8b56211e4bb
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,433
supabase-export-v2
4e1649c42ca16ab5
.. index:: single: **; in glob-style wildcards If *recursive* is true, the pattern "``**``" will match any files and zero or more directories, subdirectories and symbolic links to directories. If the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files will not match.
trusted_official_docs
CPython Docs
.. index:: single: **; in glob-style wildcards If *recursive* is true, the pattern "``**``" will match any files and zero or more directories, subdirectories and symbolic links to directories. If the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files will not match.
.. index:: single: **; in glob-style wildcards If *recursive* is true, the pattern "``**``" will match any files and zero or more directories, subdirectories and symbolic links to directories. If the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files will not match.
python, official-docs, cpython, P0
Local_Trusted_Corpus
5078408d-9e52-4782-b238-31e392c72003
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,437
supabase-export-v2
56185de8551e0b30
.. note:: Using the "``**``" pattern in large directory trees may consume an inordinate amount of time. .. note:: This function may return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true.
trusted_official_docs
CPython Docs
.. note:: Using the "``**``" pattern in large directory trees may consume an inordinate amount of time. .. note:: This function may return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true.
.. note:: Using the "``**``" pattern in large directory trees may consume an inordinate amount of time. .. note:: This function may return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true.
python, official-docs, cpython, P0
Local_Trusted_Corpus
56d0e15d-1c9f-451f-9568-f0a1fb21e743
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,434
supabase-export-v2
9c0e82e941942313
zero or more directories, subdirectories and symbolic links to directories. If the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files will not match. If *include_hidden* is true, "``**``" pattern will match hidden directories.
trusted_official_docs
CPython Docs
zero or more directories, subdirectories and symbolic links to directories. If the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files will not match. If *include_hidden* is true, "``**``" pattern will match hidden directories.
zero or more directories, subdirectories and symbolic links to directories. If the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files will not match. If *include_hidden* is true, "``**``" pattern will match hidden directories.
python, official-docs, cpython, P0
Local_Trusted_Corpus
607a3589-ce68-4bfc-ba14-ab267353222f
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,467
supabase-export-v2
f3d085dce9b3bbe5
If the directory contains files starting with ``.`` they won't be matched by default. For example, consider a directory containing :file:`card.gif` and :file:`.card.gif`:: >>> import glob >>> glob.glob('*.gif') ['card.gif'] >>> glob.glob('.c*') ['.card.gif']
trusted_official_docs
CPython Docs
If the directory contains files starting with ``.`` they won't be matched by default. For example, consider a directory containing :file:`card.gif` and :file:`.card.gif`:: >>> import glob >>> glob.glob('*.gif') ['card.gif'] >>> glob.glob('.c*') ['.card.gif']
If the directory contains files starting with ``.`` they won't be matched by default. For example, consider a directory containing :file:`card.gif` and :file:`.card.gif`:: >>> import glob >>> glob.glob('*.gif') ['card.gif'] >>> glob.glob('.c*') ['.card.gif']
python, official-docs, cpython, P0
Local_Trusted_Corpus
69a1a3f8-da6c-4572-a286-bb7f7e777c26
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,465
supabase-export-v2
fcf4511aa6794247
subdirectory :file:`sub` which contains only the file :file:`3.txt`. :func:`glob` will produce the following results. Notice how any leading components of the path are preserved. :: >>> import glob >>> glob.glob('./[0-9].*') ['./1.gif', './2.txt'] >>> glob.glob('*.gif') ['1.gif', 'card.gif'] >>> glob.glob('?.gif')...
trusted_official_docs
CPython Docs
subdirectory :file:`sub` which contains only the file :file:`3.txt`. :func:`glob` will produce the following results. Notice how any leading components of the path are preserved. :: >>> import glob >>> glob.glob('./[0-9].*') ['./1.gif', './2.txt'] >>> glob.glob('*.gif') ['1.gif', 'card.gif'] >>> glob.glob('?.gif')...
subdirectory :file:`sub` which contains only the file :file:`3.txt`. :func:`glob` will produce the following results. Notice how any leading components of the path are preserved. :: >>> import glob >>> glob.glob('./[0-9].*') ['./1.gif', './2.txt'] >>> glob.glob('*.gif') ['1.gif', 'card.gif'] >>> glob.glob('?.gif')...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6debfac6-d3c1-41d2-8d41-cd548b838a67
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,439
supabase-export-v2
80b85c5343425a9f
.. note:: Any :exc:`OSError` exceptions raised from scanning the filesystem are suppressed. This includes :exc:`PermissionError` when accessing directories without read permission. .. versionchanged:: 3.5 Support for recursive globs using "``**``".
trusted_official_docs
CPython Docs
.. note:: Any :exc:`OSError` exceptions raised from scanning the filesystem are suppressed. This includes :exc:`PermissionError` when accessing directories without read permission. .. versionchanged:: 3.5 Support for recursive globs using "``**``".
.. note:: Any :exc:`OSError` exceptions raised from scanning the filesystem are suppressed. This includes :exc:`PermissionError` when accessing directories without read permission. .. versionchanged:: 3.5 Support for recursive globs using "``**``".
python, official-docs, cpython, P0
Local_Trusted_Corpus
8c15fa82-e512-4baf-8637-bcd529d6d7ea
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,426
supabase-export-v2
a4f2511b577995e9
only be matched by patterns that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`. For tilde and shell variable expansion, use :func:`os.path.expanduser` and :func:`os.path.expandvars`. For a literal match, wrap the meta-characters in brackets. For example, ``'[?]'`` matches the charac...
trusted_official_docs
CPython Docs
only be matched by patterns that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`. For tilde and shell variable expansion, use :func:`os.path.expanduser` and :func:`os.path.expandvars`. For a literal match, wrap the meta-characters in brackets. For example, ``'[?]'`` matches the charac...
only be matched by patterns that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`. For tilde and shell variable expansion, use :func:`os.path.expanduser` and :func:`os.path.expandvars`. For a literal match, wrap the meta-characters in brackets. For example, ``'[?]'`` matches the charac...
python, official-docs, cpython, P0
Local_Trusted_Corpus
98788c4a-f526-4c5b-ac95-38a5e5d5fb8e
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,422
supabase-export-v2
0cdf09ad91c93001
-------------- .. index:: single: * (asterisk); in glob-style wildcards single: ? (question mark); in glob-style wildcards single: [] (square brackets); in glob-style wildcards single: ! (exclamation); in glob-style wildcards single: - (minus); in glob-style wildcards single: . (dot); in glob-style wildcards
trusted_official_docs
CPython Docs
-------------- .. index:: single: * (asterisk); in glob-style wildcards single: ? (question mark); in glob-style wildcards single: [] (square brackets); in glob-style wildcards single: ! (exclamation); in glob-style wildcards single: - (minus); in glob-style wildcards single: . (dot); in glob-style wildcards
-------------- .. index:: single: * (asterisk); in glob-style wildcards single: ? (question mark); in glob-style wildcards single: [] (square brackets); in glob-style wildcards single: ! (exclamation); in glob-style wildcards single: - (minus); in glob-style wildcards single: . (dot); in glob-style wildcards
python, official-docs, cpython, P0
Local_Trusted_Corpus
a480d263-2514-4f35-95f7-df4dce43041f
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,424
supabase-export-v2
de9d1b10eb3e1521
with ``[]`` will be correctly matched. This is done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions in concert, and not by actually invoking a subshell. .. note:: The pathnames are returned in no particular order. If you need a specific order, sort the results.
trusted_official_docs
CPython Docs
with ``[]`` will be correctly matched. This is done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions in concert, and not by actually invoking a subshell. .. note:: The pathnames are returned in no particular order. If you need a specific order, sort the results.
with ``[]`` will be correctly matched. This is done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions in concert, and not by actually invoking a subshell. .. note:: The pathnames are returned in no particular order. If you need a specific order, sort the results.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c44095eb-dd78-4846-a374-c27934b0de33
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,438
supabase-export-v2
f7cb36da7a9aa1b1
.. note:: This function may return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true. .. note:: Any :exc:`OSError` exceptions raised from scanning the filesystem are suppressed. This includes :exc:`PermissionError` when accessing directories without read permission.
trusted_official_docs
CPython Docs
.. note:: This function may return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true. .. note:: Any :exc:`OSError` exceptions raised from scanning the filesystem are suppressed. This includes :exc:`PermissionError` when accessing directories without read permission.
.. note:: This function may return duplicate path names if *pathname* contains multiple "``**``" patterns and *recursive* is true. .. note:: Any :exc:`OSError` exceptions raised from scanning the filesystem are suppressed. This includes :exc:`PermissionError` when accessing directories without read permission.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c999412c-03b4-43a1-bcd7-47629a8085b0
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,464
supabase-export-v2
4b4602bb75d39ae7
Examples -------- Consider a directory containing the following files: :file:`1.gif`, :file:`2.txt`, :file:`card.gif` and a subdirectory :file:`sub` which contains only the file :file:`3.txt`. :func:`glob` will produce the following results. Notice how any leading components of the path are preserved. ::
trusted_official_docs
CPython Docs
Examples -------- Consider a directory containing the following files: :file:`1.gif`, :file:`2.txt`, :file:`card.gif` and a subdirectory :file:`sub` which contains only the file :file:`3.txt`. :func:`glob` will produce the following results. Notice how any leading components of the path are preserved. ::
Examples -------- Consider a directory containing the following files: :file:`1.gif`, :file:`2.txt`, :file:`card.gif` and a subdirectory :file:`sub` which contains only the file :file:`3.txt`. :func:`glob` will produce the following results. Notice how any leading components of the path are preserved. ::
python, official-docs, cpython, P0
Local_Trusted_Corpus
ca1617fd-58d4-489d-98fb-c4ab4b69f86e
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,459
supabase-export-v2
0709827f1329ab36
If *recursive* is true, the pattern segment "``**``" will match any number of path segments. If *include_hidden* is true, wildcards can match path segments that start with a dot (``.``).
trusted_official_docs
CPython Docs
If *recursive* is true, the pattern segment "``**``" will match any number of path segments. If *include_hidden* is true, wildcards can match path segments that start with a dot (``.``).
If *recursive* is true, the pattern segment "``**``" will match any number of path segments. If *include_hidden* is true, wildcards can match path segments that start with a dot (``.``).
python, official-docs, cpython, P0
Local_Trusted_Corpus
d1493824-0a42-457f-a75b-02a4b7fdd2eb
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,460
supabase-export-v2
2e49eef566db101c
If *include_hidden* is true, wildcards can match path segments that start with a dot (``.``). A sequence of path separators may be supplied to the *seps* argument. If not given, :data:`os.sep` and :data:`~os.altsep` (if available) are used.
trusted_official_docs
CPython Docs
If *include_hidden* is true, wildcards can match path segments that start with a dot (``.``). A sequence of path separators may be supplied to the *seps* argument. If not given, :data:`os.sep` and :data:`~os.altsep` (if available) are used.
If *include_hidden* is true, wildcards can match path segments that start with a dot (``.``). A sequence of path separators may be supplied to the *seps* argument. If not given, :data:`os.sep` and :data:`~os.altsep` (if available) are used.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d8dfdc5d-38cb-48b9-a44d-39276d9e277b
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,458
supabase-export-v2
0991f8d5d566f2f1
segments are meaningful to this function, unlike :func:`fnmatch.translate`. By default wildcards do not match path separators, and ``*`` pattern segments match precisely one path segment. If *recursive* is true, the pattern segment "``**``" will match any number of path segments.
trusted_official_docs
CPython Docs
segments are meaningful to this function, unlike :func:`fnmatch.translate`. By default wildcards do not match path separators, and ``*`` pattern segments match precisely one path segment. If *recursive* is true, the pattern segment "``**``" will match any number of path segments.
segments are meaningful to this function, unlike :func:`fnmatch.translate`. By default wildcards do not match path separators, and ``*`` pattern segments match precisely one path segment. If *recursive* is true, the pattern segment "``**``" will match any number of path segments.
python, official-docs, cpython, P0
Local_Trusted_Corpus
dbe2a18f-e21f-4362-b09c-fc2aa1a23898
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,451
supabase-export-v2
9e1ec9d2cc2e77cf
.. function:: escape(pathname) Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful if you want to match an arbitrary literal string that may have special characters in it. Special characters in drive/UNC sharepoints are not escaped, e.g. on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns...
trusted_official_docs
CPython Docs
.. function:: escape(pathname) Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful if you want to match an arbitrary literal string that may have special characters in it. Special characters in drive/UNC sharepoints are not escaped, e.g. on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns...
.. function:: escape(pathname) Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful if you want to match an arbitrary literal string that may have special characters in it. Special characters in drive/UNC sharepoints are not escaped, e.g. on Windows ``escape('//?/c:/Quo vadis?.txt')`` returns...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f9c44680-3245-445b-ae85-1e0111c9994c
CPython Docs
file://datasets/cpython/Doc/library/glob.rst
unknown
15ed4df3-7fb7-4cef-8c1e-1db0ac1d44a1
5,423
supabase-export-v2
2107e7a2284f4b2f
single: [] (square brackets); in glob-style wildcards single: ! (exclamation); in glob-style wildcards single: - (minus); in glob-style wildcards single: . (dot); in glob-style wildcards The :mod:`!glob` module finds pathnames using pattern matching rules similar to the Unix shell. No tilde expansion is done, but ``*``...
trusted_official_docs
CPython Docs
single: [] (square brackets); in glob-style wildcards single: ! (exclamation); in glob-style wildcards single: - (minus); in glob-style wildcards single: . (dot); in glob-style wildcards The :mod:`!glob` module finds pathnames using pattern matching rules similar to the Unix shell. No tilde expansion is done, but ``*``...
single: [] (square brackets); in glob-style wildcards single: ! (exclamation); in glob-style wildcards single: - (minus); in glob-style wildcards single: . (dot); in glob-style wildcards The :mod:`!glob` module finds pathnames using pattern matching rules similar to the Unix shell. No tilde expansion is done, but ``*``...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e7929a25-e4ee-4778-8af2-93999288a763
CPython Docs
file://datasets/cpython/Doc/library/python.rst
unknown
cea3f8a5-4c63-4325-84c5-841025cf3aa3
5,471
supabase-export-v2
9d019deb9ea4c06c
*********************** Python Runtime Services *********************** The modules described in this chapter provide a wide range of services related to the Python interpreter and its interaction with its environment. Here's an overview:
trusted_official_docs
CPython Docs
*********************** Python Runtime Services *********************** The modules described in this chapter provide a wide range of services related to the Python interpreter and its interaction with its environment. Here's an overview:
*********************** Python Runtime Services *********************** The modules described in this chapter provide a wide range of services related to the Python interpreter and its interaction with its environment. Here's an overview:
python, official-docs, cpython, P0
Local_Trusted_Corpus
771be65c-c234-4300-9a07-6b1d15a3c141
CPython Docs
file://datasets/cpython/Doc/library/aifc.rst
unknown
d320fe39-3a92-4fc8-a666-c6622521c181
5,480
supabase-export-v2
87b0a964df78145e
part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. The last version of Python that provided the :mod:`!aifc` module was `Python 3.12 <https://docs.python.org/3.12/library/aifc.html>`_.
trusted_official_docs
CPython Docs
part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. The last version of Python that provided the :mod:`!aifc` module was `Python 3.12 <https://docs.python.org/3.12/library/aifc.html>`_.
part of the Python standard library. It was :ref:`removed in Python 3.13 <whatsnew313-pep594>` after being deprecated in Python 3.11. The removal was decided in :pep:`594`. The last version of Python that provided the :mod:`!aifc` module was `Python 3.12 <https://docs.python.org/3.12/library/aifc.html>`_.
python, official-docs, cpython, P0
Local_Trusted_Corpus
04320e4a-76b0-42c5-837d-383f403d7721
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,489
supabase-export-v2
32191834e2949abc
*import package* may map to multiple *distribution packages* if it is a namespace package. You can use :ref:`packages_distributions() <package-distributions>` to get a mapping between them. By default, distribution metadata can live on the file system or in zip archives on :data:`sys.path`. Through an extension mechani...
trusted_official_docs
CPython Docs
*import package* may map to multiple *distribution packages* if it is a namespace package. You can use :ref:`packages_distributions() <package-distributions>` to get a mapping between them. By default, distribution metadata can live on the file system or in zip archives on :data:`sys.path`. Through an extension mechani...
*import package* may map to multiple *distribution packages* if it is a namespace package. You can use :ref:`packages_distributions() <package-distributions>` to get a mapping between them. By default, distribution metadata can live on the file system or in zip archives on :data:`sys.path`. Through an extension mechani...
python, official-docs, cpython, P0
Local_Trusted_Corpus
06e727ef-7cf8-416f-a00f-fea62aa1bc1b
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,586
supabase-export-v2
7c60d5bc17a47dbc
the top level module and import package names found via :data:`sys.meta_path` to the names of the distribution packages (if any) that provide the corresponding files. To allow for namespace packages (which may have members provided by multiple distribution packages), each top level import name maps to a list of distr...
trusted_official_docs
CPython Docs
the top level module and import package names found via :data:`sys.meta_path` to the names of the distribution packages (if any) that provide the corresponding files. To allow for namespace packages (which may have members provided by multiple distribution packages), each top level import name maps to a list of distr...
the top level module and import package names found via :data:`sys.meta_path` to the names of the distribution packages (if any) that provide the corresponding files. To allow for namespace packages (which may have members provided by multiple distribution packages), each top level import name maps to a list of distr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
094d5c4b-a6d4-45b1-9484-c4e6fa95c5c2
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,664
supabase-export-v2
d867ba6f0a6bbab5
sys.meta_path.append(DatabaseImporter(connect_db(...))) That importer now presumably provides importable modules from a database, but it provides no metadata or entry points. For this custom importer to provide metadata, it would also need to implement :class:`DistributionFinder`::
trusted_official_docs
CPython Docs
sys.meta_path.append(DatabaseImporter(connect_db(...))) That importer now presumably provides importable modules from a database, but it provides no metadata or entry points. For this custom importer to provide metadata, it would also need to implement :class:`DistributionFinder`::
sys.meta_path.append(DatabaseImporter(connect_db(...))) That importer now presumably provides importable modules from a database, but it provides no metadata or entry points. For this custom importer to provide metadata, it would also need to implement :class:`DistributionFinder`::
python, official-docs, cpython, P0
Local_Trusted_Corpus
0a458eed-2120-4523-a9f0-38b61513a1f2
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,561
supabase-export-v2
21db317c71dc4f8d
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. Returns :const:`None` if the distribution is found but the installation database records reporting the files associated with the distribution package are missing.
trusted_official_docs
CPython Docs
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. Returns :const:`None` if the distribution is found but the installation database records reporting the files associated with the distribution package are missing.
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. Returns :const:`None` if the distribution is found but the installation database records reporting the files associated with the distribution package are missing.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f87e265-78bb-48b6-b980-1ee566b4def0
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,570
supabase-export-v2
570a2b8defd1c951
>>> util.size # doctest: +SKIP 859 >>> util.dist # doctest: +SKIP <importlib.metadata._hooks.PathDistribution object at 0x101e0cef0> >>> util.hash # doctest: +SKIP <FileHash mode: sha256 value: bYkw5oMccfazVCoYQwKkkemoVyMAFoR34mmKBx8R1NI> Once you have the file, you can also read its contents::
trusted_official_docs
CPython Docs
>>> util.size # doctest: +SKIP 859 >>> util.dist # doctest: +SKIP <importlib.metadata._hooks.PathDistribution object at 0x101e0cef0> >>> util.hash # doctest: +SKIP <FileHash mode: sha256 value: bYkw5oMccfazVCoYQwKkkemoVyMAFoR34mmKBx8R1NI> Once you have the file, you can also read its contents::
>>> util.size # doctest: +SKIP 859 >>> util.dist # doctest: +SKIP <importlib.metadata._hooks.PathDistribution object at 0x101e0cef0> >>> util.hash # doctest: +SKIP <FileHash mode: sha256 value: bYkw5oMccfazVCoYQwKkkemoVyMAFoR34mmKBx8R1NI> Once you have the file, you can also read its contents::
python, official-docs, cpython, P0
Local_Trusted_Corpus
19c7e1c0-d930-4e1c-9188-c484a8784571
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,607
supabase-export-v2
81827e20090b1198
optional argument *context* is a :class:`DistributionFinder.Context` instance, used to modify the search for distributions. Alternatively, *kwargs* may contain keyword arguments for constructing a new :class:`!DistributionFinder.Context`. .. attribute:: metadata :type: PackageMetadata
trusted_official_docs
CPython Docs
optional argument *context* is a :class:`DistributionFinder.Context` instance, used to modify the search for distributions. Alternatively, *kwargs* may contain keyword arguments for constructing a new :class:`!DistributionFinder.Context`. .. attribute:: metadata :type: PackageMetadata
optional argument *context* is a :class:`DistributionFinder.Context` instance, used to modify the search for distributions. Alternatively, *kwargs* may contain keyword arguments for constructing a new :class:`!DistributionFinder.Context`. .. attribute:: metadata :type: PackageMetadata
python, official-docs, cpython, P0
Local_Trusted_Corpus
26e871aa-0164-4056-9749-b6f89a37b240
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,580
supabase-export-v2
675bfa7847dc1f49
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. To get the full set of requirements for a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_, use the :func:`!requires` function::
trusted_official_docs
CPython Docs
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. To get the full set of requirements for a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_, use the :func:`!requires` function::
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. To get the full set of requirements for a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_, use the :func:`!requires` function::
python, official-docs, cpython, P0
Local_Trusted_Corpus
27a25d7e-9dd7-489c-a8dc-88f74cba82d4
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,509
supabase-export-v2
60ed04be8c1624de
.. function:: entry_points(**select_params) Returns a :class:`EntryPoints` instance describing entry points for the current environment. Any given keyword parameters are passed to the :meth:`!select` method for comparison to the attributes of the individual entry point definitions.
trusted_official_docs
CPython Docs
.. function:: entry_points(**select_params) Returns a :class:`EntryPoints` instance describing entry points for the current environment. Any given keyword parameters are passed to the :meth:`!select` method for comparison to the attributes of the individual entry point definitions.
.. function:: entry_points(**select_params) Returns a :class:`EntryPoints` instance describing entry points for the current environment. Any given keyword parameters are passed to the :meth:`!select` method for comparison to the attributes of the individual entry point definitions.
python, official-docs, cpython, P0
Local_Trusted_Corpus
31287697-b09a-4d24-aa49-0e394d8d2cfd
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,657
supabase-export-v2
ef87133a3660e4f0
@abc.abstractmethod def find_distributions(context=DistributionFinder.Context()) -> Iterable[Distribution]: """Return an iterable of all Distribution instances capable of loading the metadata for packages for the indicated ``context``. """ The :class:`DistributionFinder.Context` object provides :attr:`~DistributionFind...
trusted_official_docs
CPython Docs
@abc.abstractmethod def find_distributions(context=DistributionFinder.Context()) -> Iterable[Distribution]: """Return an iterable of all Distribution instances capable of loading the metadata for packages for the indicated ``context``. """ The :class:`DistributionFinder.Context` object provides :attr:`~DistributionFind...
@abc.abstractmethod def find_distributions(context=DistributionFinder.Context()) -> Iterable[Distribution]: """Return an iterable of all Distribution instances capable of loading the metadata for packages for the indicated ``context``. """ The :class:`DistributionFinder.Context` object provides :attr:`~DistributionFind...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3355a0a6-8b74-40b2-a21c-4a03f33cdbbc
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,520
supabase-export-v2
816dd06d2b6490a4
The :func:`!entry_points` function returns a :class:`!EntryPoints` object, a collection of all :class:`!EntryPoint` objects with ``names`` and ``groups`` attributes for convenience:: >>> sorted(eps.groups) # doctest: +SKIP ['console_scripts', 'distutils.commands', 'distutils.setup_keywords', 'egg_info.writers', 'setup...
trusted_official_docs
CPython Docs
The :func:`!entry_points` function returns a :class:`!EntryPoints` object, a collection of all :class:`!EntryPoint` objects with ``names`` and ``groups`` attributes for convenience:: >>> sorted(eps.groups) # doctest: +SKIP ['console_scripts', 'distutils.commands', 'distutils.setup_keywords', 'egg_info.writers', 'setup...
The :func:`!entry_points` function returns a :class:`!EntryPoints` object, a collection of all :class:`!EntryPoint` objects with ``names`` and ``groups`` attributes for convenience:: >>> sorted(eps.groups) # doctest: +SKIP ['console_scripts', 'distutils.commands', 'distutils.setup_keywords', 'egg_info.writers', 'setup...
python, official-docs, cpython, P0
Local_Trusted_Corpus
37635ad9-6986-4790-9b7f-b8dc5c01051f
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,531
supabase-export-v2
729a5decf84bae21
doctest: +SKIP 'main' >>> wheel.extras # doctest: +SKIP [] >>> main = wheel.load() # doctest: +SKIP >>> main # doctest: +SKIP <function main at 0x103528488> The ``group`` and ``name`` are arbitrary values defined by the package author and usually a client will wish to resolve all entry points for a particular group. Re...
trusted_official_docs
CPython Docs
doctest: +SKIP 'main' >>> wheel.extras # doctest: +SKIP [] >>> main = wheel.load() # doctest: +SKIP >>> main # doctest: +SKIP <function main at 0x103528488> The ``group`` and ``name`` are arbitrary values defined by the package author and usually a client will wish to resolve all entry points for a particular group. Re...
doctest: +SKIP 'main' >>> wheel.extras # doctest: +SKIP [] >>> main = wheel.load() # doctest: +SKIP >>> main # doctest: +SKIP <function main at 0x103528488> The ``group`` and ``name`` are arbitrary values defined by the package author and usually a client will wish to resolve all entry points for a particular group. Re...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3c8306ca-d485-4797-b06c-05bae4397505
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,568
supabase-export-v2
15892e6b8ac25316
minimal subset of :class:`pathlib.Path` that allows to check if it ``exists()``, to traverse using ``joinpath()`` and ``parent``, and to retrieve data using ``read_text()`` and ``read_bytes()``. The :func:`!files` function takes a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution...
trusted_official_docs
CPython Docs
minimal subset of :class:`pathlib.Path` that allows to check if it ``exists()``, to traverse using ``joinpath()`` and ``parent``, and to retrieve data using ``read_text()`` and ``read_bytes()``. The :func:`!files` function takes a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution...
minimal subset of :class:`pathlib.Path` that allows to check if it ``exists()``, to traverse using ``joinpath()`` and ``parent``, and to retrieve data using ``read_text()`` and ``read_bytes()``. The :func:`!files` function takes a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution...
python, official-docs, cpython, P0
Local_Trusted_Corpus
48f3aaae-d33b-42d7-8471-a25ba4a731e8
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,542
supabase-export-v2
82e5ca2cb6a8822e
In addition to providing the defined protocol methods and attributes, subscripting the instance is equivalent to calling the :meth:`!get` method. Every `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ includes some metadata, which you can extract using the :func:`!met...
trusted_official_docs
CPython Docs
In addition to providing the defined protocol methods and attributes, subscripting the instance is equivalent to calling the :meth:`!get` method. Every `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ includes some metadata, which you can extract using the :func:`!met...
In addition to providing the defined protocol methods and attributes, subscripting the instance is equivalent to calling the :meth:`!get` method. Every `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ includes some metadata, which you can extract using the :func:`!met...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4ade3e49-0e2c-4486-9f14-67520f198c3f
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,516
supabase-export-v2
7322da66a2625e10
Details of an installed entry point. Each :class:`!EntryPoint` instance has ``.name``, ``.group``, and ``.value`` attributes and a ``.load()`` method to resolve the value. There are also ``.module``, ``.attr``, and ``.extras`` attributes for getting the components of the ``.value`` attribute, and ``.dist`` for obtai...
trusted_official_docs
CPython Docs
Details of an installed entry point. Each :class:`!EntryPoint` instance has ``.name``, ``.group``, and ``.value`` attributes and a ``.load()`` method to resolve the value. There are also ``.module``, ``.attr``, and ``.extras`` attributes for getting the components of the ``.value`` attribute, and ``.dist`` for obtai...
Details of an installed entry point. Each :class:`!EntryPoint` instance has ``.name``, ``.group``, and ``.value`` attributes and a ``.load()`` method to resolve the value. There are also ``.module``, ``.attr``, and ``.extras`` attributes for getting the components of the ``.value`` attribute, and ``.dist`` for obtai...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4cf1bb58-33ef-4fcf-93f8-c1f5058cd1a4
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,532
supabase-export-v2
5369a0d67f49c804
wish to resolve all entry points for a particular group. Read `the setuptools docs <https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_ for more information on entry points, their definition, and usage. .. versionchanged:: 3.12 The "selectable" entry points were introduced in ``importlib_metadata`` 3.6...
trusted_official_docs
CPython Docs
wish to resolve all entry points for a particular group. Read `the setuptools docs <https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_ for more information on entry points, their definition, and usage. .. versionchanged:: 3.12 The "selectable" entry points were introduced in ``importlib_metadata`` 3.6...
wish to resolve all entry points for a particular group. Read `the setuptools docs <https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_ for more information on entry points, their definition, and usage. .. versionchanged:: 3.12 The "selectable" entry points were introduced in ``importlib_metadata`` 3.6...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4db42fd2-8520-4ca8-8d9e-dbbcb226be0b
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,596
supabase-export-v2
bc2151756ace2d51
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. Thus, an alternative way to get e.g. the version number is through the :attr:`Distribution.version` attribute::
trusted_official_docs
CPython Docs
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. Thus, an alternative way to get e.g. the version number is through the :attr:`Distribution.version` attribute::
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. Thus, an alternative way to get e.g. the version number is through the :attr:`Distribution.version` attribute::
python, official-docs, cpython, P0
Local_Trusted_Corpus
5327f65d-4ae9-4e04-98eb-2452e3316825
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,649
supabase-export-v2
672c4ebd3f7cf08c
Returns an iterable of :class:`Distribution` instances for all packages. The *kwargs* argument may contain either a keyword argument ``context``, a :class:`DistributionFinder.Context` instance, or pass keyword arguments for constructing a new :class:`!DistributionFinder.Context`. The :class:`!DistributionFinder.Cont...
trusted_official_docs
CPython Docs
Returns an iterable of :class:`Distribution` instances for all packages. The *kwargs* argument may contain either a keyword argument ``context``, a :class:`DistributionFinder.Context` instance, or pass keyword arguments for constructing a new :class:`!DistributionFinder.Context`. The :class:`!DistributionFinder.Cont...
Returns an iterable of :class:`Distribution` instances for all packages. The *kwargs* argument may contain either a keyword argument ``context``, a :class:`DistributionFinder.Context` instance, or pass keyword arguments for constructing a new :class:`!DistributionFinder.Context`. The :class:`!DistributionFinder.Cont...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5381849c-c611-457d-8175-d5465b34aacd
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,674
supabase-export-v2
ce5fc97a9c1f477b
def locate_file(self, path): raise RuntimeError("This distribution has no file system") This basic implementation should provide metadata and entry points for packages served by the ``DatabaseImporter``, assuming that the ``record`` supplies suitable ``.name``, ``.version``, and ``.entry_points`` attributes.
trusted_official_docs
CPython Docs
def locate_file(self, path): raise RuntimeError("This distribution has no file system") This basic implementation should provide metadata and entry points for packages served by the ``DatabaseImporter``, assuming that the ``record`` supplies suitable ``.name``, ``.version``, and ``.entry_points`` attributes.
def locate_file(self, path): raise RuntimeError("This distribution has no file system") This basic implementation should provide metadata and entry points for packages served by the ``DatabaseImporter``, assuming that the ``record`` supplies suitable ``.name``, ``.version``, and ``.entry_points`` attributes.
python, official-docs, cpython, P0
Local_Trusted_Corpus
550ed961-eff9-4504-b62a-973866c2d0ab
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,545
supabase-export-v2
1e0b42067ea542ae
The keys of the returned data structure name the metadata keywords, and the values are returned unparsed from the distribution metadata:: >>> wheel_metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
trusted_official_docs
CPython Docs
The keys of the returned data structure name the metadata keywords, and the values are returned unparsed from the distribution metadata:: >>> wheel_metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
The keys of the returned data structure name the metadata keywords, and the values are returned unparsed from the distribution metadata:: >>> wheel_metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
python, official-docs, cpython, P0
Local_Trusted_Corpus
5606a128-dff7-41e5-8851-c2b934152675
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,591
supabase-export-v2
e20045f305c34c09
Distributions ============= While the module level API described above is the most common and convenient usage, all that information is accessible from the :class:`Distribution` class. :class:`!Distribution` is an abstract object that represents the metadata for a Python `Distribution Package <https://packaging.python....
trusted_official_docs
CPython Docs
Distributions ============= While the module level API described above is the most common and convenient usage, all that information is accessible from the :class:`Distribution` class. :class:`!Distribution` is an abstract object that represents the metadata for a Python `Distribution Package <https://packaging.python....
Distributions ============= While the module level API described above is the most common and convenient usage, all that information is accessible from the :class:`Distribution` class. :class:`!Distribution` is an abstract object that represents the metadata for a Python `Distribution Package <https://packaging.python....
python, official-docs, cpython, P0
Local_Trusted_Corpus
5b3160f7-7eb2-4c39-a0c5-1495aa01d6b6
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,502
supabase-export-v2
2b91adabb02dca63
'Author-email', 'Maintainer', 'Maintainer-email', 'License', 'Project-URL', 'Project-URL', 'Project-URL', 'Keywords', 'Platform', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Requires-Python', 'Pr...
trusted_official_docs
CPython Docs
'Author-email', 'Maintainer', 'Maintainer-email', 'License', 'Project-URL', 'Project-URL', 'Project-URL', 'Keywords', 'Platform', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Requires-Python', 'Pr...
'Author-email', 'Maintainer', 'Maintainer-email', 'License', 'Project-URL', 'Project-URL', 'Project-URL', 'Keywords', 'Platform', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Requires-Python', 'Pr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6043378f-3e3e-4f9d-b346-c4c88f3558b6
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,668
supabase-export-v2
1754e6825ea38595
def find_distributions(self, context=DistributionFinder.Context()): query = dict(name=context.name) if context.name else {} for dist_record in self.db.query_distributions(query): yield DatabaseDistribution(dist_record) In this way, ``query_distributions`` would return records for each distribution served by the databas...
trusted_official_docs
CPython Docs
def find_distributions(self, context=DistributionFinder.Context()): query = dict(name=context.name) if context.name else {} for dist_record in self.db.query_distributions(query): yield DatabaseDistribution(dist_record) In this way, ``query_distributions`` would return records for each distribution served by the databas...
def find_distributions(self, context=DistributionFinder.Context()): query = dict(name=context.name) if context.name else {} for dist_record in self.db.query_distributions(query): yield DatabaseDistribution(dist_record) In this way, ``query_distributions`` would return records for each distribution served by the databas...
python, official-docs, cpython, P0
Local_Trusted_Corpus
63a8c549-69f9-4a70-9e06-c1dff56d1c1f
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,638
supabase-export-v2
dbd26ec4bd44448f
a means to solicit additional details from the callers of distribution discovery functions like :func:`distributions` or :meth:`Distribution.discover` beyond :attr:`!.name` and :attr:`!.path` when searching for distributions. For example, a provider could expose suites of packages in either a "public" or "private" ``r...
trusted_official_docs
CPython Docs
a means to solicit additional details from the callers of distribution discovery functions like :func:`distributions` or :meth:`Distribution.discover` beyond :attr:`!.name` and :attr:`!.path` when searching for distributions. For example, a provider could expose suites of packages in either a "public" or "private" ``r...
a means to solicit additional details from the callers of distribution discovery functions like :func:`distributions` or :meth:`Distribution.discover` beyond :attr:`!.name` and :attr:`!.path` when searching for distributions. For example, a provider could expose suites of packages in either a "public" or "private" ``r...
python, official-docs, cpython, P0
Local_Trusted_Corpus
657a3f23-d3ae-4545-b96f-5421808c5f7e
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,555
supabase-export-v2
0f56700aee20261b
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. The :func:`!version` function is the quickest way to get a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_'s version number, as a string::
trusted_official_docs
CPython Docs
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. The :func:`!version` function is the quickest way to get a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_'s version number, as a string::
Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment. The :func:`!version` function is the quickest way to get a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_'s version number, as a string::
python, official-docs, cpython, P0
Local_Trusted_Corpus
65f11c9e-40ad-4492-af7a-13057677d9eb
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,673
supabase-export-v2
ee54e0a161affab8
the current distribution. """ if filename == "METADATA": return f"""Name: {self.record.name} Version: {self.record.version} """ if filename == "entry_points.txt": return "\n".join( f"""[{ep.group}]\n{ep.name}={ep.value}""" for ep in self.record.entry_points) def locate_file(self, path): raise RuntimeError("This distri...
trusted_official_docs
CPython Docs
the current distribution. """ if filename == "METADATA": return f"""Name: {self.record.name} Version: {self.record.version} """ if filename == "entry_points.txt": return "\n".join( f"""[{ep.group}]\n{ep.name}={ep.value}""" for ep in self.record.entry_points) def locate_file(self, path): raise RuntimeError("This distri...
the current distribution. """ if filename == "METADATA": return f"""Name: {self.record.name} Version: {self.record.version} """ if filename == "entry_points.txt": return "\n".join( f"""[{ep.group}]\n{ep.name}={ep.value}""" for ep in self.record.entry_points) def locate_file(self, path): raise RuntimeError("This distri...
python, official-docs, cpython, P0
Local_Trusted_Corpus
670ece02-73bc-4944-9e10-97ddb838c096
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,572
supabase-export-v2
4efcd0c480b6a1ea
>>> print(util.read_text()) # doctest: +SKIP import base64 import sys ... def as_bytes(s): if isinstance(s, text_type): return s.encode('utf-8') return s You can also use the :meth:`!locate` method to get the absolute path to the file::
trusted_official_docs
CPython Docs
>>> print(util.read_text()) # doctest: +SKIP import base64 import sys ... def as_bytes(s): if isinstance(s, text_type): return s.encode('utf-8') return s You can also use the :meth:`!locate` method to get the absolute path to the file::
>>> print(util.read_text()) # doctest: +SKIP import base64 import sys ... def as_bytes(s): if isinstance(s, text_type): return s.encode('utf-8') return s You can also use the :meth:`!locate` method to get the absolute path to the file::
python, official-docs, cpython, P0
Local_Trusted_Corpus
6937d32e-10a6-459b-b844-e4c4ef1d388c
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,571
supabase-export-v2
fea9607feead0b5a
Once you have the file, you can also read its contents:: >>> print(util.read_text()) # doctest: +SKIP import base64 import sys ... def as_bytes(s): if isinstance(s, text_type): return s.encode('utf-8') return s
trusted_official_docs
CPython Docs
Once you have the file, you can also read its contents:: >>> print(util.read_text()) # doctest: +SKIP import base64 import sys ... def as_bytes(s): if isinstance(s, text_type): return s.encode('utf-8') return s
Once you have the file, you can also read its contents:: >>> print(util.read_text()) # doctest: +SKIP import base64 import sys ... def as_bytes(s): if isinstance(s, text_type): return s.encode('utf-8') return s
python, official-docs, cpython, P0
Local_Trusted_Corpus
6ab41424-e241-4995-944c-5845ffb9c381
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,533
supabase-export-v2
a88ff5169acd3d58
a dictionary of entry points, keyed by group. With ``importlib_metadata`` 5.0 and Python 3.12, ``entry_points`` always returns an ``EntryPoints`` object. See :pypi:`backports.entry_points_selectable` for compatibility options. .. versionchanged:: 3.13 ``EntryPoint`` objects no longer present a tuple-like interface (:...
trusted_official_docs
CPython Docs
a dictionary of entry points, keyed by group. With ``importlib_metadata`` 5.0 and Python 3.12, ``entry_points`` always returns an ``EntryPoints`` object. See :pypi:`backports.entry_points_selectable` for compatibility options. .. versionchanged:: 3.13 ``EntryPoint`` objects no longer present a tuple-like interface (:...
a dictionary of entry points, keyed by group. With ``importlib_metadata`` 5.0 and Python 3.12, ``entry_points`` always returns an ``EntryPoints`` object. See :pypi:`backports.entry_points_selectable` for compatibility options. .. versionchanged:: 3.13 ``EntryPoint`` objects no longer present a tuple-like interface (:...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6d8dedfa-3fa5-4af0-9ab3-c415d23c92e7
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,567
supabase-export-v2
3a46550a4eba7f9b
.. class:: SimplePath A protocol representing a minimal subset of :class:`pathlib.Path` that allows to check if it ``exists()``, to traverse using ``joinpath()`` and ``parent``, and to retrieve data using ``read_text()`` and ``read_bytes()``.
trusted_official_docs
CPython Docs
.. class:: SimplePath A protocol representing a minimal subset of :class:`pathlib.Path` that allows to check if it ``exists()``, to traverse using ``joinpath()`` and ``parent``, and to retrieve data using ``read_text()`` and ``read_bytes()``.
.. class:: SimplePath A protocol representing a minimal subset of :class:`pathlib.Path` that allows to check if it ``exists()``, to traverse using ``joinpath()`` and ``parent``, and to retrieve data using ``read_text()`` and ``read_bytes()``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6f75ed13-1948-41a7-b915-72fcf3d4363e
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,560
supabase-export-v2
192b0562620742ff
Return the full set of files contained within the named distribution package as :class:`PackagePath` instances. Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment.
trusted_official_docs
CPython Docs
Return the full set of files contained within the named distribution package as :class:`PackagePath` instances. Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment.
Return the full set of files contained within the named distribution package as :class:`PackagePath` instances. Raises :exc:`PackageNotFoundError` if the named distribution package is not installed in the current Python environment.
python, official-docs, cpython, P0
Local_Trusted_Corpus
7cfe3757-2e2d-4595-8a72-1d6ff4a63b58
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,587
supabase-export-v2
8216889007c2a435
provided by multiple distribution packages), each top level import name maps to a list of distribution names rather than mapping directly to a single name. A convenience method to resolve the `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name (or names, in the case...
trusted_official_docs
CPython Docs
provided by multiple distribution packages), each top level import name maps to a list of distribution names rather than mapping directly to a single name. A convenience method to resolve the `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name (or names, in the case...
provided by multiple distribution packages), each top level import name maps to a list of distribution names rather than mapping directly to a single name. A convenience method to resolve the `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name (or names, in the case...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7d8ee363-a7fa-4d47-a56d-53bfd79b1868
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,606
supabase-export-v2
e30b17bc10e20628
Returns an iterable of :class:`!Distribution` instances for all packages (see distribution-discovery_). The optional argument *context* is a :class:`DistributionFinder.Context` instance, used to modify the search for distributions. Alternatively, *kwargs* may contain keyword arguments for constructing a new :class:`...
trusted_official_docs
CPython Docs
Returns an iterable of :class:`!Distribution` instances for all packages (see distribution-discovery_). The optional argument *context* is a :class:`DistributionFinder.Context` instance, used to modify the search for distributions. Alternatively, *kwargs* may contain keyword arguments for constructing a new :class:`...
Returns an iterable of :class:`!Distribution` instances for all packages (see distribution-discovery_). The optional argument *context* is a :class:`DistributionFinder.Context` instance, used to modify the search for distributions. Alternatively, *kwargs* may contain keyword arguments for constructing a new :class:`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
842d837a-9a26-4e7c-8bad-c6af46778a3b
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,610
supabase-export-v2
25501c52b1821bb8
>>> dist.metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' >>> dist.metadata['License'] # doctest: +SKIP 'MIT' The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#...
trusted_official_docs
CPython Docs
>>> dist.metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' >>> dist.metadata['License'] # doctest: +SKIP 'MIT' The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#...
>>> dist.metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' >>> dist.metadata['License'] # doctest: +SKIP 'MIT' The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#...
python, official-docs, cpython, P0
Local_Trusted_Corpus
88abc486-ec05-4281-ba30-301c29e40d88
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,569
supabase-export-v2
3eaaab614ec35b99
The :func:`!files` function takes a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name and returns all of the files installed by this distribution. For example:: >>> util = [p for p in files('wheel') if 'util.py' in str(p)][0] # doctest: +SKIP >>> util # doctest: ...
trusted_official_docs
CPython Docs
The :func:`!files` function takes a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name and returns all of the files installed by this distribution. For example:: >>> util = [p for p in files('wheel') if 'util.py' in str(p)][0] # doctest: +SKIP >>> util # doctest: ...
The :func:`!files` function takes a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name and returns all of the files installed by this distribution. For example:: >>> util = [p for p in files('wheel') if 'util.py' in str(p)][0] # doctest: +SKIP >>> util # doctest: ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
95a707c2-a493-4609-9212-764f7400665e
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,485
supabase-export-v2
72fb94b4bb989150
**Source code:** :source:`Lib/importlib/metadata/__init__.py` ``importlib.metadata`` is a library that provides access to the metadata of an installed `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_, such as its entry points or its top-level names (`Import Package <h...
trusted_official_docs
CPython Docs
**Source code:** :source:`Lib/importlib/metadata/__init__.py` ``importlib.metadata`` is a library that provides access to the metadata of an installed `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_, such as its entry points or its top-level names (`Import Package <h...
**Source code:** :source:`Lib/importlib/metadata/__init__.py` ``importlib.metadata`` is a library that provides access to the metadata of an installed `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_, such as its entry points or its top-level names (`Import Package <h...
python, official-docs, cpython, P0
Local_Trusted_Corpus
95b427a5-dccc-4ecf-a4d9-458e495eaba3
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,510
supabase-export-v2
d2e7f054134daf93
for the current environment. Any given keyword parameters are passed to the :meth:`!select` method for comparison to the attributes of the individual entry point definitions. Note: to query for entry points based on :attr:`!EntryPoint.dist` attribute, use :meth:`Distribution.entry_points` instead (as different :class:...
trusted_official_docs
CPython Docs
for the current environment. Any given keyword parameters are passed to the :meth:`!select` method for comparison to the attributes of the individual entry point definitions. Note: to query for entry points based on :attr:`!EntryPoint.dist` attribute, use :meth:`Distribution.entry_points` instead (as different :class:...
for the current environment. Any given keyword parameters are passed to the :meth:`!select` method for comparison to the attributes of the individual entry point definitions. Note: to query for entry points based on :attr:`!EntryPoint.dist` attribute, use :meth:`Distribution.entry_points` instead (as different :class:...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9a54d146-ecd4-4039-a9cc-fbd3dde316d3
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,493
supabase-export-v2
a77fa190792a5128
Overview ======== Let's say you wanted to get the version string for a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ you've installed using ``pip``. We start by creating a virtual environment and installing something into it:
trusted_official_docs
CPython Docs
Overview ======== Let's say you wanted to get the version string for a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ you've installed using ``pip``. We start by creating a virtual environment and installing something into it:
Overview ======== Let's say you wanted to get the version string for a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ you've installed using ``pip``. We start by creating a virtual environment and installing something into it:
python, official-docs, cpython, P0
Local_Trusted_Corpus
9bb6b629-a077-4643-8f02-f65ea61c8d38
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,549
supabase-export-v2
79670819e139f661
The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details. .. versionchanged:: 3.10 The ``Description`` is now included in the metadata when presented through the pay...
trusted_official_docs
CPython Docs
The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details. .. versionchanged:: 3.10 The ``Description`` is now included in the metadata when presented through the pay...
The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details. .. versionchanged:: 3.10 The ``Description`` is now included in the metadata when presented through the pay...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9f30571d-b27f-47c7-968c-534034d621ab
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,592
supabase-export-v2
5effb2492c889b8b
represents the metadata for a Python `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_. Get the concrete :class:`!Distribution` subclass instance for an installed distribution package by calling the :func:`distribution` function:: >>> from importlib.metadata import dis...
trusted_official_docs
CPython Docs
represents the metadata for a Python `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_. Get the concrete :class:`!Distribution` subclass instance for an installed distribution package by calling the :func:`distribution` function:: >>> from importlib.metadata import dis...
represents the metadata for a Python `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_. Get the concrete :class:`!Distribution` subclass instance for an installed distribution package by calling the :func:`distribution` function:: >>> from importlib.metadata import dis...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a22bc078-22ea-446e-a0f9-1ca28fd1ac62
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,672
supabase-export-v2
2e036777e1cb92e5
class DatabaseDistribution(importlib.metadata.Distribution): def __init__(self, record): self.record = record def read_text(self, filename): """ Read a file like "METADATA" for the current distribution. """ if filename == "METADATA": return f"""Name: {self.record.name} Version: {self.record.version} """ if filen...
trusted_official_docs
CPython Docs
class DatabaseDistribution(importlib.metadata.Distribution): def __init__(self, record): self.record = record def read_text(self, filename): """ Read a file like "METADATA" for the current distribution. """ if filename == "METADATA": return f"""Name: {self.record.name} Version: {self.record.version} """ if filen...
class DatabaseDistribution(importlib.metadata.Distribution): def __init__(self, record): self.record = record def read_text(self, filename): """ Read a file like "METADATA" for the current distribution. """ if filename == "METADATA": return f"""Name: {self.record.name} Version: {self.record.version} """ if filen...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a2438895-056c-4e13-a2f3-52f77fcbf846
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,609
supabase-export-v2
5e82a1f270dfbc70
There are all kinds of additional metadata available on :class:`!Distribution` instances as a :class:`PackageMetadata` instance:: >>> dist.metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' >>> dist.metadata['License'] # doctest: +SKIP 'MIT'
trusted_official_docs
CPython Docs
There are all kinds of additional metadata available on :class:`!Distribution` instances as a :class:`PackageMetadata` instance:: >>> dist.metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' >>> dist.metadata['License'] # doctest: +SKIP 'MIT'
There are all kinds of additional metadata available on :class:`!Distribution` instances as a :class:`PackageMetadata` instance:: >>> dist.metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' >>> dist.metadata['License'] # doctest: +SKIP 'MIT'
python, official-docs, cpython, P0
Local_Trusted_Corpus
aac4e157-53ad-4948-a62b-53eeaf1ddbfd
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,639
supabase-export-v2
7466a255a93e461a
query only for distributions in a particular realm and could call ``distributions(realm="private")`` to signal to the custom provider to only include distributions from that realm. Each :class:`!DistributionFinder` must expect any parameters and should attempt to honor the canonical parameters defined below when appr...
trusted_official_docs
CPython Docs
query only for distributions in a particular realm and could call ``distributions(realm="private")`` to signal to the custom provider to only include distributions from that realm. Each :class:`!DistributionFinder` must expect any parameters and should attempt to honor the canonical parameters defined below when appr...
query only for distributions in a particular realm and could call ``distributions(realm="private")`` to signal to the custom provider to only include distributions from that realm. Each :class:`!DistributionFinder` must expect any parameters and should attempt to honor the canonical parameters defined below when appr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
abd49122-9894-4e10-b832-d9d9cab87d5f
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,637
supabase-export-v2
fee2d484b85ab1f6
.. class:: Context(**kwargs) A :class:`!Context` gives a custom provider a means to solicit additional details from the callers of distribution discovery functions like :func:`distributions` or :meth:`Distribution.discover` beyond :attr:`!.name` and :attr:`!.path` when searching for distributions.
trusted_official_docs
CPython Docs
.. class:: Context(**kwargs) A :class:`!Context` gives a custom provider a means to solicit additional details from the callers of distribution discovery functions like :func:`distributions` or :meth:`Distribution.discover` beyond :attr:`!.name` and :attr:`!.path` when searching for distributions.
.. class:: Context(**kwargs) A :class:`!Context` gives a custom provider a means to solicit additional details from the callers of distribution discovery functions like :func:`distributions` or :meth:`Distribution.discover` beyond :attr:`!.name` and :attr:`!.path` when searching for distributions.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ac14da48-bd1a-4919-8d1a-c522f3c5b818
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,500
supabase-export-v2
36c5136696292db0
selectable by properties of the EntryPoint (typically 'group' or 'name'), such as ``console_scripts``, ``distutils.commands`` and others. Each group contains a collection of :ref:`EntryPoint <entry-points>` objects. You can get the :ref:`metadata for a distribution <metadata>`::
trusted_official_docs
CPython Docs
selectable by properties of the EntryPoint (typically 'group' or 'name'), such as ``console_scripts``, ``distutils.commands`` and others. Each group contains a collection of :ref:`EntryPoint <entry-points>` objects. You can get the :ref:`metadata for a distribution <metadata>`::
selectable by properties of the EntryPoint (typically 'group' or 'name'), such as ``console_scripts``, ``distutils.commands`` and others. Each group contains a collection of :ref:`EntryPoint <entry-points>` objects. You can get the :ref:`metadata for a distribution <metadata>`::
python, official-docs, cpython, P0
Local_Trusted_Corpus
ac3f454a-34e9-4712-b718-1d91f5e08d46
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,491
supabase-export-v2
5ac825f6afed09b3
.. seealso:: https://importlib-metadata.readthedocs.io/ The documentation for ``importlib_metadata``, which supplies a backport of ``importlib.metadata``. This includes an `API reference <https://importlib-metadata.readthedocs.io/en/latest/api.html>`__ for this module's classes and functions, as well as a `migrati...
trusted_official_docs
CPython Docs
.. seealso:: https://importlib-metadata.readthedocs.io/ The documentation for ``importlib_metadata``, which supplies a backport of ``importlib.metadata``. This includes an `API reference <https://importlib-metadata.readthedocs.io/en/latest/api.html>`__ for this module's classes and functions, as well as a `migrati...
.. seealso:: https://importlib-metadata.readthedocs.io/ The documentation for ``importlib_metadata``, which supplies a backport of ``importlib.metadata``. This includes an `API reference <https://importlib-metadata.readthedocs.io/en/latest/api.html>`__ for this module's classes and functions, as well as a `migrati...
python, official-docs, cpython, P0
Local_Trusted_Corpus
acee7a14-ea73-4c25-9357-5af08181d6f3
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,611
supabase-export-v2
b4a3ef171f523d3d
The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details. .. attribute:: name :type: str .. attribute:: requires :type: list[str] .. attribute:: version :type: st...
trusted_official_docs
CPython Docs
The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details. .. attribute:: name :type: str .. attribute:: requires :type: list[str] .. attribute:: version :type: st...
The full set of available metadata is not described here. See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details. .. attribute:: name :type: str .. attribute:: requires :type: list[str] .. attribute:: version :type: st...
python, official-docs, cpython, P0
Local_Trusted_Corpus