Why did you speak ?

I came across this parable in the book, I am currently reading. It is a Marathi translation of Biography of J. P. Vaswani “Guru of None, Disciple of All” Parable In one of the incarnation, Buddha was a prince, who did not speak. Everyone assumed he “could” not speak. Years passed. Once the prince was traveling thru the forest. He heard two birds “talk”. A hunter heard the sound, and immediately killed one of the birds.

Using ForeignKey in Abstract Base Class (SQLAlchemy)

I was creating an abstract base class containing FK, like this : 1 2 3 class MyBase(Base): name = Column(String(30)) fk1 = Column(Integer, ForeignKey('table1.id')) but kept getting the error : 1 2 sqlalchemy.exc.InvalidRequestError: Columns with foreign keys to other columns must be declared as @declared_attr callables on declarative mixin classes. Reading thru the docs was not helpful because the example used for @declared_attr is somewhat different

KeePass on the Web (KeeWeb)

Why is this interesting to me ? Since LastPass was acquired. I switched to Dashlane, which seems good, but there is this nagging feeling that Dashlane might stop the free version, or something. I had used KeePass long time ago. But the Problem is “syncing” KeePass Web solves (in theory) this problem by supporting Dropbox syncing “out of the box”. All I really need is backup. If you are interested, you can download KeeWeb here

How to define Primary Composite Key in SQLAlchemy

When using fully declared table metadata,use the primary_key=True flag on those columns: 1 2 3 4 5 class Dummy(Base): __tablename__ = "dummy" pk1 = Column(Integer, primary_key=True) pk2 = Column(String, primary_key=True) This will create the following table (in postgres) : testdb=> \d dummy; Table "public.dummy" Column | Type | Modifiers -------+-------------------+----------------------------------------------------- pk1 | integer | not null default nextval('dummy_pk1_seq'::regclass) pk2 | character varying | not null Indexes: "dummy_pkey" PRIMARY KEY, btree (pk1, pk2) See SQLAlchemy documentation