Skip to main content

SQLAlchemy Mixins to store functions for later execution

Project description


SQLAlchemy-Function defines a SQLALchemy Mixin for creating Function models.

A Function model has a parent (optional), a function, arguments, and keyword arguments. When called, the Function model executes its function, passing in its parent (if applicable), its arguments, and its keyword arguments.


Suppose we have a function, foo, which we want to store. We also want to store the arguments and keyword arguments with which we will later execute foo.

After setup, we can achieve this with the following:

def foo(*args, **kwargs):
    print('My arguments are:', args)
    print('My keyword arguments are:', kwargs)
    return 'hello world'

f = Function(func=foo, args=['hello moon'], kwargs={'hello': 'star'})


My arguments are: ('hello moon',)
My keyword arguments are: {'hello': 'star'}
hello world


You can find the latest documentation at


Publications which use this software should include the following citation for SQLAlchemy-Function and its dependency, SQLAlchemy-Mutable:

Bowen, D.S. (2019). SQLAlchemy-Function [Computer software].

Bowen, D.S. (2019). SQLAlchemy-Mutable [Computer software].

This project is licensed under the MIT License LICENSE.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sqlalchemy-function, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size sqlalchemy_function-0.0.1-py3-none-any.whl (4.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sqlalchemy-function-0.0.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page