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
# -*- coding: utf-8 -*- | |
from sqlalchemy import Column, Time, Integer, Boolean, create_engine | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
# SQL statements and expressions API | |
# cf. http://docs.sqlalchemy.org/en/rel_0_7/core/expression_api.html | |
from sqlalchemy import and_, extract |
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
setup.py のあるディレクトリで、とりあえずバージョンを確認: | |
$ python setup.py --version | |
PyPIにソース配布物をアップロードする: | |
$ python setup.py sdist upload | |
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
# -*- coding: utf-8 -*- | |
from sqlalchemy import Column, String, Integer, ForeignKey, create_engine | |
from sqlalchemy.orm import sessionmaker, relation | |
from sqlalchemy.ext import declarative | |
engine = create_engine('sqlite:///:memory:') | |
Session = sessionmaker(bind=engine) | |
session = Session() |