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
aeaa6bd4-e4e7-47c6-bcde-efd90703658b
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,656
supabase-export-v2
779cfbef982016a2
an optional ``find_distributions`` callable on the finders from :data:`sys.meta_path` and presents this extended interface as the :class:`DistributionFinder` abstract base class, which defines this abstract method:: @abc.abstractmethod def find_distributions(context=DistributionFinder.Context()) -> Iterable[Distributi...
trusted_official_docs
CPython Docs
an optional ``find_distributions`` callable on the finders from :data:`sys.meta_path` and presents this extended interface as the :class:`DistributionFinder` abstract base class, which defines this abstract method:: @abc.abstractmethod def find_distributions(context=DistributionFinder.Context()) -> Iterable[Distributi...
an optional ``find_distributions`` callable on the finders from :data:`sys.meta_path` and presents this extended interface as the :class:`DistributionFinder` abstract base class, which defines this abstract method:: @abc.abstractmethod def find_distributions(context=DistributionFinder.Context()) -> Iterable[Distributi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
aefd2b0d-911c-41bc-aeb2-83d3ca560af1
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,632
supabase-export-v2
caa341049942d718
<https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_\s. This metadata finder search defaults to ``sys.path``, but varies slightly in how it interprets those values from how other import machinery does. In particular: - ``importlib.metadata`` does not honor :class:`bytes` objects on ``sys.path`...
trusted_official_docs
CPython Docs
<https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_\s. This metadata finder search defaults to ``sys.path``, but varies slightly in how it interprets those values from how other import machinery does. In particular: - ``importlib.metadata`` does not honor :class:`bytes` objects on ``sys.path`...
<https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_\s. This metadata finder search defaults to ``sys.path``, but varies slightly in how it interprets those values from how other import machinery does. In particular: - ``importlib.metadata`` does not honor :class:`bytes` objects on ``sys.path`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
afda997f-be84-4c6a-9735-8be0a83db6ca
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,653
supabase-export-v2
74ccac72a538f56c
where users wish to expose metadata through some other mechanism, such as alongside a custom importer. Such a use case calls for a *custom provider*. Because `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ metadata is not available through :data:`sys.path` searches, ...
trusted_official_docs
CPython Docs
where users wish to expose metadata through some other mechanism, such as alongside a custom importer. Such a use case calls for a *custom provider*. Because `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ metadata is not available through :data:`sys.path` searches, ...
where users wish to expose metadata through some other mechanism, such as alongside a custom importer. Such a use case calls for a *custom provider*. Because `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ metadata is not available through :data:`sys.path` searches, ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b2bd8817-8903-477d-bef5-7af41501dfd3
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,602
supabase-export-v2
8854c7730b8444e4
Note: different :class:`!Distribution` instances do not currently compare equal, even if they relate to the same installed distribution and accordingly have the same attributes. .. staticmethod:: at(path) .. classmethod:: from_name(name)
trusted_official_docs
CPython Docs
Note: different :class:`!Distribution` instances do not currently compare equal, even if they relate to the same installed distribution and accordingly have the same attributes. .. staticmethod:: at(path) .. classmethod:: from_name(name)
Note: different :class:`!Distribution` instances do not currently compare equal, even if they relate to the same installed distribution and accordingly have the same attributes. .. staticmethod:: at(path) .. classmethod:: from_name(name)
python, official-docs, cpython, P0
Local_Trusted_Corpus
b9397eee-166d-4626-b9f2-b31ec68a0c82
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,655
supabase-export-v2
da4c0e01ff7a9bfd
The implementation has hooks integrated into the ``PathFinder``, serving metadata for distribution packages found on the file system. The abstract class :py:class:`importlib.abc.MetaPathFinder` defines the interface expected of finders by Python's import system. ``importlib.metadata`` extends this protocol by looking f...
trusted_official_docs
CPython Docs
The implementation has hooks integrated into the ``PathFinder``, serving metadata for distribution packages found on the file system. The abstract class :py:class:`importlib.abc.MetaPathFinder` defines the interface expected of finders by Python's import system. ``importlib.metadata`` extends this protocol by looking f...
The implementation has hooks integrated into the ``PathFinder``, serving metadata for distribution packages found on the file system. The abstract class :py:class:`importlib.abc.MetaPathFinder` defines the interface expected of finders by Python's import system. ``importlib.metadata`` extends this protocol by looking f...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ba163714-fd04-4f4a-bc43-697187768b4f
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,513
supabase-export-v2
0a7fc361b59e5c7a
Details of a collection of installed entry points. Also provides a ``.groups`` attribute that reports all identified entry point groups, and a ``.names`` attribute that reports all identified entry point names.
trusted_official_docs
CPython Docs
Details of a collection of installed entry points. Also provides a ``.groups`` attribute that reports all identified entry point groups, and a ``.names`` attribute that reports all identified entry point names.
Details of a collection of installed entry points. Also provides a ``.groups`` attribute that reports all identified entry point groups, and a ``.names`` attribute that reports all identified entry point names.
python, official-docs, cpython, P0
Local_Trusted_Corpus
be6ace67-b9ae-4d45-a8ac-695c3ba1abd0
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,654
supabase-export-v2
0eff5e1b41ce43d4
found through import system :ref:`finders <finders-and-loaders>`. To find a distribution package's metadata, ``importlib.metadata`` queries the list of :term:`meta path finders <meta path finder>` on :data:`sys.meta_path`. The implementation has hooks integrated into the ``PathFinder``, serving metadata for distributio...
trusted_official_docs
CPython Docs
found through import system :ref:`finders <finders-and-loaders>`. To find a distribution package's metadata, ``importlib.metadata`` queries the list of :term:`meta path finders <meta path finder>` on :data:`sys.meta_path`. The implementation has hooks integrated into the ``PathFinder``, serving metadata for distributio...
found through import system :ref:`finders <finders-and-loaders>`. To find a distribution package's metadata, ``importlib.metadata`` queries the list of :term:`meta path finders <meta path finder>` on :data:`sys.meta_path`. The implementation has hooks integrated into the ``PathFinder``, serving metadata for distributio...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c160d047-78ea-4992-b096-d67bb996f865
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,675
supabase-export-v2
2299086565c6c991
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. The ``DatabaseDistribution`` may also provide other metadata files, like ``RECORD`` (required for :attr...
trusted_official_docs
CPython Docs
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. The ``DatabaseDistribution`` may also provide other metadata files, like ``RECORD`` (required for :attr...
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. The ``DatabaseDistribution`` may also provide other metadata files, like ``RECORD`` (required for :attr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c2ca7418-b36a-4367-afed-dfe61f5921f4
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,581
supabase-export-v2
dc9db9550f29d552
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:: >>> requires('wheel') # doctest: +SKIP ["pytest (>=3.0.0) ; extra == 'test'", "pytest-cov ; extra == 'test'"]
trusted_official_docs
CPython Docs
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:: >>> requires('wheel') # doctest: +SKIP ["pytest (>=3.0.0) ; extra == 'test'", "pytest-cov ; extra == 'test'"]
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:: >>> requires('wheel') # doctest: +SKIP ["pytest (>=3.0.0) ; extra == 'test'", "pytest-cov ; extra == 'test'"]
python, official-docs, cpython, P0
Local_Trusted_Corpus
c3a91cb1-31c8-4617-9d84-15b1f1fcc508
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,652
supabase-export-v2
da5213df01d7359a
Implementing Custom Providers ============================= ``importlib.metadata`` address two API surfaces, one for *consumers* and another for *providers*. Most users are consumers, consuming metadata provided by the packages. There are other use-cases, however, where users wish to expose metadata through some other ...
trusted_official_docs
CPython Docs
Implementing Custom Providers ============================= ``importlib.metadata`` address two API surfaces, one for *consumers* and another for *providers*. Most users are consumers, consuming metadata provided by the packages. There are other use-cases, however, where users wish to expose metadata through some other ...
Implementing Custom Providers ============================= ``importlib.metadata`` address two API surfaces, one for *consumers* and another for *providers*. Most users are consumers, consuming metadata provided by the packages. There are other use-cases, however, where users wish to expose metadata through some other ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
cebfe0a5-d03f-45b5-8a86-77be253eebd8
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,670
supabase-export-v2
010f9741dc096612
``DatabaseImporter`` whose behavior varied depending on ``sys.path``/``PYTHONPATH``. In that case, the ``find_distributions`` should honor the ``context.path`` and only yield ``Distribution``\ s pertinent to that path. ``DatabaseDistribution``, then, would look something like::
trusted_official_docs
CPython Docs
``DatabaseImporter`` whose behavior varied depending on ``sys.path``/``PYTHONPATH``. In that case, the ``find_distributions`` should honor the ``context.path`` and only yield ``Distribution``\ s pertinent to that path. ``DatabaseDistribution``, then, would look something like::
``DatabaseImporter`` whose behavior varied depending on ``sys.path``/``PYTHONPATH``. In that case, the ``find_distributions`` should honor the ``context.path`` and only yield ``Distribution``\ s pertinent to that path. ``DatabaseDistribution``, then, would look something like::
python, official-docs, cpython, P0
Local_Trusted_Corpus
dab44a74-cc72-41b1-af60-0a0162271380
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,669
supabase-export-v2
0c9712fdef5d7d5c
distribution served by the database matching the query. For example, if ``requests-1.0`` is in the database, ``find_distributions`` would yield a ``DatabaseDistribution`` for ``Context(name='requests')`` or ``Context(name=None)``. For the sake of simplicity, this example ignores ``context.path``\. The ``path`` attribut...
trusted_official_docs
CPython Docs
distribution served by the database matching the query. For example, if ``requests-1.0`` is in the database, ``find_distributions`` would yield a ``DatabaseDistribution`` for ``Context(name='requests')`` or ``Context(name=None)``. For the sake of simplicity, this example ignores ``context.path``\. The ``path`` attribut...
distribution served by the database matching the query. For example, if ``requests-1.0`` is in the database, ``find_distributions`` would yield a ``DatabaseDistribution`` for ``Context(name='requests')`` or ``Context(name=None)``. For the sake of simplicity, this example ignores ``context.path``\. The ``path`` attribut...
python, official-docs, cpython, P0
Local_Trusted_Corpus
db19d913-a922-439c-8a3b-da7b44f777d6
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,499
supabase-export-v2
798983918fc54568
(example) $ python >>> from importlib.metadata import version # doctest: +SKIP >>> version('wheel') # doctest: +SKIP '0.32.3' You can also get a collection of entry points selectable by properties of the EntryPoint (typically 'group' or 'name'), such as ``console_scripts``, ``distutils.commands`` and others. Each group...
trusted_official_docs
CPython Docs
(example) $ python >>> from importlib.metadata import version # doctest: +SKIP >>> version('wheel') # doctest: +SKIP '0.32.3' You can also get a collection of entry points selectable by properties of the EntryPoint (typically 'group' or 'name'), such as ``console_scripts``, ``distutils.commands`` and others. Each group...
(example) $ python >>> from importlib.metadata import version # doctest: +SKIP >>> version('wheel') # doctest: +SKIP '0.32.3' You can also get a collection of entry points selectable by properties of the EntryPoint (typically 'group' or 'name'), such as ``console_scripts``, ``distutils.commands`` and others. Each group...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dba76672-b0e9-48af-a759-b80292cb30e5
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,585
supabase-export-v2
928ffb5a00e2f89d
.. function:: packages_distributions() Return a mapping from 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.
trusted_official_docs
CPython Docs
.. function:: packages_distributions() Return a mapping from 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.
.. function:: packages_distributions() Return a mapping from 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.
python, official-docs, cpython, P0
Local_Trusted_Corpus
dd1afe39-57b4-464a-accc-9e182058497e
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,588
supabase-export-v2
6ac69e7976f035e9
the `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name (or names, in the case of a namespace package) that provide each importable top-level Python module or `Import Package <https://packaging.python.org/en/latest/glossary/#term-Import-Package>`_:: >>> packages_dis...
trusted_official_docs
CPython Docs
the `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name (or names, in the case of a namespace package) that provide each importable top-level Python module or `Import Package <https://packaging.python.org/en/latest/glossary/#term-Import-Package>`_:: >>> packages_dis...
the `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name (or names, in the case of a namespace package) that provide each importable top-level Python module or `Import Package <https://packaging.python.org/en/latest/glossary/#term-Import-Package>`_:: >>> packages_dis...
python, official-docs, cpython, P0
Local_Trusted_Corpus
def08ce1-b797-49f4-9877-d2c4f4bb88b4
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,486
supabase-export-v2
e648c1b41288df45
system, this library provides the entry point and metadata APIs that were previously exposed by the now-removed ``pkg_resources`` package. Along with :mod:`importlib.resources`, it supersedes ``pkg_resources``. ``importlib.metadata`` operates on third-party *distribution packages* installed into Python's ``site-package...
trusted_official_docs
CPython Docs
system, this library provides the entry point and metadata APIs that were previously exposed by the now-removed ``pkg_resources`` package. Along with :mod:`importlib.resources`, it supersedes ``pkg_resources``. ``importlib.metadata`` operates on third-party *distribution packages* installed into Python's ``site-package...
system, this library provides the entry point and metadata APIs that were previously exposed by the now-removed ``pkg_resources`` package. Along with :mod:`importlib.resources`, it supersedes ``pkg_resources``. ``importlib.metadata`` operates on third-party *distribution packages* installed into Python's ``site-package...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e20ed180-fd7f-438f-a92d-283fe4eb5c3a
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,658
supabase-export-v2
aa80bd268fc72ce5
object provides :attr:`~DistributionFinder.Context.path` and :attr:`~DistributionFinder.Context.name` properties indicating the path to search and name to match and may supply other relevant context sought by the consumer. In practice, to support finding distribution package metadata in locations other than the file sy...
trusted_official_docs
CPython Docs
object provides :attr:`~DistributionFinder.Context.path` and :attr:`~DistributionFinder.Context.name` properties indicating the path to search and name to match and may supply other relevant context sought by the consumer. In practice, to support finding distribution package metadata in locations other than the file sy...
object provides :attr:`~DistributionFinder.Context.path` and :attr:`~DistributionFinder.Context.name` properties indicating the path to search and name to match and may supply other relevant context sought by the consumer. In practice, to support finding distribution package metadata in locations other than the file sy...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e55dc13e-79e4-4f74-b540-49bf36f4ddab
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,530
supabase-export-v2
2df4dbf9858398a5
Inspect the resolved entry point:: >>> wheel # doctest: +SKIP EntryPoint(name='wheel', value='wheel.cli:main', group='console_scripts') >>> wheel.module # doctest: +SKIP 'wheel.cli' >>> wheel.attr # doctest: +SKIP 'main' >>> wheel.extras # doctest: +SKIP [] >>> main = wheel.load() # doctest: +SKIP >>> main # d...
trusted_official_docs
CPython Docs
Inspect the resolved entry point:: >>> wheel # doctest: +SKIP EntryPoint(name='wheel', value='wheel.cli:main', group='console_scripts') >>> wheel.module # doctest: +SKIP 'wheel.cli' >>> wheel.attr # doctest: +SKIP 'main' >>> wheel.extras # doctest: +SKIP [] >>> main = wheel.load() # doctest: +SKIP >>> main # d...
Inspect the resolved entry point:: >>> wheel # doctest: +SKIP EntryPoint(name='wheel', value='wheel.cli:main', group='console_scripts') >>> wheel.module # doctest: +SKIP 'wheel.cli' >>> wheel.attr # doctest: +SKIP 'main' >>> wheel.extras # doctest: +SKIP [] >>> main = wheel.load() # doctest: +SKIP >>> main # d...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ea0e3733-5138-40e7-a03c-5cde178a7761
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,574
supabase-export-v2
d823aea83634ef6d
>>> util.locate() # doctest: +SKIP PosixPath('/home/gustav/example/lib/site-packages/wheel/util.py') In the case where the metadata file listing files (``RECORD`` or ``SOURCES.txt``) is missing, :func:`!files` will return :const:`None`. The caller may wish to wrap calls to :func:`!files` in `always_iterable <https://mo...
trusted_official_docs
CPython Docs
>>> util.locate() # doctest: +SKIP PosixPath('/home/gustav/example/lib/site-packages/wheel/util.py') In the case where the metadata file listing files (``RECORD`` or ``SOURCES.txt``) is missing, :func:`!files` will return :const:`None`. The caller may wish to wrap calls to :func:`!files` in `always_iterable <https://mo...
>>> util.locate() # doctest: +SKIP PosixPath('/home/gustav/example/lib/site-packages/wheel/util.py') In the case where the metadata file listing files (``RECORD`` or ``SOURCES.txt``) is missing, :func:`!files` will return :const:`None`. The caller may wish to wrap calls to :func:`!files` in `always_iterable <https://mo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ebf9436c-f8b4-4f49-8ae7-1efa48be9efa
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,601
supabase-export-v2
7058f732c37a488f
Details of an installed distribution package. Note: different :class:`!Distribution` instances do not currently compare equal, even if they relate to the same installed distribution and accordingly have the same attributes.
trusted_official_docs
CPython Docs
Details of an installed distribution package. Note: different :class:`!Distribution` instances do not currently compare equal, even if they relate to the same installed distribution and accordingly have the same attributes.
Details of an installed distribution package. Note: different :class:`!Distribution` instances do not currently compare equal, even if they relate to the same installed distribution and accordingly have the same attributes.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f06c6503-52a5-4f60-888b-a3bebd919963
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,501
supabase-export-v2
7550524b10c55a15
You can get the :ref:`metadata for a distribution <metadata>`:: >>> list(metadata('wheel')) # doctest: +SKIP ['Metadata-Version', 'Name', 'Version', 'Summary', 'Home-page', 'Author', 'Author-email', 'Maintainer', 'Maintainer-email', 'License', 'Project-URL', 'Project-URL', 'Project-URL', 'Keywords', 'Platform', 'Class...
trusted_official_docs
CPython Docs
You can get the :ref:`metadata for a distribution <metadata>`:: >>> list(metadata('wheel')) # doctest: +SKIP ['Metadata-Version', 'Name', 'Version', 'Summary', 'Home-page', 'Author', 'Author-email', 'Maintainer', 'Maintainer-email', 'License', 'Project-URL', 'Project-URL', 'Project-URL', 'Keywords', 'Platform', 'Class...
You can get the :ref:`metadata for a distribution <metadata>`:: >>> list(metadata('wheel')) # doctest: +SKIP ['Metadata-Version', 'Name', 'Version', 'Summary', 'Home-page', 'Author', 'Author-email', 'Maintainer', 'Maintainer-email', 'License', 'Project-URL', 'Project-URL', 'Project-URL', 'Keywords', 'Platform', 'Class...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f9a8e3af-095b-4866-836b-926bd360c418
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,631
supabase-export-v2
c8eaac61fd822a5b
Distribution Discovery ====================== By default, this package provides built-in support for discovery of metadata for file system and zip file `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_\s. This metadata finder search defaults to ``sys.path``, but varies...
trusted_official_docs
CPython Docs
Distribution Discovery ====================== By default, this package provides built-in support for discovery of metadata for file system and zip file `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_\s. This metadata finder search defaults to ``sys.path``, but varies...
Distribution Discovery ====================== By default, this package provides built-in support for discovery of metadata for file system and zip file `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_\s. This metadata finder search defaults to ``sys.path``, but varies...
python, official-docs, cpython, P0
Local_Trusted_Corpus
fbf7eb12-59eb-496c-a619-3e3fb569b243
CPython Docs
file://datasets/cpython/Doc/library/importlib.metadata.rst
unknown
977b7e8d-f956-4d5d-97a5-2b5a76adb5d8
5,488
supabase-export-v2
ced46b669b81cb78
.. important:: These are *not* necessarily equivalent to or correspond 1:1 with the top-level *import package* names that can be imported inside Python code. One *distribution package* can contain multiple *import packages* (and single modules), and one top-level *import package* may map to multiple *distribution ...
trusted_official_docs
CPython Docs
.. important:: These are *not* necessarily equivalent to or correspond 1:1 with the top-level *import package* names that can be imported inside Python code. One *distribution package* can contain multiple *import packages* (and single modules), and one top-level *import package* may map to multiple *distribution ...
.. important:: These are *not* necessarily equivalent to or correspond 1:1 with the top-level *import package* names that can be imported inside Python code. One *distribution package* can contain multiple *import packages* (and single modules), and one top-level *import package* may map to multiple *distribution ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ab8baa48-4c57-412f-b095-bd6d1a31c766
CPython Docs
file://datasets/cpython/Doc/library/language.rst
unknown
f008ace0-847d-495c-8dc0-00e567972baf
5,677
supabase-export-v2
4325722e5290a95f
************************ Python Language Services ************************ Python provides a number of modules to assist in working with the Python language. These modules support tokenizing, parsing, syntax analysis, bytecode disassembly, and various other facilities.
trusted_official_docs
CPython Docs
************************ Python Language Services ************************ Python provides a number of modules to assist in working with the Python language. These modules support tokenizing, parsing, syntax analysis, bytecode disassembly, and various other facilities.
************************ Python Language Services ************************ Python provides a number of modules to assist in working with the Python language. These modules support tokenizing, parsing, syntax analysis, bytecode disassembly, and various other facilities.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1e44b82c-ca6d-4de0-9308-cac45998f988
CPython Docs
file://datasets/cpython/Doc/library/email.encoders.rst
unknown
1e2cd747-6969-4fa3-ae01-26f1fa41c086
5,692
supabase-export-v2
7010a5962ac41019
.. function:: encode_quopri(msg) Encodes the payload into quoted-printable form and sets the :mailheader:`Content-Transfer-Encoding` header to ``quoted-printable`` [#]_. This is a good encoding to use when most of your payload is normal printable data, but contains a few unprintable characters.
trusted_official_docs
CPython Docs
.. function:: encode_quopri(msg) Encodes the payload into quoted-printable form and sets the :mailheader:`Content-Transfer-Encoding` header to ``quoted-printable`` [#]_. This is a good encoding to use when most of your payload is normal printable data, but contains a few unprintable characters.
.. function:: encode_quopri(msg) Encodes the payload into quoted-printable form and sets the :mailheader:`Content-Transfer-Encoding` header to ``quoted-printable`` [#]_. This is a good encoding to use when most of your payload is normal printable data, but contains a few unprintable characters.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1eb5471a-9fe3-43d1-af24-77762b5a9ab6
CPython Docs
file://datasets/cpython/Doc/library/email.encoders.rst
unknown
1e2cd747-6969-4fa3-ae01-26f1fa41c086
5,689
supabase-export-v2
8a245391a40a07a3
They usually extract the payload, encode it, and reset the payload to this newly encoded value. They should also set the :mailheader:`Content-Transfer-Encoding` header as appropriate. Note that these functions are not meaningful for a multipart message. They must be applied to individual subparts instead, and will rais...
trusted_official_docs
CPython Docs
They usually extract the payload, encode it, and reset the payload to this newly encoded value. They should also set the :mailheader:`Content-Transfer-Encoding` header as appropriate. Note that these functions are not meaningful for a multipart message. They must be applied to individual subparts instead, and will rais...
They usually extract the payload, encode it, and reset the payload to this newly encoded value. They should also set the :mailheader:`Content-Transfer-Encoding` header as appropriate. Note that these functions are not meaningful for a multipart message. They must be applied to individual subparts instead, and will rais...
python, official-docs, cpython, P0
Local_Trusted_Corpus
28eb88aa-63fe-4d17-b40f-34f5b15863c5
CPython Docs
file://datasets/cpython/Doc/library/email.encoders.rst
unknown
1e2cd747-6969-4fa3-ae01-26f1fa41c086
5,687
supabase-export-v2
6f7a67e46c142a6d
The remaining text in this section is the original documentation of the module. When creating :class:`~email.message.Message` objects from scratch, you often need to encode the payloads for transport through compliant mail servers. This is especially true for :mimetype:`image/\*` and :mimetype:`text/\*` type messages c...
trusted_official_docs
CPython Docs
The remaining text in this section is the original documentation of the module. When creating :class:`~email.message.Message` objects from scratch, you often need to encode the payloads for transport through compliant mail servers. This is especially true for :mimetype:`image/\*` and :mimetype:`text/\*` type messages c...
The remaining text in this section is the original documentation of the module. When creating :class:`~email.message.Message` objects from scratch, you often need to encode the payloads for transport through compliant mail servers. This is especially true for :mimetype:`image/\*` and :mimetype:`text/\*` type messages c...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2cfffd65-64f5-40d5-b32f-a1ce30e1e32b
CPython Docs
file://datasets/cpython/Doc/library/email.encoders.rst
unknown
1e2cd747-6969-4fa3-ae01-26f1fa41c086
5,690
supabase-export-v2
15e04106e8f04b3c
for a multipart message. They must be applied to individual subparts instead, and will raise a :exc:`TypeError` if passed a message whose type is multipart. Here are the encoding functions provided:
trusted_official_docs
CPython Docs
for a multipart message. They must be applied to individual subparts instead, and will raise a :exc:`TypeError` if passed a message whose type is multipart. Here are the encoding functions provided:
for a multipart message. They must be applied to individual subparts instead, and will raise a :exc:`TypeError` if passed a message whose type is multipart. Here are the encoding functions provided:
python, official-docs, cpython, P0
Local_Trusted_Corpus
67c6fc9b-5ca4-4c39-9ca3-d2352ebc7d55
CPython Docs
file://datasets/cpython/Doc/library/email.encoders.rst
unknown
1e2cd747-6969-4fa3-ae01-26f1fa41c086
5,686
supabase-export-v2
0d56d68f73ce8d6d
explicitly since the :class:`~email.mime.text.MIMEText` class sets the content type and CTE header using the *_subtype* and *_charset* values passed during the instantiation of that class. The remaining text in this section is the original documentation of the module.
trusted_official_docs
CPython Docs
explicitly since the :class:`~email.mime.text.MIMEText` class sets the content type and CTE header using the *_subtype* and *_charset* values passed during the instantiation of that class. The remaining text in this section is the original documentation of the module.
explicitly since the :class:`~email.mime.text.MIMEText` class sets the content type and CTE header using the *_subtype* and *_charset* values passed during the instantiation of that class. The remaining text in this section is the original documentation of the module.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a0b380f8-f881-4b7a-9292-b06a7f7cbd97
CPython Docs
file://datasets/cpython/Doc/library/email.encoders.rst
unknown
1e2cd747-6969-4fa3-ae01-26f1fa41c086
5,685
supabase-export-v2
0cfbfaa206fd7068
module is part of the legacy (``Compat32``) email API. In the new API the functionality is provided by the *cte* parameter of the :meth:`~email.message.EmailMessage.set_content` method. This module is deprecated in Python 3. The functions provided here should not be called explicitly since the :class:`~email.mime.text....
trusted_official_docs
CPython Docs
module is part of the legacy (``Compat32``) email API. In the new API the functionality is provided by the *cte* parameter of the :meth:`~email.message.EmailMessage.set_content` method. This module is deprecated in Python 3. The functions provided here should not be called explicitly since the :class:`~email.mime.text....
module is part of the legacy (``Compat32``) email API. In the new API the functionality is provided by the *cte* parameter of the :meth:`~email.message.EmailMessage.set_content` method. This module is deprecated in Python 3. The functions provided here should not be called explicitly since the :class:`~email.mime.text....
python, official-docs, cpython, P0
Local_Trusted_Corpus
c07baab4-a834-4822-8a1a-972f889f525e
CPython Docs
file://datasets/cpython/Doc/library/email.encoders.rst
unknown
1e2cd747-6969-4fa3-ae01-26f1fa41c086
5,688
supabase-export-v2
7f4b5b888bd411e0
often need to encode the payloads for transport through compliant mail servers. This is especially true for :mimetype:`image/\*` and :mimetype:`text/\*` type messages containing binary data. The :mod:`email` package provides some convenient encoders in its :mod:`!encoders` module. These encoders are actually used by th...
trusted_official_docs
CPython Docs
often need to encode the payloads for transport through compliant mail servers. This is especially true for :mimetype:`image/\*` and :mimetype:`text/\*` type messages containing binary data. The :mod:`email` package provides some convenient encoders in its :mod:`!encoders` module. These encoders are actually used by th...
often need to encode the payloads for transport through compliant mail servers. This is especially true for :mimetype:`image/\*` and :mimetype:`text/\*` type messages containing binary data. The :mod:`email` package provides some convenient encoders in its :mod:`!encoders` module. These encoders are actually used by th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e9d89bd4-5bfd-4985-8843-f0132c2fc1cc
CPython Docs
file://datasets/cpython/Doc/library/email.encoders.rst
unknown
1e2cd747-6969-4fa3-ae01-26f1fa41c086
5,694
supabase-export-v2
4f680d0221ef3bb4
.. function:: encode_base64(msg) Encodes the payload into base64 form and sets the :mailheader:`Content-Transfer-Encoding` header to ``base64``. This is a good encoding to use when most of your payload is unprintable data since it is a more compact form than quoted-printable. The drawback of base64 encoding is that ...
trusted_official_docs
CPython Docs
.. function:: encode_base64(msg) Encodes the payload into base64 form and sets the :mailheader:`Content-Transfer-Encoding` header to ``base64``. This is a good encoding to use when most of your payload is unprintable data since it is a more compact form than quoted-printable. The drawback of base64 encoding is that ...
.. function:: encode_base64(msg) Encodes the payload into base64 form and sets the :mailheader:`Content-Transfer-Encoding` header to ``base64``. This is a good encoding to use when most of your payload is unprintable data since it is a more compact form than quoted-printable. The drawback of base64 encoding is that ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0283f862-b610-421f-8aac-8ba563535466
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,861
supabase-export-v2
81be86cb0c754202
.. attribute:: BaseHandler.server_software If the :attr:`origin_server` attribute is set, this attribute's value is used to set the default ``SERVER_SOFTWARE`` WSGI environment variable, and also to set a default ``Server:`` header in HTTP responses. It is ignored for handlers (such as :class:`BaseCGIHandler` and :c...
trusted_official_docs
CPython Docs
.. attribute:: BaseHandler.server_software If the :attr:`origin_server` attribute is set, this attribute's value is used to set the default ``SERVER_SOFTWARE`` WSGI environment variable, and also to set a default ``Server:`` header in HTTP responses. It is ignored for handlers (such as :class:`BaseCGIHandler` and :c...
.. attribute:: BaseHandler.server_software If the :attr:`origin_server` attribute is set, this attribute's value is used to set the default ``SERVER_SOFTWARE`` WSGI environment variable, and also to set a default ``Server:`` header in HTTP responses. It is ignored for handlers (such as :class:`BaseCGIHandler` and :c...
python, official-docs, cpython, P0
Local_Trusted_Corpus
05a9d776-201f-43da-bc40-0c46e03c5951
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,752
supabase-export-v2
a02d71f3388cc4ed
.. class:: Headers([headers]) Create a mapping-like object wrapping *headers*, which must be a list of header name/value tuples as described in :pep:`3333`. The default value of *headers* is an empty list.
trusted_official_docs
CPython Docs
.. class:: Headers([headers]) Create a mapping-like object wrapping *headers*, which must be a list of header name/value tuples as described in :pep:`3333`. The default value of *headers* is an empty list.
.. class:: Headers([headers]) Create a mapping-like object wrapping *headers*, which must be a list of header name/value tuples as described in :pep:`3333`. The default value of *headers* is an empty list.
python, official-docs, cpython, P0
Local_Trusted_Corpus
065f2040-7231-4404-abf3-693c5c5f841d
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,880
supabase-export-v2
8d9c6a66ff286af2
.. attribute:: BaseHandler.error_headers The HTTP headers used for error responses. This should be a list of WSGI response headers (``(name, value)`` tuples), as described in :pep:`3333`. The default list just sets the content type to ``text/plain``.
trusted_official_docs
CPython Docs
.. attribute:: BaseHandler.error_headers The HTTP headers used for error responses. This should be a list of WSGI response headers (``(name, value)`` tuples), as described in :pep:`3333`. The default list just sets the content type to ``text/plain``.
.. attribute:: BaseHandler.error_headers The HTTP headers used for error responses. This should be a list of WSGI response headers (``(name, value)`` tuples), as described in :pep:`3333`. The default list just sets the content type to ``text/plain``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
06700f0a-f4be-429c-bc2d-65536010f8c3
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,729
supabase-export-v2
d452e50d3d2e65ba
``SCRIPT_NAME``, ``PATH_INFO``, and all of the :pep:`3333`\ -defined ``wsgi.*`` variables. It only supplies default values, and does not replace any existing settings for these variables. This routine is intended to make it easier for unit tests of WSGI servers and applications to set up dummy environments. It should ...
trusted_official_docs
CPython Docs
``SCRIPT_NAME``, ``PATH_INFO``, and all of the :pep:`3333`\ -defined ``wsgi.*`` variables. It only supplies default values, and does not replace any existing settings for these variables. This routine is intended to make it easier for unit tests of WSGI servers and applications to set up dummy environments. It should ...
``SCRIPT_NAME``, ``PATH_INFO``, and all of the :pep:`3333`\ -defined ``wsgi.*`` variables. It only supplies default values, and does not replace any existing settings for these variables. This routine is intended to make it easier for unit tests of WSGI servers and applications to set up dummy environments. It should ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0c0a4da4-9a6e-4ee9-8aa0-995d1051a7b1
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,834
supabase-export-v2
b45ea09251d929bc
.. class:: BaseHandler() This is an abstract base class for running WSGI applications. Each instance will handle a single HTTP request, although in principle you could create a subclass that was reusable for multiple requests.
trusted_official_docs
CPython Docs
.. class:: BaseHandler() This is an abstract base class for running WSGI applications. Each instance will handle a single HTTP request, although in principle you could create a subclass that was reusable for multiple requests.
.. class:: BaseHandler() This is an abstract base class for running WSGI applications. Each instance will handle a single HTTP request, although in principle you could create a subclass that was reusable for multiple requests.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0ef0f414-cb11-4024-9df6-badbfc7cd0a3
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,923
supabase-export-v2
adcbfac2556dcea8
respond): # Get the file name and MIME type fn = os.path.join(path, environ["PATH_INFO"][1:]) if "." not in fn.split(os.path.sep)[-1]: fn = os.path.join(fn, "index.html") mime_type = mimetypes.guess_file_type(fn)[0] # Return 200 OK if file exists, otherwise 404 Not Found if os.path.exists(fn): respond("200 OK", [("Co...
trusted_official_docs
CPython Docs
respond): # Get the file name and MIME type fn = os.path.join(path, environ["PATH_INFO"][1:]) if "." not in fn.split(os.path.sep)[-1]: fn = os.path.join(fn, "index.html") mime_type = mimetypes.guess_file_type(fn)[0] # Return 200 OK if file exists, otherwise 404 Not Found if os.path.exists(fn): respond("200 OK", [("Co...
respond): # Get the file name and MIME type fn = os.path.join(path, environ["PATH_INFO"][1:]) if "." not in fn.split(os.path.sep)[-1]: fn = os.path.join(fn, "index.html") mime_type = mimetypes.guess_file_type(fn)[0] # Return 200 OK if file exists, otherwise 404 Not Found if os.path.exists(fn): respond("200 OK", [("Co...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1148ee06-21d6-4954-aadc-81a79f4ea7f5
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,818
supabase-export-v2
735cbf5c63ab4773
.. class:: CGIHandler() CGI-based invocation via ``sys.stdin``, ``sys.stdout``, ``sys.stderr`` and ``os.environ``. This is useful when you have a WSGI application and want to run it as a CGI script. Simply invoke ``CGIHandler().run(app)``, where ``app`` is the WSGI application object you wish to invoke.
trusted_official_docs
CPython Docs
.. class:: CGIHandler() CGI-based invocation via ``sys.stdin``, ``sys.stdout``, ``sys.stderr`` and ``os.environ``. This is useful when you have a WSGI application and want to run it as a CGI script. Simply invoke ``CGIHandler().run(app)``, where ``app`` is the WSGI application object you wish to invoke.
.. class:: CGIHandler() CGI-based invocation via ``sys.stdin``, ``sys.stdout``, ``sys.stderr`` and ``os.environ``. This is useful when you have a WSGI application and want to run it as a CGI script. Simply invoke ``CGIHandler().run(app)``, where ``app`` is the WSGI application object you wish to invoke.
python, official-docs, cpython, P0
Local_Trusted_Corpus
13314a67-389a-4712-96bf-a98ab99931f3
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,725
supabase-export-v2
dd8f2c0509d0ba90
for passing to a WSGI application at ``/foo/bar``. That is, ``SCRIPT_NAME`` will change from ``/foo`` to ``/foo/bar``, and ``PATH_INFO`` will change from ``/bar/baz`` to ``/baz``. When ``PATH_INFO`` is just a "/", this routine returns an empty string and appends a trailing slash to ``SCRIPT_NAME``, even though empty p...
trusted_official_docs
CPython Docs
for passing to a WSGI application at ``/foo/bar``. That is, ``SCRIPT_NAME`` will change from ``/foo`` to ``/foo/bar``, and ``PATH_INFO`` will change from ``/bar/baz`` to ``/baz``. When ``PATH_INFO`` is just a "/", this routine returns an empty string and appends a trailing slash to ``SCRIPT_NAME``, even though empty p...
for passing to a WSGI application at ``/foo/bar``. That is, ``SCRIPT_NAME`` will change from ``/foo`` to ``/foo/bar``, and ``PATH_INFO`` will change from ``/bar/baz`` to ``/baz``. When ``PATH_INFO`` is just a "/", this routine returns an empty string and appends a trailing slash to ``SCRIPT_NAME``, even though empty p...
python, official-docs, cpython, P0
Local_Trusted_Corpus
160348fc-0461-4457-a39a-69f340a71a30
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,859
supabase-export-v2
1cb4e373dcc234aa
.. attribute:: BaseHandler.os_environ The default environment variables to be included in every request's WSGI environment. By default, this is a copy of ``os.environ`` at the time that :mod:`!wsgiref.handlers` was imported, but subclasses can either create their own at the class or instance level. Note that the dic...
trusted_official_docs
CPython Docs
.. attribute:: BaseHandler.os_environ The default environment variables to be included in every request's WSGI environment. By default, this is a copy of ``os.environ`` at the time that :mod:`!wsgiref.handlers` was imported, but subclasses can either create their own at the class or instance level. Note that the dic...
.. attribute:: BaseHandler.os_environ The default environment variables to be included in every request's WSGI environment. By default, this is a copy of ``os.environ`` at the time that :mod:`!wsgiref.handlers` was imported, but subclasses can either create their own at the class or instance level. Note that the dic...
python, official-docs, cpython, P0
Local_Trusted_Corpus
16d0fca6-64df-4603-bb95-7f6fefedd8cd
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,887
supabase-export-v2
e017830c82a366be
.. method:: BaseHandler.sendfile() Override to implement platform-specific file transmission. This method is called only if the application's return value is an instance of the class specified by the :attr:`wsgi_file_wrapper` attribute. It should return a true value if it was able to successfully transmit the file, ...
trusted_official_docs
CPython Docs
.. method:: BaseHandler.sendfile() Override to implement platform-specific file transmission. This method is called only if the application's return value is an instance of the class specified by the :attr:`wsgi_file_wrapper` attribute. It should return a true value if it was able to successfully transmit the file, ...
.. method:: BaseHandler.sendfile() Override to implement platform-specific file transmission. This method is called only if the application's return value is an instance of the class specified by the :attr:`wsgi_file_wrapper` attribute. It should return a true value if it was able to successfully transmit the file, ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
194f4fc3-e2a0-414b-82e3-7268ad2594c0
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,823
supabase-export-v2
d8d252b8b787cfed
``PATH_INFO`` that duplicates the ``SCRIPT_NAME`` at the front, causing problems for WSGI applications that wish to implement routing. This handler strips any such duplicated path. IIS can be configured to pass the correct ``PATH_INFO``, but this causes another bug where ``PATH_TRANSLATED`` is wrong. Luckily this vari...
trusted_official_docs
CPython Docs
``PATH_INFO`` that duplicates the ``SCRIPT_NAME`` at the front, causing problems for WSGI applications that wish to implement routing. This handler strips any such duplicated path. IIS can be configured to pass the correct ``PATH_INFO``, but this causes another bug where ``PATH_TRANSLATED`` is wrong. Luckily this vari...
``PATH_INFO`` that duplicates the ``SCRIPT_NAME`` at the front, causing problems for WSGI applications that wish to implement routing. This handler strips any such duplicated path. IIS can be configured to pass the correct ``PATH_INFO``, but this causes another bug where ``PATH_TRANSLATED`` is wrong. Luckily this vari...
python, official-docs, cpython, P0
Local_Trusted_Corpus
19c26e6a-3d2c-4256-a4a0-3f63990e29cf
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,779
supabase-export-v2
4ddea7c26acf9aa8
.. function:: demo_app(environ, start_response) This function is a small but complete WSGI application that returns a text page containing the message "Hello world!" and a list of the key/value pairs provided in the *environ* parameter. It's useful for verifying that a WSGI server (such as :mod:`!wsgiref.simple_serv...
trusted_official_docs
CPython Docs
.. function:: demo_app(environ, start_response) This function is a small but complete WSGI application that returns a text page containing the message "Hello world!" and a list of the key/value pairs provided in the *environ* parameter. It's useful for verifying that a WSGI server (such as :mod:`!wsgiref.simple_serv...
.. function:: demo_app(environ, start_response) This function is a small but complete WSGI application that returns a text page containing the message "Hello world!" and a list of the key/value pairs provided in the *environ* parameter. It's useful for verifying that a WSGI server (such as :mod:`!wsgiref.simple_serv...
python, official-docs, cpython, P0
Local_Trusted_Corpus
25fd929c-c13c-4a90-95e3-ae6ce3c8167c
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,761
supabase-export-v2
638bfcb098839f44
duplicates. Any fields deleted and re-inserted are always appended to the header list. If no fields exist with the given name, returns an empty list. .. method:: Headers.add_header(name, value, **_params)
trusted_official_docs
CPython Docs
duplicates. Any fields deleted and re-inserted are always appended to the header list. If no fields exist with the given name, returns an empty list. .. method:: Headers.add_header(name, value, **_params)
duplicates. Any fields deleted and re-inserted are always appended to the header list. If no fields exist with the given name, returns an empty list. .. method:: Headers.add_header(name, value, **_params)
python, official-docs, cpython, P0
Local_Trusted_Corpus
28b25aa5-57fa-4f6c-9d27-2c63f57dc262
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,733
supabase-export-v2
c32dee362f58baaa
# A relatively simple WSGI application. It's going to print out the # environment dictionary after being updated by setup_testing_defaults def simple_app(environ, start_response): setup_testing_defaults(environ) status = '200 OK' headers = [('Content-type', 'text/plain; charset=utf-8')]
trusted_official_docs
CPython Docs
# A relatively simple WSGI application. It's going to print out the # environment dictionary after being updated by setup_testing_defaults def simple_app(environ, start_response): setup_testing_defaults(environ) status = '200 OK' headers = [('Content-type', 'text/plain; charset=utf-8')]
# A relatively simple WSGI application. It's going to print out the # environment dictionary after being updated by setup_testing_defaults def simple_app(environ, start_response): setup_testing_defaults(environ) status = '200 OK' headers = [('Content-type', 'text/plain; charset=utf-8')]
python, official-docs, cpython, P0
Local_Trusted_Corpus
2966d341-f9bc-4d06-8c29-57e3fd72a6a9
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,716
supabase-export-v2
e763232ac3b42976
for whether ``wsgi.url_scheme`` should be "http" or "https", by checking for a ``HTTPS`` environment variable in the *environ* dictionary. The return value is a string. This function is useful when creating a gateway that wraps CGI or a CGI-like protocol such as FastCGI. Typically, servers providing such protocols wil...
trusted_official_docs
CPython Docs
for whether ``wsgi.url_scheme`` should be "http" or "https", by checking for a ``HTTPS`` environment variable in the *environ* dictionary. The return value is a string. This function is useful when creating a gateway that wraps CGI or a CGI-like protocol such as FastCGI. Typically, servers providing such protocols wil...
for whether ``wsgi.url_scheme`` should be "http" or "https", by checking for a ``HTTPS`` environment variable in the *environ* dictionary. The return value is a string. This function is useful when creating a gateway that wraps CGI or a CGI-like protocol such as FastCGI. Typically, servers providing such protocols wil...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2a86ea8d-e87f-4ed3-8da4-d788ea785fb4
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,757
supabase-export-v2
f0dfcc7144a340da
a colon and a space. Each line is terminated by a carriage return and line feed, and the bytestring is terminated with a blank line. In addition to their mapping interface and formatting features, :class:`Headers` objects also have the following methods for querying and adding multi-valued headers, and for adding hea...
trusted_official_docs
CPython Docs
a colon and a space. Each line is terminated by a carriage return and line feed, and the bytestring is terminated with a blank line. In addition to their mapping interface and formatting features, :class:`Headers` objects also have the following methods for querying and adding multi-valued headers, and for adding hea...
a colon and a space. Each line is terminated by a carriage return and line feed, and the bytestring is terminated with a blank line. In addition to their mapping interface and formatting features, :class:`Headers` objects also have the following methods for querying and adding multi-valued headers, and for adding hea...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2b3e6a9d-f1cf-4489-8128-b26cb7b83811
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,742
supabase-export-v2
166b160118696570
passed to the *filelike* object's :meth:`read` method to obtain bytestrings to yield. When :meth:`read` returns an empty bytestring, iteration is ended and is not resumable. If *filelike* has a :meth:`close` method, the returned object will also have a :meth:`close` method, and it will invoke the *filelike* object's :...
trusted_official_docs
CPython Docs
passed to the *filelike* object's :meth:`read` method to obtain bytestrings to yield. When :meth:`read` returns an empty bytestring, iteration is ended and is not resumable. If *filelike* has a :meth:`close` method, the returned object will also have a :meth:`close` method, and it will invoke the *filelike* object's :...
passed to the *filelike* object's :meth:`read` method to obtain bytestrings to yield. When :meth:`read` returns an empty bytestring, iteration is ended and is not resumable. If *filelike* has a :meth:`close` method, the returned object will also have a :meth:`close` method, and it will invoke the *filelike* object's :...
python, official-docs, cpython, P0
Local_Trusted_Corpus
2cef3da9-6d8d-473e-9b1f-dd8057abfafc
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,864
supabase-export-v2
b4cb4c213eae8f55
.. method:: BaseHandler.get_scheme() Return the URL scheme being used for the current request. The default implementation uses the :func:`guess_scheme` function from :mod:`wsgiref.util` to guess whether the scheme should be "http" or "https", based on the current request's :attr:`environ` variables.
trusted_official_docs
CPython Docs
.. method:: BaseHandler.get_scheme() Return the URL scheme being used for the current request. The default implementation uses the :func:`guess_scheme` function from :mod:`wsgiref.util` to guess whether the scheme should be "http" or "https", based on the current request's :attr:`environ` variables.
.. method:: BaseHandler.get_scheme() Return the URL scheme being used for the current request. The default implementation uses the :func:`guess_scheme` function from :mod:`wsgiref.util` to guess whether the scheme should be "http" or "https", based on the current request's :attr:`environ` variables.
python, official-docs, cpython, P0
Local_Trusted_Corpus
32c8fade-94a1-441e-abb6-9749b5507d7a
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,835
supabase-export-v2
dc68e2f324ba69fa
running WSGI applications. Each instance will handle a single HTTP request, although in principle you could create a subclass that was reusable for multiple requests. :class:`BaseHandler` instances have only one method intended for external use:
trusted_official_docs
CPython Docs
running WSGI applications. Each instance will handle a single HTTP request, although in principle you could create a subclass that was reusable for multiple requests. :class:`BaseHandler` instances have only one method intended for external use:
running WSGI applications. Each instance will handle a single HTTP request, although in principle you could create a subclass that was reusable for multiple requests. :class:`BaseHandler` instances have only one method intended for external use:
python, official-docs, cpython, P0
Local_Trusted_Corpus
33e6ff1e-e92d-4f0c-a4a0-517affa97dc1
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,822
supabase-export-v2
adce10ac3927ff3d
specialized alternative to :class:`CGIHandler`, for use when deploying on Microsoft's IIS web server, without having set the config allowPathInfo option (IIS>=7) or metabase allowPathInfoForScriptMappings (IIS<7). By default, IIS gives a ``PATH_INFO`` that duplicates the ``SCRIPT_NAME`` at the front, causing problems ...
trusted_official_docs
CPython Docs
specialized alternative to :class:`CGIHandler`, for use when deploying on Microsoft's IIS web server, without having set the config allowPathInfo option (IIS>=7) or metabase allowPathInfoForScriptMappings (IIS<7). By default, IIS gives a ``PATH_INFO`` that duplicates the ``SCRIPT_NAME`` at the front, causing problems ...
specialized alternative to :class:`CGIHandler`, for use when deploying on Microsoft's IIS web server, without having set the config allowPathInfo option (IIS>=7) or metabase allowPathInfoForScriptMappings (IIS<7). By default, IIS gives a ``PATH_INFO`` that duplicates the ``SCRIPT_NAME`` at the front, causing problems ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
35109339-43a7-4259-9be8-dc0f0b9a32fc
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,831
supabase-export-v2
b86202baefdc2209
designed for use with HTTP origin servers. If you are writing an HTTP server implementation, you will probably want to subclass this instead of :class:`BaseCGIHandler`. This class is a subclass of :class:`BaseHandler`. It overrides the :meth:`!__init__`, :meth:`~BaseHandler.get_stdin`, :meth:`~BaseHandler.get_stderr`...
trusted_official_docs
CPython Docs
designed for use with HTTP origin servers. If you are writing an HTTP server implementation, you will probably want to subclass this instead of :class:`BaseCGIHandler`. This class is a subclass of :class:`BaseHandler`. It overrides the :meth:`!__init__`, :meth:`~BaseHandler.get_stdin`, :meth:`~BaseHandler.get_stderr`...
designed for use with HTTP origin servers. If you are writing an HTTP server implementation, you will probably want to subclass this instead of :class:`BaseCGIHandler`. This class is a subclass of :class:`BaseHandler`. It overrides the :meth:`!__init__`, :meth:`~BaseHandler.get_stdin`, :meth:`~BaseHandler.get_stderr`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
369d568a-9ed1-47db-a7f4-1310aec6a5a7
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,810
supabase-export-v2
da25ad5e3b5bc840
from wsgiref.validate import validator from wsgiref.simple_server import make_server # Our callable object which is intentionally not compliant to the # standard, so the validator is going to break def simple_app(environ, start_response): status = '200 OK' # HTTP Status headers = [('Content-type', 'text/plain')] # ...
trusted_official_docs
CPython Docs
from wsgiref.validate import validator from wsgiref.simple_server import make_server # Our callable object which is intentionally not compliant to the # standard, so the validator is going to break def simple_app(environ, start_response): status = '200 OK' # HTTP Status headers = [('Content-type', 'text/plain')] # ...
from wsgiref.validate import validator from wsgiref.simple_server import make_server # Our callable object which is intentionally not compliant to the # standard, so the validator is going to break def simple_app(environ, start_response): status = '200 OK' # HTTP Status headers = [('Content-type', 'text/plain')] # ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3b5286be-aa3e-440d-a7b0-0b7fe644374d
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,789
supabase-export-v2
c1571b996556cd0f
Returns the currently set application callable. Normally, however, you do not need to use these additional methods, as :meth:`set_app` is normally called by :func:`make_server`, and the :meth:`get_app` exists mainly for the benefit of request handler instances.
trusted_official_docs
CPython Docs
Returns the currently set application callable. Normally, however, you do not need to use these additional methods, as :meth:`set_app` is normally called by :func:`make_server`, and the :meth:`get_app` exists mainly for the benefit of request handler instances.
Returns the currently set application callable. Normally, however, you do not need to use these additional methods, as :meth:`set_app` is normally called by :func:`make_server`, and the :meth:`get_app` exists mainly for the benefit of request handler instances.
python, official-docs, cpython, P0
Local_Trusted_Corpus
40e75381-0217-4343-a2f4-41b6963bf990
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,819
supabase-export-v2
a2a441f672bfa7f4
WSGI application and want to run it as a CGI script. Simply invoke ``CGIHandler().run(app)``, where ``app`` is the WSGI application object you wish to invoke. This class is a subclass of :class:`BaseCGIHandler` that sets ``wsgi.run_once`` to true, ``wsgi.multithread`` to false, and ``wsgi.multiprocess`` to true, and ...
trusted_official_docs
CPython Docs
WSGI application and want to run it as a CGI script. Simply invoke ``CGIHandler().run(app)``, where ``app`` is the WSGI application object you wish to invoke. This class is a subclass of :class:`BaseCGIHandler` that sets ``wsgi.run_once`` to true, ``wsgi.multithread`` to false, and ``wsgi.multiprocess`` to true, and ...
WSGI application and want to run it as a CGI script. Simply invoke ``CGIHandler().run(app)``, where ``app`` is the WSGI application object you wish to invoke. This class is a subclass of :class:`BaseCGIHandler` that sets ``wsgi.run_once`` to true, ``wsgi.multithread`` to false, and ``wsgi.multiprocess`` to true, and ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
41026fa5-65f9-472d-ab7a-bcdc47aa0cc9
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,917
supabase-export-v2
ddbdac0aac566aa6
def hello_world_app(environ, start_response): status = "200 OK" # HTTP Status headers = [("Content-type", "text/plain; charset=utf-8")] # HTTP Headers start_response(status, headers) # The returned object is going to be printed return [b"Hello World"]
trusted_official_docs
CPython Docs
def hello_world_app(environ, start_response): status = "200 OK" # HTTP Status headers = [("Content-type", "text/plain; charset=utf-8")] # HTTP Headers start_response(status, headers) # The returned object is going to be printed return [b"Hello World"]
def hello_world_app(environ, start_response): status = "200 OK" # HTTP Status headers = [("Content-type", "text/plain; charset=utf-8")] # HTTP Headers start_response(status, headers) # The returned object is going to be printed return [b"Hello World"]
python, official-docs, cpython, P0
Local_Trusted_Corpus
415c5e78-8a2d-43c6-bb32-d7f1964b8601
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,924
supabase-export-v2
d51ef8d8ec0c326a
if file exists, otherwise 404 Not Found if os.path.exists(fn): respond("200 OK", [("Content-Type", mime_type)]) return util.FileWrapper(open(fn, "rb")) else: respond("404 Not Found", [("Content-Type", "text/plain")]) return [b"not found"] if __name__ == "__main__": # Get the path and port from command-line arguments ...
trusted_official_docs
CPython Docs
if file exists, otherwise 404 Not Found if os.path.exists(fn): respond("200 OK", [("Content-Type", mime_type)]) return util.FileWrapper(open(fn, "rb")) else: respond("404 Not Found", [("Content-Type", "text/plain")]) return [b"not found"] if __name__ == "__main__": # Get the path and port from command-line arguments ...
if file exists, otherwise 404 Not Found if os.path.exists(fn): respond("200 OK", [("Content-Type", mime_type)]) return util.FileWrapper(open(fn, "rb")) else: respond("404 Not Found", [("Content-Type", "text/plain")]) return [b"not found"] if __name__ == "__main__": # Get the path and port from command-line arguments ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
449101c4-7195-4c2d-b677-7fcc4c5bf2aa
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,916
supabase-export-v2
b48e0d7b8caaf46e
argument passed to the function is a dictionary containing CGI-style environment variables and the second variable is the callable object. """ from wsgiref.simple_server import make_server def hello_world_app(environ, start_response): status = "200 OK" # HTTP Status headers = [("Content-type", "text/plain; charset=ut...
trusted_official_docs
CPython Docs
argument passed to the function is a dictionary containing CGI-style environment variables and the second variable is the callable object. """ from wsgiref.simple_server import make_server def hello_world_app(environ, start_response): status = "200 OK" # HTTP Status headers = [("Content-type", "text/plain; charset=ut...
argument passed to the function is a dictionary containing CGI-style environment variables and the second variable is the callable object. """ from wsgiref.simple_server import make_server def hello_world_app(environ, start_response): status = "200 OK" # HTTP Status headers = [("Content-type", "text/plain; charset=ut...
python, official-docs, cpython, P0
Local_Trusted_Corpus
492022f4-5a5d-406f-ae9d-e6374a897b22
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,812
supabase-export-v2
1b1691931f8422eb
# This is going to break because we need to return a list, and # the validator is going to inform us return b"Hello World" # This is the application wrapped in a validator validator_app = validator(simple_app)
trusted_official_docs
CPython Docs
# This is going to break because we need to return a list, and # the validator is going to inform us return b"Hello World" # This is the application wrapped in a validator validator_app = validator(simple_app)
# This is going to break because we need to return a list, and # the validator is going to inform us return b"Hello World" # This is the application wrapped in a validator validator_app = validator(simple_app)
python, official-docs, cpython, P0
Local_Trusted_Corpus
4a8cc2c1-d39c-44df-93c8-f1026f5c0a2c
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,876
supabase-export-v2
6335e3cbd50aef5d
default implementation just uses the :attr:`error_status`, :attr:`error_headers`, and :attr:`error_body` attributes to generate an output page. Subclasses can override this to produce more dynamic error output. Note, however, that it's not recommended from a security perspective to spit out diagnostics to any old user...
trusted_official_docs
CPython Docs
default implementation just uses the :attr:`error_status`, :attr:`error_headers`, and :attr:`error_body` attributes to generate an output page. Subclasses can override this to produce more dynamic error output. Note, however, that it's not recommended from a security perspective to spit out diagnostics to any old user...
default implementation just uses the :attr:`error_status`, :attr:`error_headers`, and :attr:`error_body` attributes to generate an output page. Subclasses can override this to produce more dynamic error output. Note, however, that it's not recommended from a security perspective to spit out diagnostics to any old user...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4c1c185b-a77f-41cf-a354-ce5e3c88f473
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,874
supabase-export-v2
d756dc1cef706f94
WSGI application to generate an error page for the user. It is only invoked if an error occurs before headers are sent to the client. This method can access the current error using ``sys.exception()``, and should pass that information to *start_response* when calling it (as described in the "Error Handling" section o...
trusted_official_docs
CPython Docs
WSGI application to generate an error page for the user. It is only invoked if an error occurs before headers are sent to the client. This method can access the current error using ``sys.exception()``, and should pass that information to *start_response* when calling it (as described in the "Error Handling" section o...
WSGI application to generate an error page for the user. It is only invoked if an error occurs before headers are sent to the client. This method can access the current error using ``sys.exception()``, and should pass that information to *start_response* when calling it (as described in the "Error Handling" section o...
python, official-docs, cpython, P0
Local_Trusted_Corpus
504eb650-dcb9-4ea1-97e1-c8c050f09362
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,771
supabase-export-v2
afbc97ada0ed22a6
you should create a WSGI application that parses ``PATH_INFO`` to select which application to invoke for each request. (E.g., using the :func:`shift_path_info` function from :mod:`wsgiref.util`.) .. function:: make_server(host, port, app, server_class=WSGIServer, handler_class=WSGIRequestHandler)
trusted_official_docs
CPython Docs
you should create a WSGI application that parses ``PATH_INFO`` to select which application to invoke for each request. (E.g., using the :func:`shift_path_info` function from :mod:`wsgiref.util`.) .. function:: make_server(host, port, app, server_class=WSGIServer, handler_class=WSGIRequestHandler)
you should create a WSGI application that parses ``PATH_INFO`` to select which application to invoke for each request. (E.g., using the :func:`shift_path_info` function from :mod:`wsgiref.util`.) .. function:: make_server(host, port, app, server_class=WSGIServer, handler_class=WSGIRequestHandler)
python, official-docs, cpython, P0
Local_Trusted_Corpus
5385c2ea-60d0-411e-8647-ea8d2da0c823
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,829
supabase-export-v2
fb8211da98ed7468
(such as CGI, FastCGI, SCGI, etc.) that uses a ``Status:`` header to send an HTTP status, you probably want to subclass this instead of :class:`SimpleHandler`. .. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False)
trusted_official_docs
CPython Docs
(such as CGI, FastCGI, SCGI, etc.) that uses a ``Status:`` header to send an HTTP status, you probably want to subclass this instead of :class:`SimpleHandler`. .. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False)
(such as CGI, FastCGI, SCGI, etc.) that uses a ``Status:`` header to send an HTTP status, you probably want to subclass this instead of :class:`SimpleHandler`. .. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False)
python, official-docs, cpython, P0
Local_Trusted_Corpus
54c7be09-0a73-4bff-9bbf-71a77d7b9976
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,867
supabase-export-v2
e373e628e7bf666f
It also inserts a ``SERVER_SOFTWARE`` key if not present, as long as the :attr:`origin_server` attribute is a true value and the :attr:`server_software` attribute is set. Methods and attributes for customizing exception handling:
trusted_official_docs
CPython Docs
It also inserts a ``SERVER_SOFTWARE`` key if not present, as long as the :attr:`origin_server` attribute is a true value and the :attr:`server_software` attribute is set. Methods and attributes for customizing exception handling:
It also inserts a ``SERVER_SOFTWARE`` key if not present, as long as the :attr:`origin_server` attribute is a true value and the :attr:`server_software` attribute is set. Methods and attributes for customizing exception handling:
python, official-docs, cpython, P0
Local_Trusted_Corpus
552658fd-4d33-4f19-bd66-8d87d56d0c8c
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,713
supabase-export-v2
272632f426db2b4d
.. module:: wsgiref.util :synopsis: WSGI environment utilities. This module provides a variety of utility functions for working with WSGI environments. A WSGI environment is a dictionary containing HTTP request variables as described in :pep:`3333`. All of the functions taking an *environ* parameter expect a WSGI-compl...
trusted_official_docs
CPython Docs
.. module:: wsgiref.util :synopsis: WSGI environment utilities. This module provides a variety of utility functions for working with WSGI environments. A WSGI environment is a dictionary containing HTTP request variables as described in :pep:`3333`. All of the functions taking an *environ* parameter expect a WSGI-compl...
.. module:: wsgiref.util :synopsis: WSGI environment utilities. This module provides a variety of utility functions for working with WSGI environments. A WSGI environment is a dictionary containing HTTP request variables as described in :pep:`3333`. All of the functions taking an *environ* parameter expect a WSGI-compl...
python, official-docs, cpython, P0
Local_Trusted_Corpus
565cf6f5-82f5-404e-826f-81bbe3f40894
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,755
supabase-export-v2
6592ae3b8381c7b2
or delete a key that isn't in the wrapped header list. Getting a nonexistent header just returns ``None``, and deleting a nonexistent header does nothing. :class:`Headers` objects also support :meth:`keys`, :meth:`values`, and :meth:`items` methods. The lists returned by :meth:`keys` and :meth:`items` can include the...
trusted_official_docs
CPython Docs
or delete a key that isn't in the wrapped header list. Getting a nonexistent header just returns ``None``, and deleting a nonexistent header does nothing. :class:`Headers` objects also support :meth:`keys`, :meth:`values`, and :meth:`items` methods. The lists returned by :meth:`keys` and :meth:`items` can include the...
or delete a key that isn't in the wrapped header list. Getting a nonexistent header just returns ``None``, and deleting a nonexistent header does nothing. :class:`Headers` objects also support :meth:`keys`, :meth:`values`, and :meth:`items` methods. The lists returned by :meth:`keys` and :meth:`items` can include the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
568bd928-98a8-4c07-a9be-8e2466d35b7d
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,715
supabase-export-v2
6ac40a24df600bbb
.. function:: guess_scheme(environ) Return a guess for whether ``wsgi.url_scheme`` should be "http" or "https", by checking for a ``HTTPS`` environment variable in the *environ* dictionary. The return value is a string.
trusted_official_docs
CPython Docs
.. function:: guess_scheme(environ) Return a guess for whether ``wsgi.url_scheme`` should be "http" or "https", by checking for a ``HTTPS`` environment variable in the *environ* dictionary. The return value is a string.
.. function:: guess_scheme(environ) Return a guess for whether ``wsgi.url_scheme`` should be "http" or "https", by checking for a ``HTTPS`` environment variable in the *environ* dictionary. The return value is a string.
python, official-docs, cpython, P0
Local_Trusted_Corpus
58e9261a-f167-4865-8f1b-57f17d8009b5
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,922
supabase-export-v2
a18c4160180d9d16
the file names, 404 errors are raised if the file is not found. """ import mimetypes import os import sys from wsgiref import simple_server, util def app(environ, respond): # Get the file name and MIME type fn = os.path.join(path, environ["PATH_INFO"][1:]) if "." not in fn.split(os.path.sep)[-1]: fn = os.path.join(...
trusted_official_docs
CPython Docs
the file names, 404 errors are raised if the file is not found. """ import mimetypes import os import sys from wsgiref import simple_server, util def app(environ, respond): # Get the file name and MIME type fn = os.path.join(path, environ["PATH_INFO"][1:]) if "." not in fn.split(os.path.sep)[-1]: fn = os.path.join(...
the file names, 404 errors are raised if the file is not found. """ import mimetypes import os import sys from wsgiref import simple_server, util def app(environ, respond): # Get the file name and MIME type fn = os.path.join(path, environ["PATH_INFO"][1:]) if "." not in fn.split(os.path.sep)[-1]: fn = os.path.join(...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5b3827ab-dfd7-49bc-be1e-255337797c68
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,828
supabase-export-v2
b413714d7dee915f
are specified explicitly. The *multithread* and *multiprocess* values are used to set the ``wsgi.multithread`` and ``wsgi.multiprocess`` flags for any applications run by the handler instance. This class is a subclass of :class:`SimpleHandler` intended for use with software other than HTTP "origin servers". If you are...
trusted_official_docs
CPython Docs
are specified explicitly. The *multithread* and *multiprocess* values are used to set the ``wsgi.multithread`` and ``wsgi.multiprocess`` flags for any applications run by the handler instance. This class is a subclass of :class:`SimpleHandler` intended for use with software other than HTTP "origin servers". If you are...
are specified explicitly. The *multithread* and *multiprocess* values are used to set the ``wsgi.multithread`` and ``wsgi.multiprocess`` flags for any applications run by the handler instance. This class is a subclass of :class:`SimpleHandler` intended for use with software other than HTTP "origin servers". If you are...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5e463212-ae54-48af-a9de-602f10e872fb
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,754
supabase-export-v2
bfc9eb1da46b2287
at the end of the wrapped header list. Headers' existing order is generally maintained, with new headers added to the end of the wrapped list. Unlike a dictionary, :class:`Headers` objects do not raise an error when you try to get or delete a key that isn't in the wrapped header list. Getting a nonexistent header jus...
trusted_official_docs
CPython Docs
at the end of the wrapped header list. Headers' existing order is generally maintained, with new headers added to the end of the wrapped list. Unlike a dictionary, :class:`Headers` objects do not raise an error when you try to get or delete a key that isn't in the wrapped header list. Getting a nonexistent header jus...
at the end of the wrapped header list. Headers' existing order is generally maintained, with new headers added to the end of the wrapped list. Unlike a dictionary, :class:`Headers` objects do not raise an error when you try to get or delete a key that isn't in the wrapped header list. Getting a nonexistent header jus...
python, official-docs, cpython, P0
Local_Trusted_Corpus
602c6789-28f4-47b0-81ff-45075a8dd8a9
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,915
supabase-export-v2
9ce2ffd252440e04
This is a working "Hello World" WSGI application, where the *start_response* callable should follow the :class:`.StartResponse` protocol:: """ Every WSGI application must have an application object - a callable object that accepts two arguments. For that purpose, we're going to use a function (note that you're not l...
trusted_official_docs
CPython Docs
This is a working "Hello World" WSGI application, where the *start_response* callable should follow the :class:`.StartResponse` protocol:: """ Every WSGI application must have an application object - a callable object that accepts two arguments. For that purpose, we're going to use a function (note that you're not l...
This is a working "Hello World" WSGI application, where the *start_response* callable should follow the :class:`.StartResponse` protocol:: """ Every WSGI application must have an application object - a callable object that accepts two arguments. For that purpose, we're going to use a function (note that you're not l...
python, official-docs, cpython, P0
Local_Trusted_Corpus
671938f5-0cdd-4043-baf4-20290c2a608a
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,853
supabase-export-v2
3f2cb2255f38e0cb
.. attribute:: BaseHandler.wsgi_multithread The value to be used for the ``wsgi.multithread`` environment variable. It defaults to true in :class:`BaseHandler`, but may have a different default (or be set by the constructor) in the other subclasses.
trusted_official_docs
CPython Docs
.. attribute:: BaseHandler.wsgi_multithread The value to be used for the ``wsgi.multithread`` environment variable. It defaults to true in :class:`BaseHandler`, but may have a different default (or be set by the constructor) in the other subclasses.
.. attribute:: BaseHandler.wsgi_multithread The value to be used for the ``wsgi.multithread`` environment variable. It defaults to true in :class:`BaseHandler`, but may have a different default (or be set by the constructor) in the other subclasses.
python, official-docs, cpython, P0
Local_Trusted_Corpus
68623afd-ff47-462e-bef6-2ae5132767b3
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,855
supabase-export-v2
43d4341da11298aa
.. attribute:: BaseHandler.wsgi_multiprocess The value to be used for the ``wsgi.multiprocess`` environment variable. It defaults to true in :class:`BaseHandler`, but may have a different default (or be set by the constructor) in the other subclasses.
trusted_official_docs
CPython Docs
.. attribute:: BaseHandler.wsgi_multiprocess The value to be used for the ``wsgi.multiprocess`` environment variable. It defaults to true in :class:`BaseHandler`, but may have a different default (or be set by the constructor) in the other subclasses.
.. attribute:: BaseHandler.wsgi_multiprocess The value to be used for the ``wsgi.multiprocess`` environment variable. It defaults to true in :class:`BaseHandler`, but may have a different default (or be set by the constructor) in the other subclasses.
python, official-docs, cpython, P0
Local_Trusted_Corpus
68c79b94-8655-4dba-b0bc-9347b0af8664
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,890
supabase-export-v2
7050f0cd47bb7a98
.. attribute:: BaseHandler.origin_server This attribute should be set to a true value if the handler's :meth:`_write` and :meth:`_flush` are being used to communicate directly to the client, rather than via a CGI-like gateway protocol that wants the HTTP status in a special ``Status:`` header.
trusted_official_docs
CPython Docs
.. attribute:: BaseHandler.origin_server This attribute should be set to a true value if the handler's :meth:`_write` and :meth:`_flush` are being used to communicate directly to the client, rather than via a CGI-like gateway protocol that wants the HTTP status in a special ``Status:`` header.
.. attribute:: BaseHandler.origin_server This attribute should be set to a true value if the handler's :meth:`_write` and :meth:`_flush` are being used to communicate directly to the client, rather than via a CGI-like gateway protocol that wants the HTTP status in a special ``Status:`` header.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6c091c79-9528-4451-b6d2-c6fb2d9d5988
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,866
supabase-export-v2
c85c94fa212d49a4
.. method:: BaseHandler.setup_environ() Set the :attr:`environ` attribute to a fully populated WSGI environment. The default implementation uses all of the above methods and attributes, plus the :meth:`get_stdin`, :meth:`get_stderr`, and :meth:`add_cgi_vars` methods and the :attr:`wsgi_file_wrapper` attribute. It al...
trusted_official_docs
CPython Docs
.. method:: BaseHandler.setup_environ() Set the :attr:`environ` attribute to a fully populated WSGI environment. The default implementation uses all of the above methods and attributes, plus the :meth:`get_stdin`, :meth:`get_stderr`, and :meth:`add_cgi_vars` methods and the :attr:`wsgi_file_wrapper` attribute. It al...
.. method:: BaseHandler.setup_environ() Set the :attr:`environ` attribute to a fully populated WSGI environment. The default implementation uses all of the above methods and attributes, plus the :meth:`get_stdin`, :meth:`get_stderr`, and :meth:`add_cgi_vars` methods and the :attr:`wsgi_file_wrapper` attribute. It al...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6fa04d1f-bb6a-4a96-8466-a88f35aedaba
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,780
supabase-export-v2
367a3044ca6224bf
provided in the *environ* parameter. It's useful for verifying that a WSGI server (such as :mod:`!wsgiref.simple_server`) is able to run a simple WSGI application correctly. The *start_response* callable should follow the :class:`.StartResponse` protocol.
trusted_official_docs
CPython Docs
provided in the *environ* parameter. It's useful for verifying that a WSGI server (such as :mod:`!wsgiref.simple_server`) is able to run a simple WSGI application correctly. The *start_response* callable should follow the :class:`.StartResponse` protocol.
provided in the *environ* parameter. It's useful for verifying that a WSGI server (such as :mod:`!wsgiref.simple_server`) is able to run a simple WSGI application correctly. The *start_response* callable should follow the :class:`.StartResponse` protocol.
python, official-docs, cpython, P0
Local_Trusted_Corpus
712cffee-5380-4423-b826-3be0788bb475
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,921
supabase-export-v2
2a3b9620c72cb4fb
Example of a WSGI application serving the current directory, accept optional directory and port number (default: 8000) on the command line:: """ Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. MIME types are guessed from the file na...
trusted_official_docs
CPython Docs
Example of a WSGI application serving the current directory, accept optional directory and port number (default: 8000) on the command line:: """ Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. MIME types are guessed from the file na...
Example of a WSGI application serving the current directory, accept optional directory and port number (default: 8000) on the command line:: """ Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. MIME types are guessed from the file na...
python, official-docs, cpython, P0
Local_Trusted_Corpus
739d68cd-315c-40dd-91e9-bd5ff133337f
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,827
supabase-export-v2
88d980bfc98a6847
.. class:: BaseCGIHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`CGIHandler`, but instead of using the :mod:`sys` and :mod:`os` modules, the CGI environment and I/O streams are specified explicitly. The *multithread* and *multiprocess* values are used to set the ``wsg...
trusted_official_docs
CPython Docs
.. class:: BaseCGIHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`CGIHandler`, but instead of using the :mod:`sys` and :mod:`os` modules, the CGI environment and I/O streams are specified explicitly. The *multithread* and *multiprocess* values are used to set the ``wsg...
.. class:: BaseCGIHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`CGIHandler`, but instead of using the :mod:`sys` and :mod:`os` modules, the CGI environment and I/O streams are specified explicitly. The *multithread* and *multiprocess* values are used to set the ``wsg...
python, official-docs, cpython, P0
Local_Trusted_Corpus
75ca6da2-2c4d-453a-9391-80703ffaea14
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,790
supabase-export-v2
db111bdda23d994e
need to use these additional methods, as :meth:`set_app` is normally called by :func:`make_server`, and the :meth:`get_app` exists mainly for the benefit of request handler instances. .. class:: WSGIRequestHandler(request, client_address, server)
trusted_official_docs
CPython Docs
need to use these additional methods, as :meth:`set_app` is normally called by :func:`make_server`, and the :meth:`get_app` exists mainly for the benefit of request handler instances. .. class:: WSGIRequestHandler(request, client_address, server)
need to use these additional methods, as :meth:`set_app` is normally called by :func:`make_server`, and the :meth:`get_app` exists mainly for the benefit of request handler instances. .. class:: WSGIRequestHandler(request, client_address, server)
python, official-docs, cpython, P0
Local_Trusted_Corpus
7634bac1-e293-4226-8653-a4861dcfd232
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,784
supabase-export-v2
1c44ddb49c2e1ba7
You do not normally need to call this constructor, as the :func:`make_server` function can handle all the details for you. :class:`WSGIServer` is a subclass of :class:`http.server.HTTPServer`, so all of its methods (such as :meth:`serve_forever` and :meth:`handle_request`) are available. :class:`WSGIServer` also prov...
trusted_official_docs
CPython Docs
You do not normally need to call this constructor, as the :func:`make_server` function can handle all the details for you. :class:`WSGIServer` is a subclass of :class:`http.server.HTTPServer`, so all of its methods (such as :meth:`serve_forever` and :meth:`handle_request`) are available. :class:`WSGIServer` also prov...
You do not normally need to call this constructor, as the :func:`make_server` function can handle all the details for you. :class:`WSGIServer` is a subclass of :class:`http.server.HTTPServer`, so all of its methods (such as :meth:`serve_forever` and :meth:`handle_request`) are available. :class:`WSGIServer` also prov...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7debf45c-b61e-46fc-9c89-efd69461ecd7
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,707
supabase-export-v2
a27eb6aa2e94f700
applications written in Python. Having a standard interface makes it easy to use an application that supports WSGI with a number of different web servers. Only authors of web servers and programming frameworks need to know every detail and corner case of the WSGI design. You don't need to understand every detail of WSG...
trusted_official_docs
CPython Docs
applications written in Python. Having a standard interface makes it easy to use an application that supports WSGI with a number of different web servers. Only authors of web servers and programming frameworks need to know every detail and corner case of the WSGI design. You don't need to understand every detail of WSG...
applications written in Python. Having a standard interface makes it easy to use an application that supports WSGI with a number of different web servers. Only authors of web servers and programming frameworks need to know every detail and corner case of the WSGI design. You don't need to understand every detail of WSG...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7e6e738d-be41-4315-b868-6595f2e33124
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,838
supabase-export-v2
5bcc90867b453cf0
Run the specified WSGI application, *app*. All of the other :class:`BaseHandler` methods are invoked by this method in the process of running the application, and thus exist primarily to allow customizing the process.
trusted_official_docs
CPython Docs
Run the specified WSGI application, *app*. All of the other :class:`BaseHandler` methods are invoked by this method in the process of running the application, and thus exist primarily to allow customizing the process.
Run the specified WSGI application, *app*. All of the other :class:`BaseHandler` methods are invoked by this method in the process of running the application, and thus exist primarily to allow customizing the process.
python, official-docs, cpython, P0
Local_Trusted_Corpus
87af6638-0256-4a14-b540-a2dce2fb5e7f
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,811
supabase-export-v2
9d0f29f8c1d85c4a
the validator is going to break def simple_app(environ, start_response): status = '200 OK' # HTTP Status headers = [('Content-type', 'text/plain')] # HTTP Headers start_response(status, headers) # This is going to break because we need to return a list, and # the validator is going to inform us return b"Hello World"
trusted_official_docs
CPython Docs
the validator is going to break def simple_app(environ, start_response): status = '200 OK' # HTTP Status headers = [('Content-type', 'text/plain')] # HTTP Headers start_response(status, headers) # This is going to break because we need to return a list, and # the validator is going to inform us return b"Hello World"
the validator is going to break def simple_app(environ, start_response): status = '200 OK' # HTTP Status headers = [('Content-type', 'text/plain')] # HTTP Headers start_response(status, headers) # This is going to break because we need to return a list, and # the validator is going to inform us return b"Hello World"
python, official-docs, cpython, P0
Local_Trusted_Corpus
88313222-802b-48e1-bb79-f08bcd8228d5
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,869
supabase-export-v2
fae3ee5801f5603c
.. method:: BaseHandler.log_exception(exc_info) Log the *exc_info* tuple in the server log. *exc_info* is a ``(type, value, traceback)`` tuple. The default implementation simply writes the traceback to the request's ``wsgi.errors`` stream and flushes it. Subclasses can override this method to change the format or re...
trusted_official_docs
CPython Docs
.. method:: BaseHandler.log_exception(exc_info) Log the *exc_info* tuple in the server log. *exc_info* is a ``(type, value, traceback)`` tuple. The default implementation simply writes the traceback to the request's ``wsgi.errors`` stream and flushes it. Subclasses can override this method to change the format or re...
.. method:: BaseHandler.log_exception(exc_info) Log the *exc_info* tuple in the server log. *exc_info* is a ``(type, value, traceback)`` tuple. The default implementation simply writes the traceback to the request's ``wsgi.errors`` stream and flushes it. Subclasses can override this method to change the format or re...
python, official-docs, cpython, P0
Local_Trusted_Corpus
90ab8ccf-780b-49e8-b7c4-657867fe4675
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,794
supabase-export-v2
ec0870ba87a60be5
.. method:: WSGIRequestHandler.get_environ() Return a :data:`~wsgiref.types.WSGIEnvironment` dictionary for a request. The default implementation copies the contents of the :class:`WSGIServer` object's :attr:`base_environ` dictionary attribute and then adds various headers derived from the HTTP request. Each call t...
trusted_official_docs
CPython Docs
.. method:: WSGIRequestHandler.get_environ() Return a :data:`~wsgiref.types.WSGIEnvironment` dictionary for a request. The default implementation copies the contents of the :class:`WSGIServer` object's :attr:`base_environ` dictionary attribute and then adds various headers derived from the HTTP request. Each call t...
.. method:: WSGIRequestHandler.get_environ() Return a :data:`~wsgiref.types.WSGIEnvironment` dictionary for a request. The default implementation copies the contents of the :class:`WSGIServer` object's :attr:`base_environ` dictionary attribute and then adds various headers derived from the HTTP request. Each call t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9f3246a4-3def-4214-8ad6-1abe72c5c876
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,883
supabase-export-v2
7fa3d2eab30d8934
error response body. This should be an HTTP response body bytestring. It defaults to the plain text, "A server error occurred. Please contact the administrator." Methods and attributes for :pep:`3333`'s "Optional Platform-Specific File Handling" feature:
trusted_official_docs
CPython Docs
error response body. This should be an HTTP response body bytestring. It defaults to the plain text, "A server error occurred. Please contact the administrator." Methods and attributes for :pep:`3333`'s "Optional Platform-Specific File Handling" feature:
error response body. This should be an HTTP response body bytestring. It defaults to the plain text, "A server error occurred. Please contact the administrator." Methods and attributes for :pep:`3333`'s "Optional Platform-Specific File Handling" feature:
python, official-docs, cpython, P0
Local_Trusted_Corpus
a2be88a1-c77e-46a4-b78f-2739085a915f
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,745
supabase-export-v2
ff34393436088f60
from io import StringIO from wsgiref.util import FileWrapper # We're using a StringIO-buffer for as the file-like object filelike = StringIO("This is an example file-like object"*10) wrapper = FileWrapper(filelike, blksize=5)
trusted_official_docs
CPython Docs
from io import StringIO from wsgiref.util import FileWrapper # We're using a StringIO-buffer for as the file-like object filelike = StringIO("This is an example file-like object"*10) wrapper = FileWrapper(filelike, blksize=5)
from io import StringIO from wsgiref.util import FileWrapper # We're using a StringIO-buffer for as the file-like object filelike = StringIO("This is an example file-like object"*10) wrapper = FileWrapper(filelike, blksize=5)
python, official-docs, cpython, P0
Local_Trusted_Corpus
a30f9bf0-20fd-4676-8a0d-a4713015ef0f
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,824
supabase-export-v2
6ce2d42714aad2cf
bug. For this reason IIS<7 is almost never deployed with the fix (Even IIS7 rarely uses it because there is still no UI for it.). There is no way for CGI code to tell whether the option was set, so a separate handler class is provided. It is used in the same way as :class:`CGIHandler`, i.e., by calling ``IISCGIHandle...
trusted_official_docs
CPython Docs
bug. For this reason IIS<7 is almost never deployed with the fix (Even IIS7 rarely uses it because there is still no UI for it.). There is no way for CGI code to tell whether the option was set, so a separate handler class is provided. It is used in the same way as :class:`CGIHandler`, i.e., by calling ``IISCGIHandle...
bug. For this reason IIS<7 is almost never deployed with the fix (Even IIS7 rarely uses it because there is still no UI for it.). There is no way for CGI code to tell whether the option was set, so a separate handler class is provided. It is used in the same way as :class:`CGIHandler`, i.e., by calling ``IISCGIHandle...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a4a4d57e-c032-491b-9217-61c5694727f7
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,806
supabase-export-v2
00a514922e544354
to the original *application*, and will check that both the *application* and the server invoking it are conforming to the WSGI specification and to :rfc:`2616`. Any detected nonconformance results in an :exc:`AssertionError` being raised; note, however, that how these errors are handled is server-dependent. For exam...
trusted_official_docs
CPython Docs
to the original *application*, and will check that both the *application* and the server invoking it are conforming to the WSGI specification and to :rfc:`2616`. Any detected nonconformance results in an :exc:`AssertionError` being raised; note, however, that how these errors are handled is server-dependent. For exam...
to the original *application*, and will check that both the *application* and the server invoking it are conforming to the WSGI specification and to :rfc:`2616`. Any detected nonconformance results in an :exc:`AssertionError` being raised; note, however, that how these errors are handled is server-dependent. For exam...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a535706a-e376-451b-a420-48bb9dd971ba
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,875
supabase-export-v2
19f04af5a3015cd1
information to *start_response* when calling it (as described in the "Error Handling" section of :pep:`3333`). In particular, the *start_response* callable should follow the :class:`.StartResponse` protocol. The default implementation just uses the :attr:`error_status`, :attr:`error_headers`, and :attr:`error_body` at...
trusted_official_docs
CPython Docs
information to *start_response* when calling it (as described in the "Error Handling" section of :pep:`3333`). In particular, the *start_response* callable should follow the :class:`.StartResponse` protocol. The default implementation just uses the :attr:`error_status`, :attr:`error_headers`, and :attr:`error_body` at...
information to *start_response* when calling it (as described in the "Error Handling" section of :pep:`3333`). In particular, the *start_response* callable should follow the :class:`.StartResponse` protocol. The default implementation just uses the :attr:`error_status`, :attr:`error_headers`, and :attr:`error_body` at...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a56392c2-5326-40d0-99df-1992d39d9667
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,807
supabase-export-v2
0ca42dc64bebf355
to do something else) will simply output a message that an error has occurred, and dump the traceback to ``sys.stderr`` or some other error stream. This wrapper may also generate output using the :mod:`warnings` module to indicate behaviors that are questionable but which may not actually be prohibited by :pep:`3333`...
trusted_official_docs
CPython Docs
to do something else) will simply output a message that an error has occurred, and dump the traceback to ``sys.stderr`` or some other error stream. This wrapper may also generate output using the :mod:`warnings` module to indicate behaviors that are questionable but which may not actually be prohibited by :pep:`3333`...
to do something else) will simply output a message that an error has occurred, and dump the traceback to ``sys.stderr`` or some other error stream. This wrapper may also generate output using the :mod:`warnings` module to indicate behaviors that are questionable but which may not actually be prohibited by :pep:`3333`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a5ccdbe6-5d93-4b9b-9722-3224c4c64347
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,873
supabase-export-v2
e69352eeb6d2c454
.. method:: BaseHandler.error_output(environ, start_response) This method is a WSGI application to generate an error page for the user. It is only invoked if an error occurs before headers are sent to the client.
trusted_official_docs
CPython Docs
.. method:: BaseHandler.error_output(environ, start_response) This method is a WSGI application to generate an error page for the user. It is only invoked if an error occurs before headers are sent to the client.
.. method:: BaseHandler.error_output(environ, start_response) This method is a WSGI application to generate an error page for the user. It is only invoked if an error occurs before headers are sent to the client.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a6037c61-232f-4994-b906-c1dfc3e74aa2
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,708
supabase-export-v2
072a2dfca73c373d
You don't need to understand every detail of WSGI just to install a WSGI application or to write a web application using an existing framework. :mod:`!wsgiref` is a reference implementation of the WSGI specification that can be used to add WSGI support to a web server or framework. It provides utilities for manipulatin...
trusted_official_docs
CPython Docs
You don't need to understand every detail of WSGI just to install a WSGI application or to write a web application using an existing framework. :mod:`!wsgiref` is a reference implementation of the WSGI specification that can be used to add WSGI support to a web server or framework. It provides utilities for manipulatin...
You don't need to understand every detail of WSGI just to install a WSGI application or to write a web application using an existing framework. :mod:`!wsgiref` is a reference implementation of the WSGI specification that can be used to add WSGI support to a web server or framework. It provides utilities for manipulatin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a8285275-8266-44b4-8066-467424230c6b
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,770
supabase-export-v2
52627a1eeeec3904
.. module:: wsgiref.simple_server :synopsis: A simple WSGI HTTP server. This module implements a simple HTTP server (based on :mod:`http.server`) that serves WSGI applications. Each server instance serves a single WSGI application on a given host and port. If you want to serve multiple applications on a single host and...
trusted_official_docs
CPython Docs
.. module:: wsgiref.simple_server :synopsis: A simple WSGI HTTP server. This module implements a simple HTTP server (based on :mod:`http.server`) that serves WSGI applications. Each server instance serves a single WSGI application on a given host and port. If you want to serve multiple applications on a single host and...
.. module:: wsgiref.simple_server :synopsis: A simple WSGI HTTP server. This module implements a simple HTTP server (based on :mod:`http.server`) that serves WSGI applications. Each server instance serves a single WSGI application on a given host and port. If you want to serve multiple applications on a single host and...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ac8eff63-1867-4f0d-b533-b3706e158eef
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,783
supabase-export-v2
12fc64b9628f18dc
Create a :class:`WSGIServer` instance. *server_address* should be a ``(host,port)`` tuple, and *RequestHandlerClass* should be the subclass of :class:`http.server.BaseHTTPRequestHandler` that will be used to process requests. You do not normally need to call this constructor, as the :func:`make_server` function can ha...
trusted_official_docs
CPython Docs
Create a :class:`WSGIServer` instance. *server_address* should be a ``(host,port)`` tuple, and *RequestHandlerClass* should be the subclass of :class:`http.server.BaseHTTPRequestHandler` that will be used to process requests. You do not normally need to call this constructor, as the :func:`make_server` function can ha...
Create a :class:`WSGIServer` instance. *server_address* should be a ``(host,port)`` tuple, and *RequestHandlerClass* should be the subclass of :class:`http.server.BaseHTTPRequestHandler` that will be used to process requests. You do not normally need to call this constructor, as the :func:`make_server` function can ha...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b00b2bdb-35a1-4977-a66a-d4fba59253cb
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,830
supabase-export-v2
a4db0b2ca94b0a47
.. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin servers. If you are writing an HTTP server implementation, you will probably want to subclass this instead of :class:`BaseCGIHandler`.
trusted_official_docs
CPython Docs
.. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin servers. If you are writing an HTTP server implementation, you will probably want to subclass this instead of :class:`BaseCGIHandler`.
.. class:: SimpleHandler(stdin, stdout, stderr, environ, multithread=True, multiprocess=False) Similar to :class:`BaseCGIHandler`, but designed for use with HTTP origin servers. If you are writing an HTTP server implementation, you will probably want to subclass this instead of :class:`BaseCGIHandler`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b386d1af-12d4-48b6-9671-925e792433ea
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,756
supabase-export-v2
62d4b1fdd175f78d
is the same as the length of the wrapped header list. In fact, the :meth:`items` method just returns a copy of the wrapped header list. Calling ``bytes()`` on a :class:`Headers` object returns a formatted bytestring suitable for transmission as HTTP response headers. Each header is placed on a line with its value, se...
trusted_official_docs
CPython Docs
is the same as the length of the wrapped header list. In fact, the :meth:`items` method just returns a copy of the wrapped header list. Calling ``bytes()`` on a :class:`Headers` object returns a formatted bytestring suitable for transmission as HTTP response headers. Each header is placed on a line with its value, se...
is the same as the length of the wrapped header list. In fact, the :meth:`items` method just returns a copy of the wrapped header list. Calling ``bytes()`` on a :class:`Headers` object returns a formatted bytestring suitable for transmission as HTTP response headers. Each header is placed on a line with its value, se...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b405de39-bcf0-44c8-be12-7a179f6da163
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,792
supabase-export-v2
ceae86c9a8250b8f
Create an HTTP handler for the given *request* (i.e. a socket), *client_address* (a ``(host,port)`` tuple), and *server* (:class:`WSGIServer` instance). You do not need to create instances of this class directly; they are automatically created as needed by :class:`WSGIServer` objects. You can, however, subclass this ...
trusted_official_docs
CPython Docs
Create an HTTP handler for the given *request* (i.e. a socket), *client_address* (a ``(host,port)`` tuple), and *server* (:class:`WSGIServer` instance). You do not need to create instances of this class directly; they are automatically created as needed by :class:`WSGIServer` objects. You can, however, subclass this ...
Create an HTTP handler for the given *request* (i.e. a socket), *client_address* (a ``(host,port)`` tuple), and *server* (:class:`WSGIServer` instance). You do not need to create instances of this class directly; they are automatically created as needed by :class:`WSGIServer` objects. You can, however, subclass this ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b4ecac65-cbf2-4a69-98f2-e306507a2d5b
CPython Docs
file://datasets/cpython/Doc/library/wsgiref.rst
unknown
deae5c25-3c54-49d0-9d17-4d2f8bbb530d
5,851
supabase-export-v2
5429f81aa9ea652f
every method that can be overridden. You should consult the docstrings and source code for additional information before attempting to create a customized :class:`BaseHandler` subclass. Attributes and methods for customizing the WSGI environment:
trusted_official_docs
CPython Docs
every method that can be overridden. You should consult the docstrings and source code for additional information before attempting to create a customized :class:`BaseHandler` subclass. Attributes and methods for customizing the WSGI environment:
every method that can be overridden. You should consult the docstrings and source code for additional information before attempting to create a customized :class:`BaseHandler` subclass. Attributes and methods for customizing the WSGI environment:
python, official-docs, cpython, P0
Local_Trusted_Corpus