No project description provided
Project description
duckdb_engine
Very very very basic sqlalchemy driver for duckdb
Once you install this package, you should be able to just use it, as sqlalchemy does a python path search
from sqlalchemy import Column, Integer, Sequence, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm.session import Session
Base = declarative_base()
class FakeModel(Base): # type: ignore
__tablename__ = "fake"
id = Column(Integer, Sequence("fakemodel_id_sequence"), primary_key=True)
name = Column(String)
eng = create_engine("duckdb:///:memory:")
Base.metadata.create_all(eng)
session = Session(bind=eng)
session.add(FakeModel(name="Frank"))
session.commit()
frank = session.query(FakeModel).one()
assert frank.name == "Frank"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
duckdb_engine-0.1.3.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for duckdb_engine-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b08e43b6261ea614d2b7782ca90690585faa38a00593d1c3e4077a22e3d5aa45 |
|
MD5 | aae80d2382e99a964482248019613c99 |
|
BLAKE2b-256 | 767c229241e65f81b0ea0d0fd1b588713b20e129b3f5a34e702510fa3c63174d |