Created
March 1, 2013 02:38
-
-
Save lucidguppy/5062088 to your computer and use it in GitHub Desktop.
Create an sql table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import * | |
from datetime import datetime | |
metadata = MetaData('postgres://blah blah blah') | |
temperature_table = Table( | |
'tf_temperatures', metadata, | |
Column('id', Integer, primary_key=True), | |
Column('temperature', Float, nullable=False), | |
Column('datetime',DateTime, default=datetime.now)) | |
metadata.create_all() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment