Skip to content

Instantly share code, notes, and snippets.

Fabien Arcellier FabienArcellier

  • Stackeo
  • Paris
View GitHub Profile
uppfinnarjohnny /
Created Apr 14, 2012
Simple DI Container for Python, inspired by Pimple (
class Container(dict):
def __init__(self, *args, **kwargs):
super(Container, self).__init__(*args, **kwargs)
self._shared = set()
self._instances = {}
def __getitem__(self, key):
if key in self._instances:
return self._instances[key]
Halleck45 / phing-audit.xml
Created Sep 27, 2012
Mini audit de code avec phing
View phing-audit.xml
<?xml version="1.0" ?>
<project name="audit" basedir="." default="audit">
<property name="style" value="ZEND" />
<property name="test" value="${source}/../test" />
<property name="test-bootstrap" value="" />
<target name="prepare">
<mkdir dir="${out}" />
miohtama /
Created Jun 4, 2015
Perform database sync sanity check to SQLAlchemy models on application startup
import logging
from sqlalchemy import inspect
from sqlalchemy.ext.declarative.clsregistry import _ModuleMarker
from sqlalchemy.orm import RelationshipProperty
logger = logging.getLogger(__name__)
def is_sane_database(Base, session):
You can’t perform that action at this time.