Initial commit: Robot ökoszisztéma v2.0 - Stabilizált jármű és szerviz robotok
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,117 @@
|
||||
Metadata-Version: 2.4
|
||||
Name: greenlet
|
||||
Version: 3.3.0
|
||||
Summary: Lightweight in-process concurrent programming
|
||||
Home-page: https://greenlet.readthedocs.io/
|
||||
Author: Alexey Borzenkov
|
||||
Author-email: snaury@gmail.com
|
||||
Maintainer: Jason Madden
|
||||
Maintainer-email: jason@seecoresoftware.com
|
||||
License: MIT AND Python-2.0
|
||||
Project-URL: Bug Tracker, https://github.com/python-greenlet/greenlet/issues
|
||||
Project-URL: Source Code, https://github.com/python-greenlet/greenlet/
|
||||
Project-URL: Documentation, https://greenlet.readthedocs.io/
|
||||
Project-URL: Changes, https://greenlet.readthedocs.io/en/latest/changes.html
|
||||
Keywords: greenlet coroutine concurrency threads cooperative
|
||||
Platform: any
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Natural Language :: English
|
||||
Classifier: Programming Language :: C
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3 :: Only
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: 3.13
|
||||
Classifier: Programming Language :: Python :: 3.14
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Requires-Python: >=3.10
|
||||
Description-Content-Type: text/x-rst
|
||||
License-File: LICENSE
|
||||
License-File: LICENSE.PSF
|
||||
Provides-Extra: docs
|
||||
Requires-Dist: Sphinx; extra == "docs"
|
||||
Requires-Dist: furo; extra == "docs"
|
||||
Provides-Extra: test
|
||||
Requires-Dist: objgraph; extra == "test"
|
||||
Requires-Dist: psutil; extra == "test"
|
||||
Requires-Dist: setuptools; extra == "test"
|
||||
Dynamic: author
|
||||
Dynamic: author-email
|
||||
Dynamic: classifier
|
||||
Dynamic: description
|
||||
Dynamic: description-content-type
|
||||
Dynamic: home-page
|
||||
Dynamic: keywords
|
||||
Dynamic: license
|
||||
Dynamic: license-file
|
||||
Dynamic: maintainer
|
||||
Dynamic: maintainer-email
|
||||
Dynamic: platform
|
||||
Dynamic: project-url
|
||||
Dynamic: provides-extra
|
||||
Dynamic: requires-python
|
||||
Dynamic: summary
|
||||
|
||||
.. This file is included into docs/history.rst
|
||||
|
||||
|
||||
Greenlets are lightweight coroutines for in-process concurrent
|
||||
programming.
|
||||
|
||||
The "greenlet" package is a spin-off of `Stackless`_, a version of
|
||||
CPython that supports micro-threads called "tasklets". Tasklets run
|
||||
pseudo-concurrently (typically in a single or a few OS-level threads)
|
||||
and are synchronized with data exchanges on "channels".
|
||||
|
||||
A "greenlet", on the other hand, is a still more primitive notion of
|
||||
micro-thread with no implicit scheduling; coroutines, in other words.
|
||||
This is useful when you want to control exactly when your code runs.
|
||||
You can build custom scheduled micro-threads on top of greenlet;
|
||||
however, it seems that greenlets are useful on their own as a way to
|
||||
make advanced control flow structures. For example, we can recreate
|
||||
generators; the difference with Python's own generators is that our
|
||||
generators can call nested functions and the nested functions can
|
||||
yield values too. (Additionally, you don't need a "yield" keyword. See
|
||||
the example in `test_generator.py
|
||||
<https://github.com/python-greenlet/greenlet/blob/adca19bf1f287b3395896a8f41f3f4fd1797fdc7/src/greenlet/tests/test_generator.py#L1>`_).
|
||||
|
||||
Greenlets are provided as a C extension module for the regular unmodified
|
||||
interpreter.
|
||||
|
||||
.. _`Stackless`: http://www.stackless.com
|
||||
|
||||
|
||||
Who is using Greenlet?
|
||||
======================
|
||||
|
||||
There are several libraries that use Greenlet as a more flexible
|
||||
alternative to Python's built in coroutine support:
|
||||
|
||||
- `Concurrence`_
|
||||
- `Eventlet`_
|
||||
- `Gevent`_
|
||||
|
||||
.. _Concurrence: http://opensource.hyves.org/concurrence/
|
||||
.. _Eventlet: http://eventlet.net/
|
||||
.. _Gevent: http://www.gevent.org/
|
||||
|
||||
Getting Greenlet
|
||||
================
|
||||
|
||||
The easiest way to get Greenlet is to install it with pip::
|
||||
|
||||
pip install greenlet
|
||||
|
||||
|
||||
Source code archives and binary distributions are available on the
|
||||
python package index at https://pypi.org/project/greenlet
|
||||
|
||||
The source code repository is hosted on github:
|
||||
https://github.com/python-greenlet/greenlet
|
||||
|
||||
Documentation is available on readthedocs.org:
|
||||
https://greenlet.readthedocs.io
|
||||
Binary file not shown.
@@ -0,0 +1,209 @@
|
||||
Metadata-Version: 2.4
|
||||
Name: idna
|
||||
Version: 3.11
|
||||
Summary: Internationalized Domain Names in Applications (IDNA)
|
||||
Author-email: Kim Davies <kim+pypi@gumleaf.org>
|
||||
Requires-Python: >=3.8
|
||||
Description-Content-Type: text/x-rst
|
||||
License-Expression: BSD-3-Clause
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Intended Audience :: System Administrators
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3 :: Only
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: 3.13
|
||||
Classifier: Programming Language :: Python :: 3.14
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
Classifier: Topic :: Internet :: Name Service (DNS)
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Classifier: Topic :: Utilities
|
||||
License-File: LICENSE.md
|
||||
Requires-Dist: ruff >= 0.6.2 ; extra == "all"
|
||||
Requires-Dist: mypy >= 1.11.2 ; extra == "all"
|
||||
Requires-Dist: pytest >= 8.3.2 ; extra == "all"
|
||||
Requires-Dist: flake8 >= 7.1.1 ; extra == "all"
|
||||
Project-URL: Changelog, https://github.com/kjd/idna/blob/master/HISTORY.rst
|
||||
Project-URL: Issue tracker, https://github.com/kjd/idna/issues
|
||||
Project-URL: Source, https://github.com/kjd/idna
|
||||
Provides-Extra: all
|
||||
|
||||
Internationalized Domain Names in Applications (IDNA)
|
||||
=====================================================
|
||||
|
||||
Support for `Internationalized Domain Names in
|
||||
Applications (IDNA) <https://tools.ietf.org/html/rfc5891>`_
|
||||
and `Unicode IDNA Compatibility Processing
|
||||
<https://unicode.org/reports/tr46/>`_.
|
||||
|
||||
The latest versions of these standards supplied here provide
|
||||
more comprehensive language coverage and reduce the potential of
|
||||
allowing domains with known security vulnerabilities. This library
|
||||
is a suitable replacement for the “encodings.idna”
|
||||
module that comes with the Python standard library, but which
|
||||
only supports an older superseded IDNA specification from 2003.
|
||||
|
||||
Basic functions are simply executed:
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> import idna
|
||||
>>> idna.encode('ドメイン.テスト')
|
||||
b'xn--eckwd4c7c.xn--zckzah'
|
||||
>>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))
|
||||
ドメイン.テスト
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
This package is available for installation from PyPI via the
|
||||
typical mechanisms, such as:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ python3 -m pip install idna
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
For typical usage, the ``encode`` and ``decode`` functions will take a
|
||||
domain name argument and perform a conversion to ASCII compatible encoding
|
||||
(known as A-labels), or to Unicode strings (known as U-labels)
|
||||
respectively.
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> import idna
|
||||
>>> idna.encode('ドメイン.テスト')
|
||||
b'xn--eckwd4c7c.xn--zckzah'
|
||||
>>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))
|
||||
ドメイン.テスト
|
||||
|
||||
Conversions can be applied at a per-label basis using the ``ulabel`` or
|
||||
``alabel`` functions if necessary:
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> idna.alabel('测试')
|
||||
b'xn--0zwm56d'
|
||||
|
||||
|
||||
Compatibility Mapping (UTS #46)
|
||||
+++++++++++++++++++++++++++++++
|
||||
|
||||
This library provides support for `Unicode IDNA Compatibility
|
||||
Processing <https://unicode.org/reports/tr46/>`_ which normalizes input from
|
||||
different potential ways a user may input a domain prior to performing the IDNA
|
||||
conversion operations. This functionality, known as a
|
||||
`mapping <https://tools.ietf.org/html/rfc5895>`_, is considered by the
|
||||
specification to be a local user-interface issue distinct from IDNA
|
||||
conversion functionality.
|
||||
|
||||
For example, “Königsgäßchen” is not a permissible label as *LATIN
|
||||
CAPITAL LETTER K* is not allowed (nor are capital letters in general).
|
||||
UTS 46 will convert this into lower case prior to applying the IDNA
|
||||
conversion.
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> import idna
|
||||
>>> idna.encode('Königsgäßchen')
|
||||
...
|
||||
idna.core.InvalidCodepoint: Codepoint U+004B at position 1 of 'Königsgäßchen' not allowed
|
||||
>>> idna.encode('Königsgäßchen', uts46=True)
|
||||
b'xn--knigsgchen-b4a3dun'
|
||||
>>> print(idna.decode('xn--knigsgchen-b4a3dun'))
|
||||
königsgäßchen
|
||||
|
||||
|
||||
Exceptions
|
||||
----------
|
||||
|
||||
All errors raised during the conversion following the specification
|
||||
should raise an exception derived from the ``idna.IDNAError`` base
|
||||
class.
|
||||
|
||||
More specific exceptions that may be generated as ``idna.IDNABidiError``
|
||||
when the error reflects an illegal combination of left-to-right and
|
||||
right-to-left characters in a label; ``idna.InvalidCodepoint`` when
|
||||
a specific codepoint is an illegal character in an IDN label (i.e.
|
||||
INVALID); and ``idna.InvalidCodepointContext`` when the codepoint is
|
||||
illegal based on its position in the string (i.e. it is CONTEXTO or CONTEXTJ
|
||||
but the contextual requirements are not satisfied.)
|
||||
|
||||
Building and Diagnostics
|
||||
------------------------
|
||||
|
||||
The IDNA and UTS 46 functionality relies upon pre-calculated lookup
|
||||
tables for performance. These tables are derived from computing against
|
||||
eligibility criteria in the respective standards using the command-line
|
||||
script ``tools/idna-data``.
|
||||
|
||||
This tool will fetch relevant codepoint data from the Unicode repository
|
||||
and perform the required calculations to identify eligibility. There are
|
||||
three main modes:
|
||||
|
||||
* ``idna-data make-libdata``. Generates ``idnadata.py`` and
|
||||
``uts46data.py``, the pre-calculated lookup tables used for IDNA and
|
||||
UTS 46 conversions. Implementers who wish to track this library against
|
||||
a different Unicode version may use this tool to manually generate a
|
||||
different version of the ``idnadata.py`` and ``uts46data.py`` files.
|
||||
|
||||
* ``idna-data make-table``. Generate a table of the IDNA disposition
|
||||
(e.g. PVALID, CONTEXTJ, CONTEXTO) in the format found in Appendix
|
||||
B.1 of RFC 5892 and the pre-computed tables published by `IANA
|
||||
<https://www.iana.org/>`_.
|
||||
|
||||
* ``idna-data U+0061``. Prints debugging output on the various
|
||||
properties associated with an individual Unicode codepoint (in this
|
||||
case, U+0061), that are used to assess the IDNA and UTS 46 status of a
|
||||
codepoint. This is helpful in debugging or analysis.
|
||||
|
||||
The tool accepts a number of arguments, described using ``idna-data
|
||||
-h``. Most notably, the ``--version`` argument allows the specification
|
||||
of the version of Unicode to be used in computing the table data. For
|
||||
example, ``idna-data --version 9.0.0 make-libdata`` will generate
|
||||
library data against Unicode 9.0.0.
|
||||
|
||||
|
||||
Additional Notes
|
||||
----------------
|
||||
|
||||
* **Packages**. The latest tagged release version is published in the
|
||||
`Python Package Index <https://pypi.org/project/idna/>`_.
|
||||
|
||||
* **Version support**. This library supports Python 3.8 and higher.
|
||||
As this library serves as a low-level toolkit for a variety of
|
||||
applications, many of which strive for broad compatibility with older
|
||||
Python versions, there is no rush to remove older interpreter support.
|
||||
Support for older versions are likely to be removed from new releases
|
||||
as automated tests can no longer easily be run, i.e. once the Python
|
||||
version is officially end-of-life.
|
||||
|
||||
* **Testing**. The library has a test suite based on each rule of the
|
||||
IDNA specification, as well as tests that are provided as part of the
|
||||
Unicode Technical Standard 46, `Unicode IDNA Compatibility Processing
|
||||
<https://unicode.org/reports/tr46/>`_.
|
||||
|
||||
* **Emoji**. It is an occasional request to support emoji domains in
|
||||
this library. Encoding of symbols like emoji is expressly prohibited by
|
||||
the technical standard IDNA 2008 and emoji domains are broadly phased
|
||||
out across the domain industry due to associated security risks. For
|
||||
now, applications that need to support these non-compliant labels
|
||||
may wish to consider trying the encode/decode operation in this library
|
||||
first, and then falling back to using `encodings.idna`. See `the Github
|
||||
project <https://github.com/kjd/idna/issues/18>`_ for more discussion.
|
||||
|
||||
* **Transitional processing**. Unicode 16.0.0 removed transitional
|
||||
processing so the `transitional` argument for the encode() method
|
||||
no longer has any effect and will be removed at a later date.
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,115 @@
|
||||
Metadata-Version: 2.4
|
||||
Name: soupsieve
|
||||
Version: 2.8.3
|
||||
Summary: A modern CSS selector implementation for Beautiful Soup.
|
||||
Project-URL: Homepage, https://github.com/facelessuser/soupsieve
|
||||
Author-email: Isaac Muse <Isaac.Muse@gmail.com>
|
||||
License-Expression: MIT
|
||||
License-File: LICENSE.md
|
||||
Keywords: CSS,HTML,XML,filter,query,selector,soup
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Environment :: Console
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: 3.13
|
||||
Classifier: Programming Language :: Python :: 3.14
|
||||
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Classifier: Typing :: Typed
|
||||
Requires-Python: >=3.9
|
||||
Description-Content-Type: text/markdown
|
||||
|
||||
[![Donate via PayPal][donate-image]][donate-link]
|
||||
[![Build][github-ci-image]][github-ci-link]
|
||||
[![Coverage Status][codecov-image]][codecov-link]
|
||||
[![PyPI Version][pypi-image]][pypi-link]
|
||||
[![PyPI Downloads][pypi-down]][pypi-link]
|
||||
[![PyPI - Python Version][python-image]][pypi-link]
|
||||
[![License][license-image-mit]][license-link]
|
||||
|
||||
# Soup Sieve
|
||||
|
||||
## Overview
|
||||
|
||||
Soup Sieve is a CSS selector library designed to be used with [Beautiful Soup 4][bs4]. It aims to provide selecting,
|
||||
matching, and filtering using modern CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
|
||||
specifications up through the latest CSS level 4 drafts and beyond (though some are not yet implemented).
|
||||
|
||||
Soup Sieve was written with the intent to replace Beautiful Soup's builtin select feature, and as of Beautiful Soup
|
||||
version 4.7.0, it now is :confetti_ball:. Soup Sieve can also be imported in order to use its API directly for
|
||||
more controlled, specialized parsing.
|
||||
|
||||
Soup Sieve has implemented most of the CSS selectors up through the latest CSS draft specifications, though there are a
|
||||
number that don't make sense in a non-browser environment. Selectors that cannot provide meaningful functionality simply
|
||||
do not match anything. Some of the supported selectors are:
|
||||
|
||||
- `.classes`
|
||||
- `#ids`
|
||||
- `[attributes=value]`
|
||||
- `parent child`
|
||||
- `parent > child`
|
||||
- `sibling ~ sibling`
|
||||
- `sibling + sibling`
|
||||
- `:not(element.class, element2.class)`
|
||||
- `:is(element.class, element2.class)`
|
||||
- `parent:has(> child)`
|
||||
- and [many more](https://facelessuser.github.io/soupsieve/selectors/)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
You must have Beautiful Soup already installed:
|
||||
|
||||
```
|
||||
pip install beautifulsoup4
|
||||
```
|
||||
|
||||
In most cases, assuming you've installed version 4.7.0, that should be all you need to do, but if you've installed via
|
||||
some alternative method, and Soup Sieve is not automatically installed, you can install it directly:
|
||||
|
||||
```
|
||||
pip install soupsieve
|
||||
```
|
||||
|
||||
If you want to manually install it from source, first ensure that [`build`](https://pypi.org/project/build/) is
|
||||
installed:
|
||||
|
||||
```
|
||||
pip install build
|
||||
```
|
||||
|
||||
Then navigate to the root of the project and build the wheel and install (replacing `<ver>` with the current version):
|
||||
|
||||
```
|
||||
python -m build -w
|
||||
pip install dist/soupsieve-<ver>-py3-none-any.whl
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is found here: https://facelessuser.github.io/soupsieve/.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[bs4]: https://beautiful-soup-4.readthedocs.io/en/latest/#
|
||||
|
||||
[github-ci-image]: https://github.com/facelessuser/soupsieve/workflows/build/badge.svg
|
||||
[github-ci-link]: https://github.com/facelessuser/soupsieve/actions?query=workflow%3Abuild+branch%3Amain
|
||||
[codecov-image]: https://img.shields.io/codecov/c/github/facelessuser/soupsieve/master.svg?logo=codecov&logoColor=aaaaaa&labelColor=333333
|
||||
[codecov-link]: https://codecov.io/github/facelessuser/soupsieve
|
||||
[pypi-image]: https://img.shields.io/pypi/v/soupsieve.svg?logo=pypi&logoColor=aaaaaa&labelColor=333333
|
||||
[pypi-down]: https://img.shields.io/pypi/dm/soupsieve.svg?logo=pypi&logoColor=aaaaaa&labelColor=333333
|
||||
[pypi-link]: https://pypi.python.org/pypi/soupsieve
|
||||
[python-image]: https://img.shields.io/pypi/pyversions/soupsieve?logo=python&logoColor=aaaaaa&labelColor=333333
|
||||
[license-image-mit]: https://img.shields.io/badge/license-MIT-blue.svg?labelColor=333333
|
||||
[license-link]: https://github.com/facelessuser/soupsieve/blob/main/LICENSE.md
|
||||
[donate-image]: https://img.shields.io/badge/Donate-PayPal-3fabd1?logo=paypal
|
||||
[donate-link]: https://www.paypal.me/facelessuser
|
||||
Binary file not shown.
@@ -0,0 +1,131 @@
|
||||
Metadata-Version: 2.4
|
||||
Name: asyncpg
|
||||
Version: 0.31.0
|
||||
Summary: An asyncio PostgreSQL driver
|
||||
Author-email: MagicStack Inc <hello@magic.io>
|
||||
License-Expression: Apache-2.0
|
||||
Project-URL: github, https://github.com/MagicStack/asyncpg
|
||||
Keywords: database,postgres
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Framework :: AsyncIO
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Operating System :: POSIX
|
||||
Classifier: Operating System :: MacOS :: MacOS X
|
||||
Classifier: Operating System :: Microsoft :: Windows
|
||||
Classifier: Programming Language :: Python :: 3 :: Only
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: 3.13
|
||||
Classifier: Programming Language :: Python :: 3.14
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
|
||||
Classifier: Topic :: Database :: Front-Ends
|
||||
Requires-Python: >=3.9.0
|
||||
Description-Content-Type: text/x-rst
|
||||
License-File: LICENSE
|
||||
Requires-Dist: async_timeout>=4.0.3; python_version < "3.11.0"
|
||||
Provides-Extra: gssauth
|
||||
Requires-Dist: gssapi; platform_system != "Windows" and extra == "gssauth"
|
||||
Requires-Dist: sspilib; platform_system == "Windows" and extra == "gssauth"
|
||||
Dynamic: license-file
|
||||
|
||||
asyncpg -- A fast PostgreSQL Database Client Library for Python/asyncio
|
||||
=======================================================================
|
||||
|
||||
.. image:: https://github.com/MagicStack/asyncpg/workflows/Tests/badge.svg
|
||||
:target: https://github.com/MagicStack/asyncpg/actions?query=workflow%3ATests+branch%3Amaster
|
||||
:alt: GitHub Actions status
|
||||
.. image:: https://img.shields.io/pypi/v/asyncpg.svg
|
||||
:target: https://pypi.python.org/pypi/asyncpg
|
||||
|
||||
**asyncpg** is a database interface library designed specifically for
|
||||
PostgreSQL and Python/asyncio. asyncpg is an efficient, clean implementation
|
||||
of PostgreSQL server binary protocol for use with Python's ``asyncio``
|
||||
framework. You can read more about asyncpg in an introductory
|
||||
`blog post <http://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/>`_.
|
||||
|
||||
asyncpg requires Python 3.9 or later and is supported for PostgreSQL
|
||||
versions 9.5 to 18. Other PostgreSQL versions or other databases
|
||||
implementing the PostgreSQL protocol *may* work, but are not being
|
||||
actively tested.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
The project documentation can be found
|
||||
`here <https://magicstack.github.io/asyncpg/current/>`_.
|
||||
|
||||
|
||||
Performance
|
||||
-----------
|
||||
|
||||
In our testing asyncpg is, on average, **5x** faster than psycopg3.
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/MagicStack/asyncpg/master/performance.png?fddca40ab0
|
||||
:target: https://gistpreview.github.io/?0ed296e93523831ea0918d42dd1258c2
|
||||
|
||||
The above results are a geometric mean of benchmarks obtained with PostgreSQL
|
||||
`client driver benchmarking toolbench <https://github.com/MagicStack/pgbench>`_
|
||||
in June 2023 (click on the chart to see full details).
|
||||
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
asyncpg implements PostgreSQL server protocol natively and exposes its
|
||||
features directly, as opposed to hiding them behind a generic facade
|
||||
like DB-API.
|
||||
|
||||
This enables asyncpg to have easy-to-use support for:
|
||||
|
||||
* **prepared statements**
|
||||
* **scrollable cursors**
|
||||
* **partial iteration** on query results
|
||||
* automatic encoding and decoding of composite types, arrays,
|
||||
and any combination of those
|
||||
* straightforward support for custom data types
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
asyncpg is available on PyPI. When not using GSSAPI/SSPI authentication it
|
||||
has no dependencies. Use pip to install::
|
||||
|
||||
$ pip install asyncpg
|
||||
|
||||
If you need GSSAPI/SSPI authentication, use::
|
||||
|
||||
$ pip install 'asyncpg[gssauth]'
|
||||
|
||||
For more details, please `see the documentation
|
||||
<https://magicstack.github.io/asyncpg/current/installation.html>`_.
|
||||
|
||||
|
||||
Basic Usage
|
||||
-----------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import asyncio
|
||||
import asyncpg
|
||||
|
||||
async def run():
|
||||
conn = await asyncpg.connect(user='user', password='password',
|
||||
database='database', host='127.0.0.1')
|
||||
values = await conn.fetch(
|
||||
'SELECT * FROM mytable WHERE id = $1',
|
||||
10,
|
||||
)
|
||||
await conn.close()
|
||||
|
||||
asyncio.run(run())
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
asyncpg is developed and distributed under the Apache 2.0 license.
|
||||
Reference in New Issue
Block a user