Skip to main content

Quart-Peewee

Integration between the Quart web framework and the Peewee ORM through the Peewee-AIO

Installation

pip install quart-peewee

Usage

from peewee_aio.fields import CharField
from quart import Quart, request
from quart_peewee import QuartPeewee

app = Quart(__name__)
db = QuartPeewee("aiosqlite:///app.db")
db.init_app(app)


class User(db.Model):
    name = CharField(unique=True)


@app.before_serving
async def before_serving():
    await db.create_tables()


@app.route("/create_user", methods=["POST"])
async def create_user():
    data = await request.get_json(force=True)
    await User.create(name=data["name"])
    return ""


@app.route("/get_users", methods=["GET"])
async def get_users():
    return await User.select().dicts()


@app.route("/delete_user", methods=["DELETE"])
async def delete_user():
    data = await request.get_json(force=True)
    await User.delete().where(User.name == data["name"])
    return ""


if __name__ == "__main__":
    app.run()

Metadata

Release files for quart-peewee 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quart-peewee 0.1.1
File Size Uploaded Provenance Actions
quart_peewee-0.1.1.tar.gz 2.4 kB Without provenance Details for quart_peewee-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quart-peewee 0.1.1
File Interpreter ABI Platform Actions
quart_peewee-0.1.1-py3-none-any.whl Python 3 none any Details for quart_peewee-0.1.1-py3-none-any.whl

Total release size: 5.3 kB

Release files / quart_peewee-0.1.1.tar.gz

Download URL quart_peewee-0.1.1.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b7e640d59c814cb63831eaa87620a98b13f229cdb87e1b29d475a0344625ef08
BLAKE2b-256 checksum
How to use checksums
9509ffc65d6ccec017294ef21218aefad551ab48fe5f3fec27a28fe645d1f9b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / quart_peewee-0.1.1-py3-none-any.whl

Download URL quart_peewee-0.1.1-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6265a7347fe7bba19c93bd7be2438250e9b0925cded6f486c1257258ab827573
BLAKE2b-256 checksum
How to use checksums
fa18bb8605da88a2a99f3d7113d1e89641fd9fd39cf7cc8e3d4b1e7b27617bc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Security for quart-peewee 0.1.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page