AsyncPG Wrapper
Легкая в обращении обёртка над AsyncPG
версия 0.1.2
Wrapper принимает и возращает только объекты типа dict() и List[dict]
Установка
pip install asyncpg-wrapper
Инициализация в коде
from asyncpg_wrapper import AsyncDB
dsn = "postgresql://username:password@host:port/dbname"
db = AsyncDB(dsn)
Примеры операций:
new_record = await db.insert('users', {'first_name': 'John', 'last_name': 'Doe'})
print(new_record)
l = [{'first_name': f'John{i}', 'last_name': f'Doe{i}'} for i in range(0, 1000)]
new_records = await db.insertmany('users', l)
print(new_records)
updated_record = await db.update('users', "id=1", {'first_name': 'Jane'})
print(updated_record)
deleted_records = await db.delete('users', "first_name='Jane'")
print(deleted_records)
deleted_records = await db.delete('users')
print(deleted_records)
selected_records = await db.select('users', 'id=1')
print(selected_records)
selected_records = await db.select('users')
print(selected_records)
Metadata
Release files for asyncpg-wrapper 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| asyncpg_wrapper-0.1.2.tar.gz | 3.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asyncpg_wrapper-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / asyncpg_wrapper-0.1.2.tar.gz
| Download URL | asyncpg_wrapper-0.1.2.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3be8dcac26c518d5ffc414937cf32a984e79dce61d8f54a24bd7f49851f8e124
|
|
BLAKE2b-256 checksum How to use checksums |
3c914ca9989c0d45eda279ad413c63431baeea1dc36b3742496e5a0977f36e0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.0
|
Release files / asyncpg_wrapper-0.1.2-py3-none-any.whl
| Download URL | asyncpg_wrapper-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3535cf6aec6d57fb245b9d2c9f5a3de7c4c3180eb268d9ebfaee65976a03b06b
|
|
BLAKE2b-256 checksum How to use checksums |
034f8028255fdc28e3b19ea40fba962babbe7b133ba5f291b155a78666cb9e5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.0
|
Security for asyncpg-wrapper 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.