Skip to main content

Muffin-SqlAlchemy

Muffin-SqlAlchemy – A simple sqlalchemy helper plugin for muffin framework.

Build Status

Requirements

  • python >= 3.4

  • muffin >= 0.5.5

Installation

Muffin-SqlAlchemy should be installed using pip:

pip install muffin-sqlalchemy

Usage

Add muffin-sqlalchemy to muffin plugin list:

import muffin


app = muffin.Application(
    'example',

    PLUGINS=(
        'muffin_sqlalchemy',
    )
)

And use sqlalchemy session in request object:

@app.register('/foo')
class Example(muffin.Handler):

    @asyncio.coroutine
    def post(self, request):
        foo = FooModel(name='foo')
        session = request.sqlalchemy_session
        session.add(foo)
        session.commit()
        return 'Ok'

Options

SQLALCHEMY_DATABASE_URI

URI of database (sqlite:///muffin.db)

Commands

The plugin adds some commands to your Muffin application.

Create Databse

Create all tables in database according to you engine:

$ muffin app_module create_databse

to work fine inherit from muffin_sqalchemy.SqlAlchemyDeclarativeBase to create yours sqlalchemy models

Bug tracker

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

Contributing

Development of Muffin-SqlAlchemy happens at: https://github.com/drgarcia1986/muffin-sqlalchemy

Contributors

License

Licensed under a MIT license.

Metadata

Release files for muffin-sqlalchemy 0.0.4

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-sqlalchemy 0.0.4
File Size Uploaded Provenance Actions
muffin-sqlalchemy-0.0.4.tar.gz 4.0 kB Without provenance Details for muffin-sqlalchemy-0.0.4.tar.gz

Release files / muffin-sqlalchemy-0.0.4.tar.gz

Download URL muffin-sqlalchemy-0.0.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
45c619693ac8c51536ac8faa4780d9d3ebc33778e150a5e0cfa9d6ff2d98055b
BLAKE2b-256 checksum
How to use checksums
6456074aea5fcb5567fe6f9a5dbef0237cec68f1223efcee5055676a6c841e56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for muffin-sqlalchemy 0.0.4

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.

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