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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b315f162-737b-4d1f-970c-af128c28d4d6 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,554 | supabase-export-v2 | 45aa3fe924f8494a | Create a collation named *name* using the collating function *callable*. *callable* is passed two :class:`string <str>` arguments, and it should return an :class:`integer <int>`:
* ``1`` if the first is ordered higher than the second
* ``-1`` if the first is ordered lower than the second
* ``0`` if they are ordered e... | trusted_official_docs | CPython Docs | Create a collation named *name* using the collating function *callable*. *callable* is passed two :class:`string <str>` arguments, and it should return an :class:`integer <int>`:
* ``1`` if the first is ordered higher than the second
* ``-1`` if the first is ordered lower than the second
* ``0`` if they are ordered e... | Create a collation named *name* using the collating function *callable*. *callable* is passed two :class:`string <str>` arguments, and it should return an :class:`integer <int>`:
* ``1`` if the first is ordered higher than the second
* ``-1`` if the first is ordered lower than the second
* ``0`` if they are ordered e... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b40be149-e0f3-4506-8f92-5a9e5c9698bd | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,538 | supabase-export-v2 | db2d8008a74b880e | ``inverse()``: Remove a row from the current window. * ``finalize()``: Return the final result of the aggregate as :ref:`a type natively supported by SQLite <sqlite3-types>`.
The number of arguments that the ``step()`` and ``value()`` methods
must accept is controlled by *num_params*. | trusted_official_docs | CPython Docs | ``inverse()``: Remove a row from the current window. * ``finalize()``: Return the final result of the aggregate as :ref:`a type natively supported by SQLite <sqlite3-types>`.
The number of arguments that the ``step()`` and ``value()`` methods
must accept is controlled by *num_params*. | ``inverse()``: Remove a row from the current window. * ``finalize()``: Return the final result of the aggregate as :ref:`a type natively supported by SQLite <sqlite3-types>`.
The number of arguments that the ``step()`` and ``value()`` methods
must accept is controlled by *num_params*. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b5c0035d-824e-4574-82da-d482e6c3fc89 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,418 | supabase-export-v2 | 6033b08968649b39 | during command-line input to determine if the entered text seems to form a complete SQL statement, or if additional input is needed before calling :meth:`~Cursor.execute`.
See :func:`!runsource` in :source:`Lib/sqlite3/__main__.py`
for real-world use. | trusted_official_docs | CPython Docs | during command-line input to determine if the entered text seems to form a complete SQL statement, or if additional input is needed before calling :meth:`~Cursor.execute`.
See :func:`!runsource` in :source:`Lib/sqlite3/__main__.py`
for real-world use. | during command-line input to determine if the entered text seems to form a complete SQL statement, or if additional input is needed before calling :meth:`~Cursor.execute`.
See :func:`!runsource` in :source:`Lib/sqlite3/__main__.py`
for real-world use. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b75d5190-ced6-4450-9326-d80f7f028e22 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,500 | supabase-export-v2 | 03fae4d6d50a6f4f | .. method:: close()
Close the database connection. If :attr:`autocommit` is ``False``,
any pending transaction is implicitly rolled back. If :attr:`!autocommit` is ``True`` or :data:`LEGACY_TRANSACTION_CONTROL`,
no implicit transaction control is executed. Make sure to :meth:`commit` before closing
to avoid losing p... | trusted_official_docs | CPython Docs | .. method:: close()
Close the database connection. If :attr:`autocommit` is ``False``,
any pending transaction is implicitly rolled back. If :attr:`!autocommit` is ``True`` or :data:`LEGACY_TRANSACTION_CONTROL`,
no implicit transaction control is executed. Make sure to :meth:`commit` before closing
to avoid losing p... | .. method:: close()
Close the database connection. If :attr:`autocommit` is ``False``,
any pending transaction is implicitly rolled back. If :attr:`!autocommit` is ``True`` or :data:`LEGACY_TRANSACTION_CONTROL`,
no implicit transaction control is executed. Make sure to :meth:`commit` before closing
to avoid losing p... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b8ce7e13-3df8-45fc-8fa3-d384b6cfd467 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,697 | supabase-export-v2 | 9fe99e9fbb234a3f | .. attribute:: isolation_level
Controls the :ref:`legacy transaction handling mode
<sqlite3-transaction-control-isolation-level>` of :mod:`!sqlite3`. If set to ``None``, transactions are never implicitly opened. If set to one of ``"DEFERRED"``, ``"IMMEDIATE"``, or ``"EXCLUSIVE"``,
corresponding to the underlying `SQL... | trusted_official_docs | CPython Docs | .. attribute:: isolation_level
Controls the :ref:`legacy transaction handling mode
<sqlite3-transaction-control-isolation-level>` of :mod:`!sqlite3`. If set to ``None``, transactions are never implicitly opened. If set to one of ``"DEFERRED"``, ``"IMMEDIATE"``, or ``"EXCLUSIVE"``,
corresponding to the underlying `SQL... | .. attribute:: isolation_level
Controls the :ref:`legacy transaction handling mode
<sqlite3-transaction-control-isolation-level>` of :mod:`!sqlite3`. If set to ``None``, transactions are never implicitly opened. If set to one of ``"DEFERRED"``, ``"IMMEDIATE"``, or ``"EXCLUSIVE"``,
corresponding to the underlying `SQL... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b955d16e-0e7f-40a1-afa5-27e1a8f387d1 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,464 | supabase-export-v2 | 5318a1ac6ba92dec | The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels are as follows:
+------------------+----------------------+----------------------+-------------------------------+
| SQLite threading | :pep:`threadsafety | `SQLITE_THREADSAFE`_ | DB-API 2.0 meaning |
| mode | <0249#threadsafety>` | | |
+====... | trusted_official_docs | CPython Docs | The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels are as follows:
+------------------+----------------------+----------------------+-------------------------------+
| SQLite threading | :pep:`threadsafety | `SQLITE_THREADSAFE`_ | DB-API 2.0 meaning |
| mode | <0249#threadsafety>` | | |
+====... | The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels are as follows:
+------------------+----------------------+----------------------+-------------------------------+
| SQLite threading | :pep:`threadsafety | `SQLITE_THREADSAFE`_ | DB-API 2.0 meaning |
| mode | <0249#threadsafety>` | | |
+====... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ba100bd3-4d45-427d-93b6-f57cc60e3323 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,402 | supabase-export-v2 | 5e1b87d70e883666 | may be accessed in multiple threads; write operations may need to be serialized by the user to avoid data corruption. See :attr:`threadsafety` for more information.
:param ~sqlite3.Connection factory:
A custom subclass of :class:`Connection` to create the connection with,
if not the default :class:`Connection` class. | trusted_official_docs | CPython Docs | may be accessed in multiple threads; write operations may need to be serialized by the user to avoid data corruption. See :attr:`threadsafety` for more information.
:param ~sqlite3.Connection factory:
A custom subclass of :class:`Connection` to create the connection with,
if not the default :class:`Connection` class. | may be accessed in multiple threads; write operations may need to be serialized by the user to avoid data corruption. See :attr:`threadsafety` for more information.
:param ~sqlite3.Connection factory:
A custom subclass of :class:`Connection` to create the connection with,
if not the default :class:`Connection` class. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ba1a2de0-5877-45c9-8d49-2b54fdfeb7f7 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,755 | supabase-export-v2 | dbd5084fe9bbdde2 | attribute. If the *size* parameter is used, then it is best for it to retain the same value from one :meth:`fetchmany` call to the next.
.. versionchanged:: 3.15
Negative *size* values are rejected by raising :exc:`ValueError`. | trusted_official_docs | CPython Docs | attribute. If the *size* parameter is used, then it is best for it to retain the same value from one :meth:`fetchmany` call to the next.
.. versionchanged:: 3.15
Negative *size* values are rejected by raising :exc:`ValueError`. | attribute. If the *size* parameter is used, then it is best for it to retain the same value from one :meth:`fetchmany` call to the next.
.. versionchanged:: 3.15
Negative *size* values are rejected by raising :exc:`ValueError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bb791cdf-24a4-4141-950c-e8decae9f1a5 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,485 | supabase-export-v2 | 8160f8ab7a643612 | object. The cursor method accepts a single optional parameter *factory*. If supplied, this must be a :term:`callable` returning an instance of :class:`Cursor` or its subclasses.
.. method:: blobopen(table, column, rowid, /, *, readonly=False, name="main") | trusted_official_docs | CPython Docs | object. The cursor method accepts a single optional parameter *factory*. If supplied, this must be a :term:`callable` returning an instance of :class:`Cursor` or its subclasses.
.. method:: blobopen(table, column, rowid, /, *, readonly=False, name="main") | object. The cursor method accepts a single optional parameter *factory*. If supplied, this must be a :term:`callable` returning an instance of :class:`Cursor` or its subclasses.
.. method:: blobopen(table, column, rowid, /, *, readonly=False, name="main") | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bb8e7cc9-8ce8-4f6a-82ad-392a151bcf4c | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,961 | supabase-export-v2 | 2ef944de9aeaa4ec | statement raises an uncaught exception, the transaction is rolled back. If :attr:`~Connection.autocommit` is ``False``, a new transaction is implicitly opened after committing or rolling back.
If there is no open transaction upon leaving the body of the ``with`` statement,
or if :attr:`~Connection.autocommit` is ``True... | trusted_official_docs | CPython Docs | statement raises an uncaught exception, the transaction is rolled back. If :attr:`~Connection.autocommit` is ``False``, a new transaction is implicitly opened after committing or rolling back.
If there is no open transaction upon leaving the body of the ``with`` statement,
or if :attr:`~Connection.autocommit` is ``True... | statement raises an uncaught exception, the transaction is rolled back. If :attr:`~Connection.autocommit` is ``False``, a new transaction is implicitly opened after committing or rolling back.
If there is no open transaction upon leaving the body of the ``with`` statement,
or if :attr:`~Connection.autocommit` is ``True... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bde6a18b-aeb8-4437-bd15-39c0d85a19dc | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,806 | supabase-export-v2 | efdc6e8a2c2a7296 | .. method:: read(length=-1, /)
Read *length* bytes of data from the blob at the current offset position. If the end of the blob is reached, the data up to
:abbr:`EOF (End of File)` will be returned. When *length* is not
specified, or is negative, :meth:`~Blob.read` will read until the end of
the blob. | trusted_official_docs | CPython Docs | .. method:: read(length=-1, /)
Read *length* bytes of data from the blob at the current offset position. If the end of the blob is reached, the data up to
:abbr:`EOF (End of File)` will be returned. When *length* is not
specified, or is negative, :meth:`~Blob.read` will read until the end of
the blob. | .. method:: read(length=-1, /)
Read *length* bytes of data from the blob at the current offset position. If the end of the blob is reached, the data up to
:abbr:`EOF (End of File)` will be returned. When *length* is not
specified, or is negative, :meth:`~Blob.read` will read until the end of
the blob. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c0819713-a7a1-4dcf-9170-5bb1283bc9fe | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,401 | supabase-export-v2 | a28ea6a7af8505f5 | or ``"IMMEDIATE"``; or ``None`` to disable opening transactions implicitly. Has no effect unless :attr:`Connection.autocommit` is set to :const:`~sqlite3.LEGACY_TRANSACTION_CONTROL` (the default). :type isolation_level: str | None
:param bool check_same_thread:
If ``True`` (default), :exc:`ProgrammingError` will be ra... | trusted_official_docs | CPython Docs | or ``"IMMEDIATE"``; or ``None`` to disable opening transactions implicitly. Has no effect unless :attr:`Connection.autocommit` is set to :const:`~sqlite3.LEGACY_TRANSACTION_CONTROL` (the default). :type isolation_level: str | None
:param bool check_same_thread:
If ``True`` (default), :exc:`ProgrammingError` will be ra... | or ``"IMMEDIATE"``; or ``None`` to disable opening transactions implicitly. Has no effect unless :attr:`Connection.autocommit` is set to :const:`~sqlite3.LEGACY_TRANSACTION_CONTROL` (the default). :type isolation_level: str | None
:param bool check_same_thread:
If ``True`` (default), :exc:`ProgrammingError` will be ra... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c1d18bfb-c4ab-4779-826b-31cd6ea8892b | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,517 | supabase-export-v2 | beb236d96f29dc42 | def md5sum(t): ... return hashlib.md5(t).hexdigest() >>> con = sqlite3.connect(":memory:") >>> con.create_function("md5", 1, md5sum) >>> for row in con.execute("SELECT md5(?)", (b"foo",)): ... print(row) ('acbd18db4cc2f85cedef654fccc4a4d8',) >>> con.close()
.. method:: create_aggregate(name, n_arg, aggregate_class, /) | trusted_official_docs | CPython Docs | def md5sum(t): ... return hashlib.md5(t).hexdigest() >>> con = sqlite3.connect(":memory:") >>> con.create_function("md5", 1, md5sum) >>> for row in con.execute("SELECT md5(?)", (b"foo",)): ... print(row) ('acbd18db4cc2f85cedef654fccc4a4d8',) >>> con.close()
.. method:: create_aggregate(name, n_arg, aggregate_class, /) | def md5sum(t): ... return hashlib.md5(t).hexdigest() >>> con = sqlite3.connect(":memory:") >>> con.create_function("md5", 1, md5sum) >>> for row in con.execute("SELECT md5(?)", (b"foo",)): ... print(row) ('acbd18db4cc2f85cedef654fccc4a4d8',) >>> con.close()
.. method:: create_aggregate(name, n_arg, aggregate_class, /) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c30598f8-591b-44ef-b11f-6d0e870ac2e0 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,337 | supabase-export-v2 | 67c1c3184ccd2015 | .. _sqlite3-intro:
SQLite is a C library that provides a lightweight disk-based database that
doesn't require a separate server process and allows accessing the database
using a nonstandard variant of the SQL query language. Some applications can use
SQLite for internal data storage. It's also possible to prototype an
... | trusted_official_docs | CPython Docs | .. _sqlite3-intro:
SQLite is a C library that provides a lightweight disk-based database that
doesn't require a separate server process and allows accessing the database
using a nonstandard variant of the SQL query language. Some applications can use
SQLite for internal data storage. It's also possible to prototype an
... | .. _sqlite3-intro:
SQLite is a C library that provides a lightweight disk-based database that
doesn't require a separate server process and allows accessing the database
using a nonstandard variant of the SQL query language. Some applications can use
SQLite for internal data storage. It's also possible to prototype an
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c46e9d9e-ae4b-489a-babe-203ecfa11c69 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,399 | supabase-export-v2 | 2ff31f9f93e8b584 | is locked. If another connection opens a transaction to modify a table, that table will be locked until the transaction is committed. Default five seconds.
:param int detect_types:
Control whether and how data types not
:ref:`natively supported by SQLite <sqlite3-types>`
are looked up to be converted to Python types... | trusted_official_docs | CPython Docs | is locked. If another connection opens a transaction to modify a table, that table will be locked until the transaction is committed. Default five seconds.
:param int detect_types:
Control whether and how data types not
:ref:`natively supported by SQLite <sqlite3-types>`
are looked up to be converted to Python types... | is locked. If another connection opens a transaction to modify a table, that table will be locked until the transaction is committed. Default five seconds.
:param int detect_types:
Control whether and how data types not
:ref:`natively supported by SQLite <sqlite3-types>`
are looked up to be converted to Python types... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c67855cb-2528-483d-b046-1ca976f5f07d | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,785 | supabase-export-v2 | 6070688de1e5d64a | See :ref:`sqlite3-howto-row-factory` for more details.
.. The sqlite3.Row example used to be a how-to. It has now been incorporated
into the Row reference. We keep the anchor here in order not to break
existing links. | trusted_official_docs | CPython Docs | See :ref:`sqlite3-howto-row-factory` for more details.
.. The sqlite3.Row example used to be a how-to. It has now been incorporated
into the Row reference. We keep the anchor here in order not to break
existing links. | See :ref:`sqlite3-howto-row-factory` for more details.
.. The sqlite3.Row example used to be a how-to. It has now been incorporated
into the Row reference. We keep the anchor here in order not to break
existing links. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c775d6bf-94b8-4a3b-a858-a3d7d9e36936 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 4,038 | supabase-export-v2 | aa2bee12aef86a70 | .. versionchanged:: 3.6 :mod:`!sqlite3` used to implicitly commit an open transaction before DDL statements. This is no longer the case.
.. versionchanged:: 3.12
The recommended way of controlling transactions is now via the
:attr:`~Connection.autocommit` attribute. | trusted_official_docs | CPython Docs | .. versionchanged:: 3.6 :mod:`!sqlite3` used to implicitly commit an open transaction before DDL statements. This is no longer the case.
.. versionchanged:: 3.12
The recommended way of controlling transactions is now via the
:attr:`~Connection.autocommit` attribute. | .. versionchanged:: 3.6 :mod:`!sqlite3` used to implicitly commit an open transaction before DDL statements. This is no longer the case.
.. versionchanged:: 3.12
The recommended way of controlling transactions is now via the
:attr:`~Connection.autocommit` attribute. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c7ef87b6-6e02-4de7-ba58-7d95e283e5d5 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,754 | supabase-export-v2 | 0de1046e33c26ab8 | given, :attr:`arraysize` determines the number of rows to be fetched. If fewer than *size* rows are available, as many rows as are available are returned.
Note there are performance considerations involved with the *size* parameter. For optimal performance, it is usually best to use the arraysize attribute. If the *siz... | trusted_official_docs | CPython Docs | given, :attr:`arraysize` determines the number of rows to be fetched. If fewer than *size* rows are available, as many rows as are available are returned.
Note there are performance considerations involved with the *size* parameter. For optimal performance, it is usually best to use the arraysize attribute. If the *siz... | given, :attr:`arraysize` determines the number of rows to be fetched. If fewer than *size* rows are available, as many rows as are available are returned.
Note there are performance considerations involved with the *size* parameter. For optimal performance, it is usually best to use the arraysize attribute. If the *siz... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c81d4e47-4f27-4dde-beab-09b7dc335b8d | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,427 | supabase-export-v2 | 454536bbd95ff062 | :class:`bytes` object and should return an object of the desired Python type. Consult the parameter *detect_types* of :func:`connect` for information regarding how type detection works.
Note: *typename* and the name of the type in your query are matched
case-insensitively. | trusted_official_docs | CPython Docs | :class:`bytes` object and should return an object of the desired Python type. Consult the parameter *detect_types* of :func:`connect` for information regarding how type detection works.
Note: *typename* and the name of the type in your query are matched
case-insensitively. | :class:`bytes` object and should return an object of the desired Python type. Consult the parameter *detect_types* of :func:`connect` for information regarding how type detection works.
Note: *typename* and the name of the type in your query are matched
case-insensitively. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c8d78e98-e115-41fb-ba49-a36f25226ddb | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,370 | supabase-export-v2 | a8f4b165947ac6b8 | con.commit()
We can verify that the data was inserted correctly
by executing a ``SELECT`` query. Use the now-familiar :meth:`cur.execute(...) <Cursor.execute>` to
assign the result to ``res``,
and call :meth:`res.fetchall() <Cursor.fetchall>` to return all resulting rows: | trusted_official_docs | CPython Docs | con.commit()
We can verify that the data was inserted correctly
by executing a ``SELECT`` query. Use the now-familiar :meth:`cur.execute(...) <Cursor.execute>` to
assign the result to ``res``,
and call :meth:`res.fetchall() <Cursor.fetchall>` to return all resulting rows: | con.commit()
We can verify that the data was inserted correctly
by executing a ``SELECT`` query. Use the now-familiar :meth:`cur.execute(...) <Cursor.execute>` to
assign the result to ``res``,
and call :meth:`res.fetchall() <Cursor.fetchall>` to return all resulting rows: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c9ee9cbf-ad80-494d-9bd1-9ec6708ab933 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 4,033 | supabase-export-v2 | e9400e782065829a | The recommended way of controlling transactions is via the :attr:`~Connection.autocommit` attribute. See :ref:`sqlite3-transaction-control-autocommit`.
If :attr:`Connection.autocommit` is set to
:data:`LEGACY_TRANSACTION_CONTROL` (the default),
transaction behaviour is controlled using
the :attr:`Connection.isolation_l... | trusted_official_docs | CPython Docs | The recommended way of controlling transactions is via the :attr:`~Connection.autocommit` attribute. See :ref:`sqlite3-transaction-control-autocommit`.
If :attr:`Connection.autocommit` is set to
:data:`LEGACY_TRANSACTION_CONTROL` (the default),
transaction behaviour is controlled using
the :attr:`Connection.isolation_l... | The recommended way of controlling transactions is via the :attr:`~Connection.autocommit` attribute. See :ref:`sqlite3-transaction-control-autocommit`.
If :attr:`Connection.autocommit` is set to
:data:`LEGACY_TRANSACTION_CONTROL` (the default),
transaction behaviour is controlled using
the :attr:`Connection.isolation_l... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cb17fa0a-72a7-4836-a543-cfd0a477d41a | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,797 | supabase-export-v2 | ac64525ce8b3bb7f | Call :func:`len(blob) <len>` to get the size (number of bytes) of the blob. Use indices and :term:`slices <slice>` for direct access to the blob data.
Use the :class:`Blob` as a :term:`context manager` to ensure that the blob
handle is closed after use. | trusted_official_docs | CPython Docs | Call :func:`len(blob) <len>` to get the size (number of bytes) of the blob. Use indices and :term:`slices <slice>` for direct access to the blob data.
Use the :class:`Blob` as a :term:`context manager` to ensure that the blob
handle is closed after use. | Call :func:`len(blob) <len>` to get the size (number of bytes) of the blob. Use indices and :term:`slices <slice>` for direct access to the blob data.
Use the :class:`Blob` as a :term:`context manager` to ensure that the blob
handle is closed after use. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cb9451ea-d380-41e8-aa37-1a1f9b2bb939 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,960 | supabase-export-v2 | 04348b5b33ebb86e | How to use the connection context manager ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A :class:`Connection` object can be used as a context manager that
automatically commits or rolls back open transactions when leaving the body of
the context manager. If the body of the :keyword:`with` statement finishes without excepti... | trusted_official_docs | CPython Docs | How to use the connection context manager ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A :class:`Connection` object can be used as a context manager that
automatically commits or rolls back open transactions when leaving the body of
the context manager. If the body of the :keyword:`with` statement finishes without excepti... | How to use the connection context manager ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A :class:`Connection` object can be used as a context manager that
automatically commits or rolls back open transactions when leaving the body of
the context manager. If the body of the :keyword:`with` statement finishes without excepti... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cd769d92-902f-438b-a4d8-adc175cce12f | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 4,026 | supabase-export-v2 | 278a501d972e7f67 | It is suggested to set *autocommit* to ``False``, which implies :pep:`249`-compliant transaction control. This means:
* :mod:`!sqlite3` ensures that a transaction is always open,
so :func:`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback`
will implicitly open a new transaction
(immediately after c... | trusted_official_docs | CPython Docs | It is suggested to set *autocommit* to ``False``, which implies :pep:`249`-compliant transaction control. This means:
* :mod:`!sqlite3` ensures that a transaction is always open,
so :func:`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback`
will implicitly open a new transaction
(immediately after c... | It is suggested to set *autocommit* to ``False``, which implies :pep:`249`-compliant transaction control. This means:
* :mod:`!sqlite3` ensures that a transaction is always open,
so :func:`connect`, :meth:`Connection.commit`, and :meth:`Connection.rollback`
will implicitly open a new transaction
(immediately after c... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ce693cf8-2994-49f7-b5bf-f5a98ed05af1 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,908 | supabase-export-v2 | 54a3af19f3b21043 | lets you convert *from* custom Python types *to* SQLite values. To be able to convert *from* SQLite values *to* custom Python types, we use *converters*.
Let's go back to the :class:`!Point` class. We stored the x and y coordinates
separated via semicolons as strings in SQLite. | trusted_official_docs | CPython Docs | lets you convert *from* custom Python types *to* SQLite values. To be able to convert *from* SQLite values *to* custom Python types, we use *converters*.
Let's go back to the :class:`!Point` class. We stored the x and y coordinates
separated via semicolons as strings in SQLite. | lets you convert *from* custom Python types *to* SQLite values. To be able to convert *from* SQLite values *to* custom Python types, we use *converters*.
Let's go back to the :class:`!Point` class. We stored the x and y coordinates
separated via semicolons as strings in SQLite. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cf1dd60e-3b64-4571-be56-4de16e901978 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,916 | supabase-export-v2 | 0dd827cb22ee115b | set *detect_types* to :const:`PARSE_DECLTYPES` * Explicit: set *detect_types* to :const:`PARSE_COLNAMES` * Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES``. Column names take precedence over declared types.
The following example illustrates the implicit and explicit approaches: | trusted_official_docs | CPython Docs | set *detect_types* to :const:`PARSE_DECLTYPES` * Explicit: set *detect_types* to :const:`PARSE_COLNAMES` * Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES``. Column names take precedence over declared types.
The following example illustrates the implicit and explicit approaches: | set *detect_types* to :const:`PARSE_DECLTYPES` * Explicit: set *detect_types* to :const:`PARSE_COLNAMES` * Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES``. Column names take precedence over declared types.
The following example illustrates the implicit and explicit approaches: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d377efef-1708-4d9e-8134-678781030fe0 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,596 | supabase-export-v2 | a565891881b1b492 | # disable extension loading again con.enable_load_extension(False)
# example from SQLite wiki
con.execute("CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients)")
con.executescript("""
INSERT INTO recipe (name, ingredients) VALUES('broccoli stew', 'broccoli peppers cheese tomatoes');
INSERT INTO recipe (name, i... | trusted_official_docs | CPython Docs | # disable extension loading again con.enable_load_extension(False)
# example from SQLite wiki
con.execute("CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients)")
con.executescript("""
INSERT INTO recipe (name, ingredients) VALUES('broccoli stew', 'broccoli peppers cheese tomatoes');
INSERT INTO recipe (name, i... | # disable extension loading again con.enable_load_extension(False)
# example from SQLite wiki
con.execute("CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients)")
con.executescript("""
INSERT INTO recipe (name, ingredients) VALUES('broccoli stew', 'broccoli peppers cheese tomatoes');
INSERT INTO recipe (name, i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d3bc7b99-ae52-4d1b-8b06-f8ff94984cd6 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,890 | supabase-export-v2 | 71c91bb7bca228fa | How to write adaptable objects """"""""""""""""""""""""""""""
Suppose we have a :class:`!Point` class that represents a pair of coordinates,
``x`` and ``y``, in a Cartesian coordinate system. The coordinate pair will be stored as a text string in the database,
using a semicolon to separate the coordinates. This can be ... | trusted_official_docs | CPython Docs | How to write adaptable objects """"""""""""""""""""""""""""""
Suppose we have a :class:`!Point` class that represents a pair of coordinates,
``x`` and ``y``, in a Cartesian coordinate system. The coordinate pair will be stored as a text string in the database,
using a semicolon to separate the coordinates. This can be ... | How to write adaptable objects """"""""""""""""""""""""""""""
Suppose we have a :class:`!Point` class that represents a pair of coordinates,
``x`` and ``y``, in a Cartesian coordinate system. The coordinate pair will be stored as a text string in the database,
using a semicolon to separate the coordinates. This can be ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d4e3b29b-2cb7-4b19-91d3-aaa4507120f3 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 4,006 | supabase-export-v2 | 67ca9b0ee3e1cb18 | 2 AS b") >>> row = cur.fetchone() >>> row Row(a=1, b=2) >>> row[0] # Indexed access. 1 >>> row.b # Attribute access. 2 >>> con.close()
With some adjustments, the above recipe can be adapted to use a
:class:`~dataclasses.dataclass`, or any other custom class,
instead of a :class:`~collections.namedtuple`. | trusted_official_docs | CPython Docs | 2 AS b") >>> row = cur.fetchone() >>> row Row(a=1, b=2) >>> row[0] # Indexed access. 1 >>> row.b # Attribute access. 2 >>> con.close()
With some adjustments, the above recipe can be adapted to use a
:class:`~dataclasses.dataclass`, or any other custom class,
instead of a :class:`~collections.namedtuple`. | 2 AS b") >>> row = cur.fetchone() >>> row Row(a=1, b=2) >>> row[0] # Indexed access. 1 >>> row.b # Attribute access. 2 >>> con.close()
With some adjustments, the above recipe can be adapted to use a
:class:`~dataclasses.dataclass`, or any other custom class,
instead of a :class:`~collections.namedtuple`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d647b9b9-cf0e-4dc1-a19e-62169a0934ba | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,436 | supabase-export-v2 | 5efa91ef43dcb793 | a converter named "integer" p point, ! will look up a converter named "point" n number(10) ! will look up a converter named "number" )
This flag may be combined with :const:`PARSE_COLNAMES` using the ``|``
(bitwise or) operator. | trusted_official_docs | CPython Docs | a converter named "integer" p point, ! will look up a converter named "point" n number(10) ! will look up a converter named "number" )
This flag may be combined with :const:`PARSE_COLNAMES` using the ``|``
(bitwise or) operator. | a converter named "integer" p point, ! will look up a converter named "point" n number(10) ! will look up a converter named "number" )
This flag may be combined with :const:`PARSE_COLNAMES` using the ``|``
(bitwise or) operator. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d7101184-47ee-4e78-9938-556138c15a24 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,420 | supabase-export-v2 | fa1729036bba7f5e | .. function:: enable_callback_tracebacks(flag, /)
Enable or disable callback tracebacks. By default you will not get any tracebacks in user-defined functions,
aggregates, converters, authorizer callbacks etc. If you want to debug them,
you can call this function with *flag* set to ``True``. Afterwards, you
will get ... | trusted_official_docs | CPython Docs | .. function:: enable_callback_tracebacks(flag, /)
Enable or disable callback tracebacks. By default you will not get any tracebacks in user-defined functions,
aggregates, converters, authorizer callbacks etc. If you want to debug them,
you can call this function with *flag* set to ``True``. Afterwards, you
will get ... | .. function:: enable_callback_tracebacks(flag, /)
Enable or disable callback tracebacks. By default you will not get any tracebacks in user-defined functions,
aggregates, converters, authorizer callbacks etc. If you want to debug them,
you can call this function with *flag* set to ``True``. Afterwards, you
will get ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d78ba7fa-57c5-4fdf-9e00-a3430b362a78 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,819 | supabase-export-v2 | b1c60b3f3bcf952f | .. exception:: Warning
This exception is not currently raised by the :mod:`!sqlite3` module,
but may be raised by applications using :mod:`!sqlite3`,
for example if a user-defined function truncates data while inserting. ``Warning`` is a subclass of :exc:`Exception`. | trusted_official_docs | CPython Docs | .. exception:: Warning
This exception is not currently raised by the :mod:`!sqlite3` module,
but may be raised by applications using :mod:`!sqlite3`,
for example if a user-defined function truncates data while inserting. ``Warning`` is a subclass of :exc:`Exception`. | .. exception:: Warning
This exception is not currently raised by the :mod:`!sqlite3` module,
but may be raised by applications using :mod:`!sqlite3`,
for example if a user-defined function truncates data while inserting. ``Warning`` is a subclass of :exc:`Exception`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d93d4fbb-a469-4ec7-81bc-4076c35e7e39 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,808 | supabase-export-v2 | 1b525c8315dbab83 | .. method:: write(data, /)
Write *data* to the blob at the current offset. This function cannot
change the blob length. Writing beyond the end of the blob will raise
:exc:`ValueError`. | trusted_official_docs | CPython Docs | .. method:: write(data, /)
Write *data* to the blob at the current offset. This function cannot
change the blob length. Writing beyond the end of the blob will raise
:exc:`ValueError`. | .. method:: write(data, /)
Write *data* to the blob at the current offset. This function cannot
change the blob length. Writing beyond the end of the blob will raise
:exc:`ValueError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d97bdbd9-7acf-41b4-a559-81626f5fca1c | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,510 | supabase-export-v2 | 83f4a145ef8a888b | :param str name: The name of the SQL function.
:param int narg:
The number of arguments the SQL function can accept. If ``-1``, it may take any number of arguments. | trusted_official_docs | CPython Docs | :param str name: The name of the SQL function.
:param int narg:
The number of arguments the SQL function can accept. If ``-1``, it may take any number of arguments. | :param str name: The name of the SQL function.
:param int narg:
The number of arguments the SQL function can accept. If ``-1``, it may take any number of arguments. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dc413feb-e190-4951-8477-e156e91109a8 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,914 | supabase-export-v2 | 8037edee0df12f07 | def convert_point(s): x, y = map(float, s.split(b";")) return Point(x, y)
We now need to tell :mod:`!sqlite3` when it should convert a given SQLite value. This is done when connecting to a database, using the *detect_types* parameter
of :func:`connect`. There are three options: | trusted_official_docs | CPython Docs | def convert_point(s): x, y = map(float, s.split(b";")) return Point(x, y)
We now need to tell :mod:`!sqlite3` when it should convert a given SQLite value. This is done when connecting to a database, using the *detect_types* parameter
of :func:`connect`. There are three options: | def convert_point(s): x, y = map(float, s.split(b";")) return Point(x, y)
We now need to tell :mod:`!sqlite3` when it should convert a given SQLite value. This is done when connecting to a database, using the *detect_types* parameter
of :func:`connect`. There are three options: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ddc41b18-10d5-4c93-b4e5-3a7b1c8b7c84 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,985 | supabase-export-v2 | a7df9678a782211f | :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :class:`!tuple` does not suit your needs, you can use the :class:`sqlite3.Row` class or a custom :attr:`~Cursor.row_factory`.
While :attr:`!row_factory` exists as an attribute both on the
:class:`Cursor` and the :class:`Connection`,
it is recommended to set ... | trusted_official_docs | CPython Docs | :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :class:`!tuple` does not suit your needs, you can use the :class:`sqlite3.Row` class or a custom :attr:`~Cursor.row_factory`.
While :attr:`!row_factory` exists as an attribute both on the
:class:`Cursor` and the :class:`Connection`,
it is recommended to set ... | :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :class:`!tuple` does not suit your needs, you can use the :class:`sqlite3.Row` class or a custom :attr:`~Cursor.row_factory`.
While :attr:`!row_factory` exists as an attribute both on the
:class:`Cursor` and the :class:`Connection`,
it is recommended to set ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
deb8e7f1-d722-49c4-8a3c-a4b5cd5ff939 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,832 | supabase-export-v2 | 363c28558913115d | .. exception:: DatabaseError
Exception raised for errors that are related to the database. This serves as the base exception for several types of database errors. It is only raised implicitly through the specialised subclasses. ``DatabaseError`` is a subclass of :exc:`Error`. | trusted_official_docs | CPython Docs | .. exception:: DatabaseError
Exception raised for errors that are related to the database. This serves as the base exception for several types of database errors. It is only raised implicitly through the specialised subclasses. ``DatabaseError`` is a subclass of :exc:`Error`. | .. exception:: DatabaseError
Exception raised for errors that are related to the database. This serves as the base exception for several types of database errors. It is only raised implicitly through the specialised subclasses. ``DatabaseError`` is a subclass of :exc:`Error`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
df089e91-3984-4fc0-ac10-de674160e1b4 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,736 | supabase-export-v2 | 1343ec2adacd8946 | :param parameters: An :term:`!iterable` of parameters to bind with the placeholders in *sql*. See :ref:`sqlite3-placeholders`. :type parameters: :term:`iterable`
:raises ProgrammingError:
When *sql* contains more than one SQL statement
or is not a DML statement,
When :ref:`named placeholders <sqlite3-placeholders>` ... | trusted_official_docs | CPython Docs | :param parameters: An :term:`!iterable` of parameters to bind with the placeholders in *sql*. See :ref:`sqlite3-placeholders`. :type parameters: :term:`iterable`
:raises ProgrammingError:
When *sql* contains more than one SQL statement
or is not a DML statement,
When :ref:`named placeholders <sqlite3-placeholders>` ... | :param parameters: An :term:`!iterable` of parameters to bind with the placeholders in *sql*. See :ref:`sqlite3-placeholders`. :type parameters: :term:`iterable`
:raises ProgrammingError:
When *sql* contains more than one SQL statement
or is not a DML statement,
When :ref:`named placeholders <sqlite3-placeholders>` ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
df5a9219-1b8c-4c87-846c-1c6bf27fdf9b | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,750 | supabase-export-v2 | 3101ab98480b9b83 | .. method:: fetchone()
If :attr:`~Cursor.row_factory` is ``None``,
return the next row query result set as a :class:`tuple`. Else, pass it to the row factory and return its result. Return ``None`` if no more data is available. | trusted_official_docs | CPython Docs | .. method:: fetchone()
If :attr:`~Cursor.row_factory` is ``None``,
return the next row query result set as a :class:`tuple`. Else, pass it to the row factory and return its result. Return ``None`` if no more data is available. | .. method:: fetchone()
If :attr:`~Cursor.row_factory` is ``None``,
return the next row query result set as a :class:`tuple`. Else, pass it to the row factory and return its result. Return ``None`` if no more data is available. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e0a13e6b-39dc-40af-ac48-aaebfeed003b | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,842 | supabase-export-v2 | d1d678158e4333f9 | .. exception:: ProgrammingError
Exception raised for :mod:`!sqlite3` API programming errors,
for example supplying the wrong number of bindings to a query,
or trying to operate on a closed :class:`Connection`. ``ProgrammingError`` is a subclass of :exc:`DatabaseError`. | trusted_official_docs | CPython Docs | .. exception:: ProgrammingError
Exception raised for :mod:`!sqlite3` API programming errors,
for example supplying the wrong number of bindings to a query,
or trying to operate on a closed :class:`Connection`. ``ProgrammingError`` is a subclass of :exc:`DatabaseError`. | .. exception:: ProgrammingError
Exception raised for :mod:`!sqlite3` API programming errors,
for example supplying the wrong number of bindings to a query,
or trying to operate on a closed :class:`Connection`. ``ProgrammingError`` is a subclass of :exc:`DatabaseError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e3b8edfd-1271-44bf-b7d7-08fcca82fd27 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,880 | supabase-export-v2 | 56201f319cd12821 | con = sqlite3.connect(":memory:") cur = con.execute("CREATE TABLE lang(name, first_appeared)")
# This is the named style used with executemany():
data = (
{"name": "C", "year": 1972},
{"name": "Fortran", "year": 1957},
{"name": "Python", "year": 1991},
{"name": "Go", "year": 2009},
)
cur.executemany("INSERT INTO... | trusted_official_docs | CPython Docs | con = sqlite3.connect(":memory:") cur = con.execute("CREATE TABLE lang(name, first_appeared)")
# This is the named style used with executemany():
data = (
{"name": "C", "year": 1972},
{"name": "Fortran", "year": 1957},
{"name": "Python", "year": 1991},
{"name": "Go", "year": 2009},
)
cur.executemany("INSERT INTO... | con = sqlite3.connect(":memory:") cur = con.execute("CREATE TABLE lang(name, first_appeared)")
# This is the named style used with executemany():
data = (
{"name": "C", "year": 1972},
{"name": "Fortran", "year": 1957},
{"name": "Python", "year": 1991},
{"name": "Go", "year": 2009},
)
cur.executemany("INSERT INTO... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e3cd7945-161a-4dd3-af13-f86661c74d88 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,946 | supabase-export-v2 | b91b2821763eccbc | assert adapt_datetime_iso(when) == "2019-05-18T15:17:08.123456" assert convert_datetime(b"2019-05-18T15:17:08.123456") == when
# Using current time as fromtimestamp() returns local date/time. # Dropping microseconds as adapt_datetime_epoch truncates fractional second part. now = dt.datetime.now().replace(microsecond=0)... | trusted_official_docs | CPython Docs | assert adapt_datetime_iso(when) == "2019-05-18T15:17:08.123456" assert convert_datetime(b"2019-05-18T15:17:08.123456") == when
# Using current time as fromtimestamp() returns local date/time. # Dropping microseconds as adapt_datetime_epoch truncates fractional second part. now = dt.datetime.now().replace(microsecond=0)... | assert adapt_datetime_iso(when) == "2019-05-18T15:17:08.123456" assert convert_datetime(b"2019-05-18T15:17:08.123456") == when
# Using current time as fromtimestamp() returns local date/time. # Dropping microseconds as adapt_datetime_epoch truncates fractional second part. now = dt.datetime.now().replace(microsecond=0)... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e4801034-0dc6-49bc-a7ba-e7ba86868a01 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,745 | supabase-export-v2 | 6716e35ec463ba3f | .. method:: executescript(sql_script, /)
Execute the SQL statements in *sql_script*. If the :attr:`~Connection.autocommit` is
:data:`LEGACY_TRANSACTION_CONTROL`
and there is a pending transaction,
an implicit ``COMMIT`` statement is executed first. No other implicit transaction control is performed;
any transaction... | trusted_official_docs | CPython Docs | .. method:: executescript(sql_script, /)
Execute the SQL statements in *sql_script*. If the :attr:`~Connection.autocommit` is
:data:`LEGACY_TRANSACTION_CONTROL`
and there is a pending transaction,
an implicit ``COMMIT`` statement is executed first. No other implicit transaction control is performed;
any transaction... | .. method:: executescript(sql_script, /)
Execute the SQL statements in *sql_script*. If the :attr:`~Connection.autocommit` is
:data:`LEGACY_TRANSACTION_CONTROL`
and there is a pending transaction,
an implicit ``COMMIT`` statement is executed first. No other implicit transaction control is performed;
any transaction... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e4f062dc-de0a-44f3-a0b5-49964434a4e7 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,362 | supabase-export-v2 | c91325c90648df50 | >>> res = cur.execute("SELECT name FROM sqlite_master") >>> res.fetchone() ('movie',)
We can see that the table has been created,
as the query returns a :class:`tuple` containing the table's name. If we query ``sqlite_master`` for a non-existent table ``spam``,
:meth:`!res.fetchone` will return ``None``: | trusted_official_docs | CPython Docs | >>> res = cur.execute("SELECT name FROM sqlite_master") >>> res.fetchone() ('movie',)
We can see that the table has been created,
as the query returns a :class:`tuple` containing the table's name. If we query ``sqlite_master`` for a non-existent table ``spam``,
:meth:`!res.fetchone` will return ``None``: | >>> res = cur.execute("SELECT name FROM sqlite_master") >>> res.fetchone() ('movie',)
We can see that the table has been created,
as the query returns a :class:`tuple` containing the table's name. If we query ``sqlite_master`` for a non-existent table ``spam``,
:meth:`!res.fetchone` will return ``None``: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e6b530a3-6f24-434d-a447-7231a6dd5c58 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,834 | supabase-export-v2 | 548c1de58ea0cf0e | .. exception:: DataError
Exception raised for errors caused by problems with the processed data,
like numeric values out of range, and strings which are too long. ``DataError`` is a subclass of :exc:`DatabaseError`. | trusted_official_docs | CPython Docs | .. exception:: DataError
Exception raised for errors caused by problems with the processed data,
like numeric values out of range, and strings which are too long. ``DataError`` is a subclass of :exc:`DatabaseError`. | .. exception:: DataError
Exception raised for errors caused by problems with the processed data,
like numeric values out of range, and strings which are too long. ``DataError`` is a subclass of :exc:`DatabaseError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e6b7dc5d-c788-405e-bae4-8076234da35e | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,978 | supabase-export-v2 | 79e87fbfa230fde1 | .. testcode::
db = "file:mem1?mode=memory&cache=shared"
con1 = sqlite3.connect(db, uri=True)
con2 = sqlite3.connect(db, uri=True)
with con1:
con1.execute("CREATE TABLE shared(data)")
con1.execute("INSERT INTO shared VALUES(28)")
res = con2.execute("SELECT data FROM shared")
assert res.fetchone() == (28,) | trusted_official_docs | CPython Docs | .. testcode::
db = "file:mem1?mode=memory&cache=shared"
con1 = sqlite3.connect(db, uri=True)
con2 = sqlite3.connect(db, uri=True)
with con1:
con1.execute("CREATE TABLE shared(data)")
con1.execute("INSERT INTO shared VALUES(28)")
res = con2.execute("SELECT data FROM shared")
assert res.fetchone() == (28,) | .. testcode::
db = "file:mem1?mode=memory&cache=shared"
con1 = sqlite3.connect(db, uri=True)
con2 = sqlite3.connect(db, uri=True)
with con1:
con1.execute("CREATE TABLE shared(data)")
con1.execute("INSERT INTO shared VALUES(28)")
res = con2.execute("SELECT data FROM shared")
assert res.fetchone() == (28,) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e9340054-4ee7-4f4d-92e8-244396d17e11 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,881 | supabase-export-v2 | b260dc9140c20577 | = ( {"name": "C", "year": 1972}, {"name": "Fortran", "year": 1957}, {"name": "Python", "year": 1991}, {"name": "Go", "year": 2009}, ) cur.executemany("INSERT INTO lang VALUES(:name, :year)", data)
# This is the qmark style used in a SELECT query:
params = (1972,)
cur.execute("SELECT * FROM lang WHERE first_appeared =... | trusted_official_docs | CPython Docs | = ( {"name": "C", "year": 1972}, {"name": "Fortran", "year": 1957}, {"name": "Python", "year": 1991}, {"name": "Go", "year": 2009}, ) cur.executemany("INSERT INTO lang VALUES(:name, :year)", data)
# This is the qmark style used in a SELECT query:
params = (1972,)
cur.execute("SELECT * FROM lang WHERE first_appeared =... | = ( {"name": "C", "year": 1972}, {"name": "Fortran", "year": 1957}, {"name": "Python", "year": 1991}, {"name": "Go", "year": 2009}, ) cur.executemany("INSERT INTO lang VALUES(:name, :year)", data)
# This is the qmark style used in a SELECT query:
params = (1972,)
cur.execute("SELECT * FROM lang WHERE first_appeared =... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e9bba710-8e73-45f7-9d38-ffc239bccb22 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,997 | supabase-export-v2 | f55a5e938c3d58ce | def dict_factory(cursor, row): fields = [column[0] for column in cursor.description] return {key: value for key, value in zip(fields, row)}
Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`: | trusted_official_docs | CPython Docs | def dict_factory(cursor, row): fields = [column[0] for column in cursor.description] return {key: value for key, value in zip(fields, row)}
Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`: | def dict_factory(cursor, row): fields = [column[0] for column in cursor.description] return {key: value for key, value in zip(fields, row)}
Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ea2974f5-879e-435b-a175-5ede32bffa29 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,783 | supabase-export-v2 | f482ac59e6118c28 | or a :term:`callable` that accepts two arguments, a :class:`Cursor` object and the :class:`!tuple` of row values, and returns a custom object representing an SQLite row.
Defaults to what :attr:`Connection.row_factory` was set to
when the :class:`!Cursor` was created. Assigning to this attribute does not affect
:attr:... | trusted_official_docs | CPython Docs | or a :term:`callable` that accepts two arguments, a :class:`Cursor` object and the :class:`!tuple` of row values, and returns a custom object representing an SQLite row.
Defaults to what :attr:`Connection.row_factory` was set to
when the :class:`!Cursor` was created. Assigning to this attribute does not affect
:attr:... | or a :term:`callable` that accepts two arguments, a :class:`Cursor` object and the :class:`!tuple` of row values, and returns a custom object representing an SQLite row.
Defaults to what :attr:`Connection.row_factory` was set to
when the :class:`!Cursor` was created. Assigning to this attribute does not affect
:attr:... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
edd71367-237b-4ed9-a5de-2e9534feed05 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,898 | supabase-export-v2 | 6b85de4beb575271 | How to register adapter callables """""""""""""""""""""""""""""""""
The other possibility is to create a function that converts the Python object
to an SQLite-compatible type. This function can then be registered using :func:`register_adapter`. | trusted_official_docs | CPython Docs | How to register adapter callables """""""""""""""""""""""""""""""""
The other possibility is to create a function that converts the Python object
to an SQLite-compatible type. This function can then be registered using :func:`register_adapter`. | How to register adapter callables """""""""""""""""""""""""""""""""
The other possibility is to create a function that converts the Python object
to an SQLite-compatible type. This function can then be registered using :func:`register_adapter`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ee1cb9af-373d-470c-a39a-330a553f2f97 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,425 | supabase-export-v2 | 054f5456bad92be8 | called with a Python object of type *type* as its sole argument, and must return a value of a :ref:`type that SQLite natively understands <sqlite3-types>`.
.. function:: register_converter(typename, converter, /) | trusted_official_docs | CPython Docs | called with a Python object of type *type* as its sole argument, and must return a value of a :ref:`type that SQLite natively understands <sqlite3-types>`.
.. function:: register_converter(typename, converter, /) | called with a Python object of type *type* as its sole argument, and must return a value of a :ref:`type that SQLite natively understands <sqlite3-types>`.
.. function:: register_converter(typename, converter, /) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
eff85c12-3d59-44d3-b339-5995b51130e8 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,849 | supabase-export-v2 | 1e2226019f61e1b4 | The following Python types can thus be sent to SQLite without any problem:
+-------------------------------+-------------+
| Python type | SQLite type |
+===============================+=============+
| ``None`` | ``NULL`` |
+-------------------------------+-------------+
| :class:`int` | ``INTEGER`` |
+---------------... | trusted_official_docs | CPython Docs | The following Python types can thus be sent to SQLite without any problem:
+-------------------------------+-------------+
| Python type | SQLite type |
+===============================+=============+
| ``None`` | ``NULL`` |
+-------------------------------+-------------+
| :class:`int` | ``INTEGER`` |
+---------------... | The following Python types can thus be sent to SQLite without any problem:
+-------------------------------+-------------+
| Python type | SQLite type |
+===============================+=============+
| ``None`` | ``NULL`` |
+-------------------------------+-------------+
| :class:`int` | ``INTEGER`` |
+---------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f10fb2d4-935a-414c-b1d9-9dbaec1cda44 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,711 | supabase-export-v2 | 39192a8b1100da59 | Cursor objects ^^^^^^^^^^^^^^
A ``Cursor`` object represents a `database cursor`_
which is used to execute SQL statements,
and manage the context of a fetch operation. Cursors are created using :meth:`Connection.cursor`,
or by using any of the :ref:`connection shortcut methods
<sqlite3-connection-shortcuts>`. | trusted_official_docs | CPython Docs | Cursor objects ^^^^^^^^^^^^^^
A ``Cursor`` object represents a `database cursor`_
which is used to execute SQL statements,
and manage the context of a fetch operation. Cursors are created using :meth:`Connection.cursor`,
or by using any of the :ref:`connection shortcut methods
<sqlite3-connection-shortcuts>`. | Cursor objects ^^^^^^^^^^^^^^
A ``Cursor`` object represents a `database cursor`_
which is used to execute SQL statements,
and manage the context of a fetch operation. Cursors are created using :meth:`Connection.cursor`,
or by using any of the :ref:`connection shortcut methods
<sqlite3-connection-shortcuts>`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f2679f88-e6d0-4942-8770-37970f9e08d4 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,610 | supabase-export-v2 | 588efc8a0a866c4d | .. method:: iterdump(*, filter=None)
Return an :term:`iterator` to dump the database as SQL source code. Useful when saving an in-memory database for later restoration. Similar to the ``.dump`` command in the :program:`sqlite3` shell. | trusted_official_docs | CPython Docs | .. method:: iterdump(*, filter=None)
Return an :term:`iterator` to dump the database as SQL source code. Useful when saving an in-memory database for later restoration. Similar to the ``.dump`` command in the :program:`sqlite3` shell. | .. method:: iterdump(*, filter=None)
Return an :term:`iterator` to dump the database as SQL source code. Useful when saving an in-memory database for later restoration. Similar to the ``.dump`` command in the :program:`sqlite3` shell. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f3af197f-6866-4ea1-ba5d-9f1ebad4a983 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,575 | supabase-export-v2 | d993311c403ddfb0 | If you want to clear any previously installed progress handler, call the method with ``None`` for *progress_handler*.
Returning a non-zero value from the handler function will terminate the
currently executing query and cause it to raise a :exc:`DatabaseError`
exception. | trusted_official_docs | CPython Docs | If you want to clear any previously installed progress handler, call the method with ``None`` for *progress_handler*.
Returning a non-zero value from the handler function will terminate the
currently executing query and cause it to raise a :exc:`DatabaseError`
exception. | If you want to clear any previously installed progress handler, call the method with ``None`` for *progress_handler*.
Returning a non-zero value from the handler function will terminate the
currently executing query and cause it to raise a :exc:`DatabaseError`
exception. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f4dadb1e-d042-4f06-8dcf-c31732f48b70 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,836 | supabase-export-v2 | badcb4ac80792662 | .. exception:: OperationalError
Exception raised for errors that are related to the database's operation,
and not necessarily under the control of the programmer. For example, the database path is not found,
or a transaction could not be processed. ``OperationalError`` is a subclass of :exc:`DatabaseError`. | trusted_official_docs | CPython Docs | .. exception:: OperationalError
Exception raised for errors that are related to the database's operation,
and not necessarily under the control of the programmer. For example, the database path is not found,
or a transaction could not be processed. ``OperationalError`` is a subclass of :exc:`DatabaseError`. | .. exception:: OperationalError
Exception raised for errors that are related to the database's operation,
and not necessarily under the control of the programmer. For example, the database path is not found,
or a transaction could not be processed. ``OperationalError`` is a subclass of :exc:`DatabaseError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f633b311-903f-4453-81ec-bee2a9735d04 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 4,034 | supabase-export-v2 | 4f58a7ff342f5fe4 | If :attr:`Connection.autocommit` is set to :data:`LEGACY_TRANSACTION_CONTROL` (the default), transaction behaviour is controlled using the :attr:`Connection.isolation_level` attribute. Otherwise, :attr:`!isolation_level` has no effect.
If the connection attribute :attr:`~Connection.isolation_level`
is not ``None``,
new... | trusted_official_docs | CPython Docs | If :attr:`Connection.autocommit` is set to :data:`LEGACY_TRANSACTION_CONTROL` (the default), transaction behaviour is controlled using the :attr:`Connection.isolation_level` attribute. Otherwise, :attr:`!isolation_level` has no effect.
If the connection attribute :attr:`~Connection.isolation_level`
is not ``None``,
new... | If :attr:`Connection.autocommit` is set to :data:`LEGACY_TRANSACTION_CONTROL` (the default), transaction behaviour is controlled using the :attr:`Connection.isolation_level` attribute. Otherwise, :attr:`!isolation_level` has no effect.
If the connection attribute :attr:`~Connection.isolation_level`
is not ``None``,
new... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f7356b11-79c9-4e03-b955-646b7ff44f34 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,624 | supabase-export-v2 | 88b80da6920434f2 | default) for the main database, ``"temp"`` for the temporary database, or the name of a custom database as attached using the ``ATTACH DATABASE`` SQL statement.
:param float sleep:
The number of seconds to sleep between successive attempts
to back up remaining pages. | trusted_official_docs | CPython Docs | default) for the main database, ``"temp"`` for the temporary database, or the name of a custom database as attached using the ``ATTACH DATABASE`` SQL statement.
:param float sleep:
The number of seconds to sleep between successive attempts
to back up remaining pages. | default) for the main database, ``"temp"`` for the temporary database, or the name of a custom database as attached using the ``ATTACH DATABASE`` SQL statement.
:param float sleep:
The number of seconds to sleep between successive attempts
to back up remaining pages. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f936a01d-70e6-4a02-8a7a-5fd36f3aaf48 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,769 | supabase-export-v2 | 838bc3482151345d | .. attribute:: connection
Read-only attribute that provides the SQLite database :class:`Connection`
belonging to the cursor. A :class:`Cursor` object created by
calling :meth:`con.cursor() <Connection.cursor>` will have a
:attr:`connection` attribute that refers to *con*: | trusted_official_docs | CPython Docs | .. attribute:: connection
Read-only attribute that provides the SQLite database :class:`Connection`
belonging to the cursor. A :class:`Cursor` object created by
calling :meth:`con.cursor() <Connection.cursor>` will have a
:attr:`connection` attribute that refers to *con*: | .. attribute:: connection
Read-only attribute that provides the SQLite database :class:`Connection`
belonging to the cursor. A :class:`Cursor` object created by
calling :meth:`con.cursor() <Connection.cursor>` will have a
:attr:`connection` attribute that refers to *con*: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f94f98e9-2098-485d-a097-71983630ba1b | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,446 | supabase-export-v2 | 218380b409febe76 | Flags that should be returned by the *authorizer_callback* :term:`callable` passed to :meth:`Connection.set_authorizer`, to indicate whether:
* Access is allowed (:const:`!SQLITE_OK`),
* The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`)
* The column should be treated as a ``NULL`` value (:cons... | trusted_official_docs | CPython Docs | Flags that should be returned by the *authorizer_callback* :term:`callable` passed to :meth:`Connection.set_authorizer`, to indicate whether:
* Access is allowed (:const:`!SQLITE_OK`),
* The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`)
* The column should be treated as a ``NULL`` value (:cons... | Flags that should be returned by the *authorizer_callback* :term:`callable` passed to :meth:`Connection.set_authorizer`, to indicate whether:
* Access is allowed (:const:`!SQLITE_OK`),
* The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`)
* The column should be treated as a ``NULL`` value (:cons... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f96be5f9-aa41-4428-b9ea-c756d966f1bb | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,523 | supabase-export-v2 | 3c1228756ef2b57c | * ``step()``: Add a row to the aggregate. * ``finalize()``: Return the final result of the aggregate as :ref:`a type natively supported by SQLite <sqlite3-types>`.
The number of arguments that the ``step()`` method must accept
is controlled by *n_arg*. | trusted_official_docs | CPython Docs | * ``step()``: Add a row to the aggregate. * ``finalize()``: Return the final result of the aggregate as :ref:`a type natively supported by SQLite <sqlite3-types>`.
The number of arguments that the ``step()`` method must accept
is controlled by *n_arg*. | * ``step()``: Add a row to the aggregate. * ``finalize()``: Return the final result of the aggregate as :ref:`a type natively supported by SQLite <sqlite3-types>`.
The number of arguments that the ``step()`` method must accept
is controlled by *n_arg*. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fa5e0500-953a-41e4-84b6-af36c9adbc2e | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,812 | supabase-export-v2 | d9c406f15dc6f4c3 | .. method:: seek(offset, origin=os.SEEK_SET, /)
Set the current access position of the blob to *offset*. The *origin*
argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other values for *origin* are :const:`os.SEEK_CUR` (seek relative to the
current position) and :const:`os.SEEK_END` (seek relativ... | trusted_official_docs | CPython Docs | .. method:: seek(offset, origin=os.SEEK_SET, /)
Set the current access position of the blob to *offset*. The *origin*
argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other values for *origin* are :const:`os.SEEK_CUR` (seek relative to the
current position) and :const:`os.SEEK_END` (seek relativ... | .. method:: seek(offset, origin=os.SEEK_SET, /)
Set the current access position of the blob to *offset*. The *origin*
argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other values for *origin* are :const:`os.SEEK_CUR` (seek relative to the
current position) and :const:`os.SEEK_END` (seek relativ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fb36bcf5-55be-4257-a9d8-76e26195a79f | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,568 | supabase-export-v2 | 47e85917c4c336aa | of the inner-most trigger or view that is responsible for the access attempt or ``None`` if this access attempt is directly from input SQL code.
Please consult the SQLite documentation about the possible values for the first
argument and the meaning of the second and third argument depending on the first
one. All nec... | trusted_official_docs | CPython Docs | of the inner-most trigger or view that is responsible for the access attempt or ``None`` if this access attempt is directly from input SQL code.
Please consult the SQLite documentation about the possible values for the first
argument and the meaning of the second and third argument depending on the first
one. All nec... | of the inner-most trigger or view that is responsible for the access attempt or ``None`` if this access attempt is directly from input SQL code.
Please consult the SQLite documentation about the possible values for the first
argument and the meaning of the second and third argument depending on the first
one. All nec... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd77d5ed-0771-46f9-b9d9-e44ac3477601 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,780 | supabase-export-v2 | ac5a1c2ecbab1fe2 | .. attribute:: rowcount
Read-only attribute that provides the number of modified rows for
``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements;
is ``-1`` for other statements,
including :abbr:`CTE (Common Table Expression)` queries. It is only updated by the :meth:`execute` and :meth:`executemany` methods,... | trusted_official_docs | CPython Docs | .. attribute:: rowcount
Read-only attribute that provides the number of modified rows for
``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements;
is ``-1`` for other statements,
including :abbr:`CTE (Common Table Expression)` queries. It is only updated by the :meth:`execute` and :meth:`executemany` methods,... | .. attribute:: rowcount
Read-only attribute that provides the number of modified rows for
``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements;
is ``-1`` for other statements,
including :abbr:`CTE (Common Table Expression)` queries. It is only updated by the :meth:`execute` and :meth:`executemany` methods,... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fdd488d0-7be7-48f1-94ee-f0428cfe6db9 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 3,760 | supabase-export-v2 | 7462bec9f68559f0 | Close the cursor now (rather than whenever ``__del__`` is called).
The cursor will be unusable from this point forward; a :exc:`ProgrammingError`
exception will be raised if any operation is attempted with the cursor. | trusted_official_docs | CPython Docs | Close the cursor now (rather than whenever ``__del__`` is called).
The cursor will be unusable from this point forward; a :exc:`ProgrammingError`
exception will be raised if any operation is attempted with the cursor. | Close the cursor now (rather than whenever ``__del__`` is called).
The cursor will be unusable from this point forward; a :exc:`ProgrammingError`
exception will be raised if any operation is attempted with the cursor. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fdf7ef24-4bb6-497e-a234-6c0bf2c09a12 | CPython Docs | file://datasets/cpython/Doc/library/sqlite3.rst | unknown | f609689a-7ecb-41dc-8f88-bd517d46a50a | 4,010 | supabase-export-v2 | 55bc5ba01ac302e1 | well for UTF-8 encoded text, but it might fail for other encodings and invalid UTF-8. You can use a custom :attr:`~Connection.text_factory` to handle such cases.
Because of SQLite's `flexible typing`_, it is not uncommon to encounter table
columns with the ``TEXT`` data type containing non-UTF-8 encodings,
or even arbi... | trusted_official_docs | CPython Docs | well for UTF-8 encoded text, but it might fail for other encodings and invalid UTF-8. You can use a custom :attr:`~Connection.text_factory` to handle such cases.
Because of SQLite's `flexible typing`_, it is not uncommon to encounter table
columns with the ``TEXT`` data type containing non-UTF-8 encodings,
or even arbi... | well for UTF-8 encoded text, but it might fail for other encodings and invalid UTF-8. You can use a custom :attr:`~Connection.text_factory` to handle such cases.
Because of SQLite's `flexible typing`_, it is not uncommon to encounter table
columns with the ``TEXT`` data type containing non-UTF-8 encodings,
or even arbi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
16071b36-636d-4843-b7ad-9e5fe74e226d | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,050 | supabase-export-v2 | cfb30dbe346849d3 | ASCII characters, using the standard email RFC Content Transfer Encoding techniques for encoding email messages for transport over channels that are not "8 bit clean".
To accommodate reproducible processing of SMIME-signed messages
:class:`Generator` disables header folding for message parts of type
``multipart/signed`... | trusted_official_docs | CPython Docs | ASCII characters, using the standard email RFC Content Transfer Encoding techniques for encoding email messages for transport over channels that are not "8 bit clean".
To accommodate reproducible processing of SMIME-signed messages
:class:`Generator` disables header folding for message parts of type
``multipart/signed`... | ASCII characters, using the standard email RFC Content Transfer Encoding techniques for encoding email messages for transport over channels that are not "8 bit clean".
To accommodate reproducible processing of SMIME-signed messages
:class:`Generator` disables header folding for message parts of type
``multipart/signed`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1a884abd-f43d-4113-bdc0-fcab58eb5e59 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,093 | supabase-export-v2 | 99c1b618d7a4e157 | .. class:: DecodedGenerator(outfp, mangle_from_=None, maxheaderlen=None, \ fmt=None, *, policy=None)
Act like :class:`Generator`, except that for any subpart of the message
passed to :meth:`Generator.flatten`, if the subpart is of main type
:mimetype:`text`, print the decoded payload of the subpart, and if the main
... | trusted_official_docs | CPython Docs | .. class:: DecodedGenerator(outfp, mangle_from_=None, maxheaderlen=None, \ fmt=None, *, policy=None)
Act like :class:`Generator`, except that for any subpart of the message
passed to :meth:`Generator.flatten`, if the subpart is of main type
:mimetype:`text`, print the decoded payload of the subpart, and if the main
... | .. class:: DecodedGenerator(outfp, mangle_from_=None, maxheaderlen=None, \ fmt=None, *, policy=None)
Act like :class:`Generator`, except that for any subpart of the message
passed to :meth:`Generator.flatten`, if the subpart is of main type
:mimetype:`text`, print the decoded payload of the subpart, and if the main
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1d5d4521-98bb-4caf-94bc-1829ee39533d | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,089 | supabase-export-v2 | 3f70c8e940676a52 | .. method:: write(s)
Write *s* to the *write* method of the *outfp* passed to the
:class:`Generator`'s constructor. This provides just enough file-like
API for :class:`Generator` instances to be used in the :func:`print`
function. | trusted_official_docs | CPython Docs | .. method:: write(s)
Write *s* to the *write* method of the *outfp* passed to the
:class:`Generator`'s constructor. This provides just enough file-like
API for :class:`Generator` instances to be used in the :func:`print`
function. | .. method:: write(s)
Write *s* to the *write* method of the *outfp* passed to the
:class:`Generator`'s constructor. This provides just enough file-like
API for :class:`Generator` instances to be used in the :func:`print`
function. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2f430b02-6ad5-4419-8b87-433beef6d11f | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,070 | supabase-export-v2 | 8243bae9c3c1f572 | *s* using the ``ASCII`` codec and the ``surrogateescape`` error handler, and pass it to the *write* method of the *outfp* passed to the :class:`BytesGenerator`'s constructor.
As a convenience, :class:`~email.message.EmailMessage` provides the methods
:meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` ... | trusted_official_docs | CPython Docs | *s* using the ``ASCII`` codec and the ``surrogateescape`` error handler, and pass it to the *write* method of the *outfp* passed to the :class:`BytesGenerator`'s constructor.
As a convenience, :class:`~email.message.EmailMessage` provides the methods
:meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` ... | *s* using the ``ASCII`` codec and the ``surrogateescape`` error handler, and pass it to the *write* method of the *outfp* passed to the :class:`BytesGenerator`'s constructor.
As a convenience, :class:`~email.message.EmailMessage` provides the methods
:meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38a21fc3-cc93-4189-87e3-60a578a5decf | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,065 | supabase-export-v2 | 5001b1731d8c3001 | as the separator character between all the lines of the flattened message. If *linesep* is ``None`` (the default), use the value specified in the *policy*.
.. XXX: flatten should take a *policy* keyword. | trusted_official_docs | CPython Docs | as the separator character between all the lines of the flattened message. If *linesep* is ``None`` (the default), use the value specified in the *policy*.
.. XXX: flatten should take a *policy* keyword. | as the separator character between all the lines of the flattened message. If *linesep* is ``None`` (the default), use the value specified in the *policy*.
.. XXX: flatten should take a *policy* keyword. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38b26129-06a2-4f77-af26-d50544f56159 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,077 | supabase-export-v2 | a28a41debd585a74 | the policy associated with the :class:`~email.message.Message` or :class:`~email.message.EmailMessage` object passed to ``flatten`` to control the message generation. See :mod:`email.policy` for details on what *policy* controls.
.. versionchanged:: 3.3 Added the *policy* keyword. | trusted_official_docs | CPython Docs | the policy associated with the :class:`~email.message.Message` or :class:`~email.message.EmailMessage` object passed to ``flatten`` to control the message generation. See :mod:`email.policy` for details on what *policy* controls.
.. versionchanged:: 3.3 Added the *policy* keyword. | the policy associated with the :class:`~email.message.Message` or :class:`~email.message.EmailMessage` object passed to ``flatten`` to control the message generation. See :mod:`email.policy` for details on what *policy* controls.
.. versionchanged:: 3.3 Added the *policy* keyword. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
522e23d2-02f9-43cc-a9d7-883fcb78bcb8 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,074 | supabase-export-v2 | 3c1d2ee61847dfa2 | :meth:`flatten` method, or any text provided to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp* must support a ``write`` method that accepts string data.
If optional *mangle_from_* is ``True``, put a ``>`` character in front of
any line in the body that starts with the exact string ``"From "... | trusted_official_docs | CPython Docs | :meth:`flatten` method, or any text provided to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp* must support a ``write`` method that accepts string data.
If optional *mangle_from_* is ``True``, put a ``>`` character in front of
any line in the body that starts with the exact string ``"From "... | :meth:`flatten` method, or any text provided to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp* must support a ``write`` method that accepts string data.
If optional *mangle_from_* is ``True``, put a ``>`` character in front of
any line in the body that starts with the exact string ``"From "... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
54288ccf-98b6-4b37-a25e-ef20ceb8f83f | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,063 | supabase-export-v2 | f5decec11b521c1a | .. XXX: There should be an option that just does the RFC compliance transformation on headers but leaves CTE 8bit parts alone.
If *unixfrom* is ``True``, print the envelope header delimiter used by
the Unix mailbox format (see :mod:`mailbox`) before the first of the
:rfc:`5322` headers of the root message object. If ... | trusted_official_docs | CPython Docs | .. XXX: There should be an option that just does the RFC compliance transformation on headers but leaves CTE 8bit parts alone.
If *unixfrom* is ``True``, print the envelope header delimiter used by
the Unix mailbox format (see :mod:`mailbox`) before the first of the
:rfc:`5322` headers of the root message object. If ... | .. XXX: There should be an option that just does the RFC compliance transformation on headers but leaves CTE 8bit parts alone.
If *unixfrom* is ``True``, print the envelope header delimiter used by
the Unix mailbox format (see :mod:`mailbox`) before the first of the
:rfc:`5322` headers of the root message object. If ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5955500e-54ff-43cb-ac1b-9cd450f5ead6 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,081 | supabase-export-v2 | f6707ce888d9dfcd | Print the textual representation of the message object structure rooted at *msg* to the output file specified when the :class:`Generator` instance was created.
If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type`
is ``8bit``, generate the message as if the option were set to ``7bit``. (This is requ... | trusted_official_docs | CPython Docs | Print the textual representation of the message object structure rooted at *msg* to the output file specified when the :class:`Generator` instance was created.
If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type`
is ``8bit``, generate the message as if the option were set to ``7bit``. (This is requ... | Print the textual representation of the message object structure rooted at *msg* to the output file specified when the :class:`Generator` instance was created.
If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type`
is ``8bit``, generate the message as if the option were set to ``7bit``. (This is requ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
59bb1fca-6a79-4354-af77-adfd3e2debe1 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,105 | supabase-export-v2 | ddc8aba12d7f0d1c | .. rubric:: Footnotes
.. [#] This statement assumes that you use the appropriate setting for
``unixfrom``, and that there are no :mod:`email.policy` settings calling for
automatic adjustments (for example,
:attr:`~email.policy.EmailPolicy.refold_source` must be ``none``, which is
*not* the default). It is also not ... | trusted_official_docs | CPython Docs | .. rubric:: Footnotes
.. [#] This statement assumes that you use the appropriate setting for
``unixfrom``, and that there are no :mod:`email.policy` settings calling for
automatic adjustments (for example,
:attr:`~email.policy.EmailPolicy.refold_source` must be ``none``, which is
*not* the default). It is also not ... | .. rubric:: Footnotes
.. [#] This statement assumes that you use the appropriate setting for
``unixfrom``, and that there are no :mod:`email.policy` settings calling for
automatic adjustments (for example,
:attr:`~email.policy.EmailPolicy.refold_source` must be ``none``, which is
*not* the default). It is also not ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6f483bc8-4bfe-4c2f-acdb-6d1afef76d3e | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,082 | supabase-export-v2 | c8ee611537076dc6 | :mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME ``unknown-8bit`` character set, thus rendering them RFC-compliant.
If *unixfrom* is ``True``, print the... | trusted_official_docs | CPython Docs | :mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME ``unknown-8bit`` character set, thus rendering them RFC-compliant.
If *unixfrom* is ``True``, print the... | :mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME ``unknown-8bit`` character set, thus rendering them RFC-compliant.
If *unixfrom* is ``True``, print the... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
70c49bea-9b35-47cf-96cf-bd0e7f6223b6 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,092 | supabase-export-v2 | 039dabfb0ea2ccff | are not serialized, but are instead represented in the output stream by a string derived from a template filled in with information about the part.
.. class:: DecodedGenerator(outfp, mangle_from_=None, maxheaderlen=None, \
fmt=None, *, policy=None) | trusted_official_docs | CPython Docs | are not serialized, but are instead represented in the output stream by a string derived from a template filled in with information about the part.
.. class:: DecodedGenerator(outfp, mangle_from_=None, maxheaderlen=None, \
fmt=None, *, policy=None) | are not serialized, but are instead represented in the output stream by a string derived from a template filled in with information about the part.
.. class:: DecodedGenerator(outfp, mangle_from_=None, maxheaderlen=None, \
fmt=None, *, policy=None) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
72a7e492-ac1b-47cc-a2eb-bdac39dc86e9 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,049 | supabase-export-v2 | 0c88dea074fd3c95 | the other hand, using the generator on an :class:`~email.message.EmailMessage` constructed by program may result in changes to the :class:`~email.message.EmailMessage` object as defaults are filled in.)
The :class:`Generator` class can be used to flatten a message into a text (as
opposed to binary) serialized represent... | trusted_official_docs | CPython Docs | the other hand, using the generator on an :class:`~email.message.EmailMessage` constructed by program may result in changes to the :class:`~email.message.EmailMessage` object as defaults are filled in.)
The :class:`Generator` class can be used to flatten a message into a text (as
opposed to binary) serialized represent... | the other hand, using the generator on an :class:`~email.message.EmailMessage` constructed by program may result in changes to the :class:`~email.message.EmailMessage` object as defaults are filled in.)
The :class:`Generator` class can be used to flatten a message into a text (as
opposed to binary) serialized represent... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
848b8370-cb06-4632-8e16-dae1981efdc3 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,062 | supabase-export-v2 | 6a001888fbb581fa | :mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME ``unknown-8bit`` character set, thus rendering them RFC-compliant.
.. XXX: There should be an option th... | trusted_official_docs | CPython Docs | :mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME ``unknown-8bit`` character set, thus rendering them RFC-compliant.
.. XXX: There should be an option th... | :mailheader:`Content-Transfer-Encoding` (:mailheader:`Content-Transfer-Encoding: 8bit`) to an ASCII compatible :mailheader:`Content-Transfer-Encoding`, and encode RFC-invalid non-ASCII bytes in headers using the MIME ``unknown-8bit`` character set, thus rendering them RFC-compliant.
.. XXX: There should be an option th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
89a4f6cb-a153-4735-a898-aae17aa038ee | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,073 | supabase-export-v2 | eae5d1e506f7a853 | .. class:: Generator(outfp, mangle_from_=None, maxheaderlen=None, *, \ policy=None)
Return a :class:`Generator` object that will write any message provided
to the :meth:`flatten` method, or any text provided to the :meth:`write`
method, to the :term:`file-like object` *outfp*. *outfp* must support a
``write`` method... | trusted_official_docs | CPython Docs | .. class:: Generator(outfp, mangle_from_=None, maxheaderlen=None, *, \ policy=None)
Return a :class:`Generator` object that will write any message provided
to the :meth:`flatten` method, or any text provided to the :meth:`write`
method, to the :term:`file-like object` *outfp*. *outfp* must support a
``write`` method... | .. class:: Generator(outfp, mangle_from_=None, maxheaderlen=None, *, \ policy=None)
Return a :class:`Generator` object that will write any message provided
to the :meth:`flatten` method, or any text provided to the :meth:`write`
method, to the :term:`file-like object` *outfp*. *outfp* must support a
``write`` method... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8ad0046c-5bc0-4d18-92b4-ad3506c4f884 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,053 | supabase-export-v2 | 01bacd6faa36e847 | or any surrogateescape encoded text provided to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp* must support a ``write`` method that accepts binary data.
If optional *mangle_from_* is ``True``, put a ``>`` character in front of
any line in the body that starts with the exact string ``"From "... | trusted_official_docs | CPython Docs | or any surrogateescape encoded text provided to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp* must support a ``write`` method that accepts binary data.
If optional *mangle_from_* is ``True``, put a ``>`` character in front of
any line in the body that starts with the exact string ``"From "... | or any surrogateescape encoded text provided to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp* must support a ``write`` method that accepts binary data.
If optional *mangle_from_* is ``True``, put a ``>`` character in front of
any line in the body that starts with the exact string ``"From "... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9078f54b-bb18-44a1-b09a-a83a01068539 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,072 | supabase-export-v2 | 1dedbf728209a023 | serializing to an I/O stream that is not "8 bit clean". In other words, most applications will want to be using :class:`BytesGenerator`, and not :class:`Generator`.
.. class:: Generator(outfp, mangle_from_=None, maxheaderlen=None, *, \
policy=None) | trusted_official_docs | CPython Docs | serializing to an I/O stream that is not "8 bit clean". In other words, most applications will want to be using :class:`BytesGenerator`, and not :class:`Generator`.
.. class:: Generator(outfp, mangle_from_=None, maxheaderlen=None, *, \
policy=None) | serializing to an I/O stream that is not "8 bit clean". In other words, most applications will want to be using :class:`BytesGenerator`, and not :class:`Generator`.
.. class:: Generator(outfp, mangle_from_=None, maxheaderlen=None, *, \
policy=None) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
990290a4-767d-406a-beaa-cc427892b100 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,071 | supabase-export-v2 | 4289d73165205a4a | the methods :meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` (a.k.a. :meth:`~email.message.EmailMessage.__bytes__`), which simplify the generation of a serialized binary representation of a message object. For more detail, see :mod:`email.message`.
Because strings cannot represent binary data, the :... | trusted_official_docs | CPython Docs | the methods :meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` (a.k.a. :meth:`~email.message.EmailMessage.__bytes__`), which simplify the generation of a serialized binary representation of a message object. For more detail, see :mod:`email.message`.
Because strings cannot represent binary data, the :... | the methods :meth:`~email.message.EmailMessage.as_bytes` and ``bytes(aMessage)`` (a.k.a. :meth:`~email.message.EmailMessage.__bytes__`), which simplify the generation of a serialized binary representation of a message object. For more detail, see :mod:`email.message`.
Because strings cannot represent binary data, the :... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a836d610-9baf-42af-a80c-366a3fd5a6c0 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,091 | supabase-export-v2 | 7654485e6ae1b941 | the methods :meth:`~email.message.EmailMessage.as_string` and ``str(aMessage)`` (a.k.a. :meth:`~email.message.EmailMessage.__str__`), which simplify the generation of a formatted string representation of a message object. For more detail, see :mod:`email.message`.
The :mod:`!email.generator` module also provides a deri... | trusted_official_docs | CPython Docs | the methods :meth:`~email.message.EmailMessage.as_string` and ``str(aMessage)`` (a.k.a. :meth:`~email.message.EmailMessage.__str__`), which simplify the generation of a formatted string representation of a message object. For more detail, see :mod:`email.message`.
The :mod:`!email.generator` module also provides a deri... | the methods :meth:`~email.message.EmailMessage.as_string` and ``str(aMessage)`` (a.k.a. :meth:`~email.message.EmailMessage.__str__`), which simplify the generation of a formatted string representation of a message object. For more detail, see :mod:`email.message`.
The :mod:`!email.generator` module also provides a deri... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ad53545e-0445-4518-8672-54bf5492c0c5 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,054 | supabase-export-v2 | 1128308aef2f1828 | all others). *mangle_from_* is intended for use when messages are stored in Unix mbox format (see :mod:`mailbox` and `WHY THE CONTENT-LENGTH FORMAT IS BAD <https://www.jwz.org/doc/content-length.html>`_).
If *maxheaderlen* is not ``None``, refold any header lines that are longer
than *maxheaderlen*, or if ``0``, do no... | trusted_official_docs | CPython Docs | all others). *mangle_from_* is intended for use when messages are stored in Unix mbox format (see :mod:`mailbox` and `WHY THE CONTENT-LENGTH FORMAT IS BAD <https://www.jwz.org/doc/content-length.html>`_).
If *maxheaderlen* is not ``None``, refold any header lines that are longer
than *maxheaderlen*, or if ``0``, do no... | all others). *mangle_from_* is intended for use when messages are stored in Unix mbox format (see :mod:`mailbox` and `WHY THE CONTENT-LENGTH FORMAT IS BAD <https://www.jwz.org/doc/content-length.html>`_).
If *maxheaderlen* is not ``None``, refold any header lines that are longer
than *maxheaderlen*, or if ``0``, do no... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
aef8e000-aa77-4b48-9dac-0011f7e004cc | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,052 | supabase-export-v2 | 9c30b5e41c380e60 | .. class:: BytesGenerator(outfp, mangle_from_=None, maxheaderlen=None, *, \ policy=None)
Return a :class:`BytesGenerator` object that will write any message provided
to the :meth:`flatten` method, or any surrogateescape encoded text provided
to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp... | trusted_official_docs | CPython Docs | .. class:: BytesGenerator(outfp, mangle_from_=None, maxheaderlen=None, *, \ policy=None)
Return a :class:`BytesGenerator` object that will write any message provided
to the :meth:`flatten` method, or any surrogateescape encoded text provided
to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp... | .. class:: BytesGenerator(outfp, mangle_from_=None, maxheaderlen=None, *, \ policy=None)
Return a :class:`BytesGenerator` object that will write any message provided
to the :meth:`flatten` method, or any surrogateescape encoded text provided
to the :meth:`write` method, to the :term:`file-like object` *outfp*. *outfp... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ba444938-2219-4a9a-9a81-029ccd042160 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,047 | supabase-export-v2 | de0d7f584cf763a4 | --------------
One of the most common tasks is to generate the flat (serialized) version of
the email message represented by a message object structure. You will need to
do this if you want to send your message via :meth:`smtplib.SMTP.sendmail`,
or print the message on the console. Taking a
message object structure and... | trusted_official_docs | CPython Docs | --------------
One of the most common tasks is to generate the flat (serialized) version of
the email message represented by a message object structure. You will need to
do this if you want to send your message via :meth:`smtplib.SMTP.sendmail`,
or print the message on the console. Taking a
message object structure and... | --------------
One of the most common tasks is to generate the flat (serialized) version of
the email message represented by a message object structure. You will need to
do this if you want to send your message via :meth:`smtplib.SMTP.sendmail`,
or print the message on the console. Taking a
message object structure and... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c4e00513-22bb-41cf-9876-7c086e905275 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,048 | supabase-export-v2 | 094f5bcd842eda70 | :meth:`smtplib.SMTP.sendmail`, or print the message on the console. Taking a message object structure and producing a serialized representation is the job of the generator classes.
As with the :mod:`email.parser` module, you aren't limited to the functionality
of the bundled generator; you could write one from scratch ... | trusted_official_docs | CPython Docs | :meth:`smtplib.SMTP.sendmail`, or print the message on the console. Taking a message object structure and producing a serialized representation is the job of the generator classes.
As with the :mod:`email.parser` module, you aren't limited to the functionality
of the bundled generator; you could write one from scratch ... | :meth:`smtplib.SMTP.sendmail`, or print the message on the console. Taking a message object structure and producing a serialized representation is the job of the generator classes.
As with the :mod:`email.parser` module, you aren't limited to the functionality
of the bundled generator; you could write one from scratch ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d31ca6e6-df0e-4fad-ad44-d4d6c7467aad | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,090 | supabase-export-v2 | 29ba9c445ac4bfce | method of the *outfp* passed to the :class:`Generator`'s constructor. This provides just enough file-like API for :class:`Generator` instances to be used in the :func:`print` function.
As a convenience, :class:`~email.message.EmailMessage` provides the methods
:meth:`~email.message.EmailMessage.as_string` and ``str(aMe... | trusted_official_docs | CPython Docs | method of the *outfp* passed to the :class:`Generator`'s constructor. This provides just enough file-like API for :class:`Generator` instances to be used in the :func:`print` function.
As a convenience, :class:`~email.message.EmailMessage` provides the methods
:meth:`~email.message.EmailMessage.as_string` and ``str(aMe... | method of the *outfp* passed to the :class:`Generator`'s constructor. This provides just enough file-like API for :class:`Generator` instances to be used in the :func:`print` function.
As a convenience, :class:`~email.message.EmailMessage` provides the methods
:meth:`~email.message.EmailMessage.as_string` and ``str(aMe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d458edfd-24e7-4099-bcd9-57f79840efad | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,094 | supabase-export-v2 | e14f3670ab937867 | main type is not :mimetype:`text`, instead of printing it fill in the string *fmt* using information from the part and print the resulting filled-in string.
To fill in *fmt*, execute ``fmt % part_info``, where ``part_info``
is a dictionary composed of the following keys and values: | trusted_official_docs | CPython Docs | main type is not :mimetype:`text`, instead of printing it fill in the string *fmt* using information from the part and print the resulting filled-in string.
To fill in *fmt*, execute ``fmt % part_info``, where ``part_info``
is a dictionary composed of the following keys and values: | main type is not :mimetype:`text`, instead of printing it fill in the string *fmt* using information from the part and print the resulting filled-in string.
To fill in *fmt*, execute ``fmt % part_info``, where ``part_info``
is a dictionary composed of the following keys and values: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d97b41fe-5274-407d-9711-662637d305ba | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,064 | supabase-export-v2 | b62a70b714600e96 | the root object has no envelope header, craft a standard one. The default is ``False``. Note that for subparts, no envelope header is ever printed.
If *linesep* is not ``None``, use it as the separator character between
all the lines of the flattened message. If *linesep* is ``None`` (the
default), use the value spec... | trusted_official_docs | CPython Docs | the root object has no envelope header, craft a standard one. The default is ``False``. Note that for subparts, no envelope header is ever printed.
If *linesep* is not ``None``, use it as the separator character between
all the lines of the flattened message. If *linesep* is ``None`` (the
default), use the value spec... | the root object has no envelope header, craft a standard one. The default is ``False``. Note that for subparts, no envelope header is ever printed.
If *linesep* is not ``None``, use it as the separator character between
all the lines of the flattened message. If *linesep* is ``None`` (the
default), use the value spec... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
de6bc6ba-0fd8-41f4-b636-28df5ebb8a29 | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,055 | supabase-export-v2 | e7f31e3ff911eaf8 | or if ``0``, do not rewrap any headers. If *manheaderlen* is ``None`` (the default), wrap headers and other message lines according to the *policy* settings.
If *policy* is specified, use that policy to control message generation. If
*policy* is ``None`` (the default), use the policy associated with the
:class:`~emai... | trusted_official_docs | CPython Docs | or if ``0``, do not rewrap any headers. If *manheaderlen* is ``None`` (the default), wrap headers and other message lines according to the *policy* settings.
If *policy* is specified, use that policy to control message generation. If
*policy* is ``None`` (the default), use the policy associated with the
:class:`~emai... | or if ``0``, do not rewrap any headers. If *manheaderlen* is ``None`` (the default), wrap headers and other message lines according to the *policy* settings.
If *policy* is specified, use that policy to control message generation. If
*policy* is ``None`` (the default), use the policy associated with the
:class:`~emai... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e649c97c-e99d-4577-b408-fa912329d37d | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,095 | supabase-export-v2 | edfa6b9fbb7545fb | To fill in *fmt*, execute ``fmt % part_info``, where ``part_info`` is a dictionary composed of the following keys and values:
* ``type`` -- Full MIME type of the non-\ :mimetype:`text` part | trusted_official_docs | CPython Docs | To fill in *fmt*, execute ``fmt % part_info``, where ``part_info`` is a dictionary composed of the following keys and values:
* ``type`` -- Full MIME type of the non-\ :mimetype:`text` part | To fill in *fmt*, execute ``fmt % part_info``, where ``part_info`` is a dictionary composed of the following keys and values:
* ``type`` -- Full MIME type of the non-\ :mimetype:`text` part | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ecf32f74-81ff-47a3-8d2b-c131e95da34e | CPython Docs | file://datasets/cpython/Doc/library/email.generator.rst | unknown | 85cacdb5-7d61-49f0-bfb2-1e311d8f9210 | 4,061 | supabase-export-v2 | 85ac5f9f5e6ab194 | Print the textual representation of the message object structure rooted at *msg* to the output file specified when the :class:`BytesGenerator` instance was created.
If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type`
is ``8bit`` (the default), copy any headers in the original parsed
message that ... | trusted_official_docs | CPython Docs | Print the textual representation of the message object structure rooted at *msg* to the output file specified when the :class:`BytesGenerator` instance was created.
If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type`
is ``8bit`` (the default), copy any headers in the original parsed
message that ... | Print the textual representation of the message object structure rooted at *msg* to the output file specified when the :class:`BytesGenerator` instance was created.
If the :mod:`~email.policy` option :attr:`~email.policy.Policy.cte_type`
is ``8bit`` (the default), copy any headers in the original parsed
message that ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
00775354-ac3a-4b93-908a-785ec0775a4a | CPython Docs | file://datasets/cpython/Doc/library/functions.rst | unknown | 1046c4ae-bb1a-49b9-a075-e089ad7cd6a5 | 4,438 | supabase-export-v2 | 6414c830d04c4043 | handlers are available, though any error handling name that has been registered with :func:`codecs.register_error` is also valid. The standard names can be found in :ref:`error-handlers`.
.. index::
single: universal newlines; open() built-in function | trusted_official_docs | CPython Docs | handlers are available, though any error handling name that has been registered with :func:`codecs.register_error` is also valid. The standard names can be found in :ref:`error-handlers`.
.. index::
single: universal newlines; open() built-in function | handlers are available, though any error handling name that has been registered with :func:`codecs.register_error` is also valid. The standard names can be found in :ref:`error-handlers`.
.. index::
single: universal newlines; open() built-in function | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0098fac6-c458-40e1-9d76-2f1f01560e94 | CPython Docs | file://datasets/cpython/Doc/library/functions.rst | unknown | 1046c4ae-bb1a-49b9-a075-e089ad7cd6a5 | 4,656 | supabase-export-v2 | b8d721115daf397b | first dot) is returned, *not* the module named by *name*. However, when a non-empty *fromlist* argument is given, the module named by *name* is returned.
For example, the statement ``import spam`` results in bytecode resembling the
following code:: | trusted_official_docs | CPython Docs | first dot) is returned, *not* the module named by *name*. However, when a non-empty *fromlist* argument is given, the module named by *name* is returned.
For example, the statement ``import spam`` results in bytecode resembling the
following code:: | first dot) is returned, *not* the module named by *name*. However, when a non-empty *fromlist* argument is given, the module named by *name* is returned.
For example, the statement ``import spam`` results in bytecode resembling the
following code:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
00e18bd8-bbeb-4f39-9f00-39fee6b7e24f | CPython Docs | file://datasets/cpython/Doc/library/functions.rst | unknown | 1046c4ae-bb1a-49b9-a075-e089ad7cd6a5 | 4,635 | supabase-export-v2 | 60085b8c82974746 | >>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum'])) [(0, 'fee'), (1, 'fi'), (2, 'fo')]
* :func:`zip` is often used in cases where the iterables are assumed to be
of equal length. In such cases, it's recommended to use the ``strict=True``
option. Its output is the same as regular :func:`zip`:: | trusted_official_docs | CPython Docs | >>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum'])) [(0, 'fee'), (1, 'fi'), (2, 'fo')]
* :func:`zip` is often used in cases where the iterables are assumed to be
of equal length. In such cases, it's recommended to use the ``strict=True``
option. Its output is the same as regular :func:`zip`:: | >>> list(zip(range(3), ['fee', 'fi', 'fo', 'fum'])) [(0, 'fee'), (1, 'fi'), (2, 'fo')]
* :func:`zip` is often used in cases where the iterables are assumed to be
of equal length. In such cases, it's recommended to use the ``strict=True``
option. Its output is the same as regular :func:`zip`:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
020715af-7340-4ab5-847e-9b97e4f4dfe1 | CPython Docs | file://datasets/cpython/Doc/library/functions.rst | unknown | 1046c4ae-bb1a-49b9-a075-e089ad7cd6a5 | 4,450 | supabase-export-v2 | 10350dc92668751d | .. index:: single: line-buffered I/O single: unbuffered I/O single: buffer size, I/O single: I/O control; buffering single: binary mode single: text mode pair: module; sys
See also the file handling modules, such as :mod:`fileinput`, :mod:`io`
(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile... | trusted_official_docs | CPython Docs | .. index:: single: line-buffered I/O single: unbuffered I/O single: buffer size, I/O single: I/O control; buffering single: binary mode single: text mode pair: module; sys
See also the file handling modules, such as :mod:`fileinput`, :mod:`io`
(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile... | .. index:: single: line-buffered I/O single: unbuffered I/O single: buffer size, I/O single: I/O control; buffering single: binary mode single: text mode pair: module; sys
See also the file handling modules, such as :mod:`fileinput`, :mod:`io`
(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
020f7eef-c797-46e8-92e2-cc1248a37671 | CPython Docs | file://datasets/cpython/Doc/library/functions.rst | unknown | 1046c4ae-bb1a-49b9-a075-e089ad7cd6a5 | 4,529 | supabase-export-v2 | c2bd0d0c4253cc6c | .. note::
Since :ref:`private name mangling <private-name-mangling>` happens at
compilation time, one must manually mangle a private attribute's
(attributes with two leading underscores) name in order to set it with
:func:`setattr`. | trusted_official_docs | CPython Docs | .. note::
Since :ref:`private name mangling <private-name-mangling>` happens at
compilation time, one must manually mangle a private attribute's
(attributes with two leading underscores) name in order to set it with
:func:`setattr`. | .. note::
Since :ref:`private name mangling <private-name-mangling>` happens at
compilation time, one must manually mangle a private attribute's
(attributes with two leading underscores) name in order to set it with
:func:`setattr`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.