Skip to main content
Muffin Peewee Async
#############

.. _description:

Muffin Peewee Async -- Peewee integration to Muffin framework using peewee-async.

Based on https://github.com/klen/muffin-peewee with an ability to execute asynchronous queries.


Installation
=============

**Muffin Peewee Async** should be installed using pip: ::

pip install muffin-peewee-async


Usage
=====

Add `muffin_peewee_async` to `PLUGINS` in your Muffin Application configuration.

Or install it manually like this: ::

db = muffin_peewee_async.Plugin(**{'options': 'here'})

app = muffin.Application('test')
app.install(db)


Options
-------

`PEEWEE_ASYNC_CONNECTION` -- connection string to your database (postgres://postgres:postgres@127.0.0.1)

`PEEWEE_ASYNC_CONNECTION_PARAMS` -- Additional params for connection ({})

`PEEWEE_ASYNC_MIGRATIONS_PATH` -- path to migration folder (migrations)

Queries
-------

::
import peewee_async

@app.ps.peewee_async.register
class Test(peewee.Model):
data = peewee.CharField()


@app.register
async def view(request):
tests = await peewee_async.select(Test.select())
return [t.data for t in tests]


Migrations
----------

Create migrations: ::

$ muffin example:app pw_create [NAME] [--auto]


Run migrations: ::

$ muffin example:app pw_migrate [NAME] [--fake]


Rollback migrations: ::

$ muffin example:app pw_rollback NAME


Load/Dump data to CSV
---------------------

Dump table `test` to CSV file: ::

$ muffin example:app pw_dump test


Load data from CSV file to table `test`: ::

$ muffin example:app pw_load test


.. _bugtracker:

Bug tracker
===========

If you have any suggestions, bug reports or
annoyances please report them to the issue tracker
at https://github.com/serathius/muffin-peewee-async/issues

.. _contributing:

Contributing
============

Development of Muffin Peewee Async happens at: https://github.com/serathius/muffin-peewee-async


Contributors
=============

* serathius (Marek Siarkowicz)

.. _license:

License
=======

Licensed under a `MIT license`_.

.. _links:

.. _MIT license: http://opensource.org/licenses/MIT

Metadata

Release files for muffin-peewee-async 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 muffin-peewee-async 0.1.1
File Size Uploaded Provenance Actions
muffin-peewee-async-0.1.1.tar.gz 4.8 kB Without provenance Details for muffin-peewee-async-0.1.1.tar.gz

Release files / muffin-peewee-async-0.1.1.tar.gz

Download URL muffin-peewee-async-0.1.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
424bd090c07e36ac2740b22f278337646cc2709166f20193a449106adae6da12
BLAKE2b-256 checksum
How to use checksums
570fce54ca6106200d8f5d97030861d04319412f2189d6d056d12a903597a758
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for muffin-peewee-async 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

1 release file 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