Skip to main content

A SQLAlchemy backed call trace store for MonkeyType

Project description

Monkeytype SQLAlchemy

A SQLAlchemy-backed store for use with monkeytype by Instagram.

This store is schema-compatible with the default SQLite-backend store, merely using SQLAlchemy for database interactions. This allows easy use of any database dialect supported by SQLAlchemy

Usage

Create a monkeytype_config.py in your project folder as suggested by the MonkeyType docs

from monkeytype_sqlalchemy import SQLAlchemyConfig

CONFIG = SQLAlchemyConfig()

Alternately, modify your Config class to return an instance of the SQLAlchemyStore call trace store

from monkeytype.config import Config
from monkeytype.db.base import CallTraceStore
from monkeytype_sqlalchemy import SQLAlchemyStore

class MyConfig(Config):
    def trace_store(self) -> CallTraceStore:
        return SQLAlchemyStore.make_store("postgresql+psycopg:///localhost/my_database")

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Files for monkeytype-sqlalchemy, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size monkeytype_sqlalchemy-0.1.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page