{"action":"created","comment":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/comments/36431938","id":36431938,"diff_hunk":"@@ -81,237 +83,176 @@ class AssetDBWriter(with_metaclass(ABCMeta)):\n \n     Methods\n     -------\n-    write_all(db_conn, fuzzy_char=None, allow_sid_assignment=True,\n+    write_all(engine, fuzzy_char=None, allow_sid_assignment=True,\n               constraints=False)\n         Write the data supplied at initialization to the database.\n-    init_db(db_conn, constraints=False)\n+    init_db(engine, constraints=False)\n         Create the SQLite tables (called by write_all).\n-    load_data(self)\n+    load_data()\n         Returns data in standard format.\n \n     \"\"\"\n+    def __init__(self):\n+        self.sql_metadata = None\n \n-    def write_all(self, db_conn, fuzzy_char=None, allow_sid_assignment=True,\n+    def write_all(self,\n+                  engine,\n+                  fuzzy_char=None,\n                   constraints=False):\n         \"\"\" Write pre-supplied data to SQLite.\n \n         Parameters\n         ----------\n-        db_conn: sqlite3.Connection\n-            A connection to a SQLite database.\n-        fuzzy_char: string\n+        engine : Engine\n+            An engine to a SQL database.\n+        fuzzy_char : str, optional\n             A string for use in fuzzy matching.\n-        allow_sid_assignment: boolean\n+        allow_sid_assignment: bool, optional\n             If True then the class can assign sids where necessary.\n-        constraints: boolean\n+        constraints : bool, optional\n             If True, create SQL ForeignKey and Index constraints.\n \n         \"\"\"\n-        self.fuzzy_char = fuzzy_char\n-        self.allow_sid_assignment = allow_sid_assignment\n-        if allow_sid_assignment:\n-            ts = normalize_date(pd.Timestamp('now', tz='UTC'))\n-            # Store as seconds since UNIX Epoch for compatibility\n-            # with SQL.\n-            self.end_date_to_assign = (ts.value // 10 ** 9)\n-\n-        # Store a nested-dict of all metadata for\n-        # reference when building Assets\n-        self.metadata_cache = {}\n-\n         # Create SQL tables\n-        self.init_db(db_conn, constraints)\n-\n+        self.init_db(engine, constraints)\n         # Get the data to add to SQL\n         equities, futures, exchanges, root_symbols = self.load_data()\n+        with engine.begin() as txn:\n+            self._write_exchanges(exchanges, txn)\n+            self._write_root_symbols(root_symbols, txn)\n+            self._write_futures(futures, txn)\n+            self._write_equities(equities, txn)\n+\n+    def _write_exchanges(self, exchanges, bind=None):\n+        self.futures_exchanges.insert().values(\n+            exchanges.to_records(),\n+        ).execute(bind=bind)\n+\n+    def _write_root_symbols(self, root_symbols, bind=None):\n+        self.futures_root_symbols.insert().values(\n+            root_symbols.to_records(),\n+        ).execute(bind=bind)\n+\n+    def _write_futures(self, futures, bind=None):\n+        recs = futures.to_records()\n+        self.futures_contracts.insert().values(recs).execute(bind=bind)\n+        self.asset_router.insert().values([\n+            (rec['sid'], 'future') for rec in recs\n+        ]).execute(bind=bind)\n+\n+    def _write_equities(self, equities, fuzzy_char, bind=None):\n+        # Apply fuzzy matching.\n+        if fuzzy_char:\n+            equities['fuzzy'] = equities['symbol'].str.replace(fuzzy_char, '')\n \n-        c = db_conn.cursor()\n-        # Write to the SQL tables, using the raw SQL driver instead\n-        # of the pandas.DataFrame.to_sql method, as the former\n-        # allows us to create an SQL transaction\n-        c.execute('BEGIN')\n-        # Everything between here and the db_conn.commit()\n-        # will be part of of the same SQL transaction.\n-        self._write_exchanges(exchanges, db_conn)\n-        self._write_root_symbols(root_symbols, db_conn)\n-        self._write_futures(futures, db_conn)\n-        self._write_equities(equities, db_conn)\n-        db_conn.commit()\n-\n-    def _write_exchanges(self, exchanges, db_conn):\n-\n-        data = [tuple(x) for x in exchanges.to_records()]\n-\n-        c = db_conn.cursor()\n-        # The OR IGNORE syntax means we do not insert data\n-        # which would violate an SQL constraint.\n-        c.executemany(\"\"\"\n-            INSERT OR IGNORE INTO futures_exchanges\n-            ('exchange_id', 'exchange', 'timezone')\n-            VALUES (?, ?, ?)\n-            \"\"\", data)\n-\n-    def _write_root_symbols(self, root_symbols, db_conn):\n-\n-        data = [tuple(x) for x in root_symbols.to_records()]\n-\n-        c = db_conn.cursor()\n-        c.executemany(\"\"\"\n-            INSERT OR IGNORE INTO futures_root_symbols\n-            ('root_symbol_id', 'root_symbol', 'sector',\n-             'description', 'exchange_id')\n-            VALUES(?, ?, ?, ?, ?)\n-        \"\"\", data)\n-\n-    def _write_futures(self, futures, db_conn):\n-\n-        # Retrieve the data to add to the futures_contracts table\n-        data = [tuple(x) for x in futures.to_records()]\n-\n-        # Retrieve the data to add to the asset_router table\n-        sids = [x[0] for x in data]\n-        futs = ['future'] * len(sids)\n-        to_insert = zip(sids, futs)\n-\n-        c = db_conn.cursor()\n-        c.executemany(\"\"\"\n-            INSERT OR IGNORE INTO futures_contracts\n-            ('sid', 'symbol', 'root_symbol', 'asset_name',\n-             'start_date', 'end_date', 'first_traded', 'exchange',\n-             'notice_date', 'expiration_date', 'contract_multiplier')\n-            VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n-        \"\"\", data)\n-\n-        c.executemany(\"\"\"\n-            INSERT INTO asset_router\n-            ('sid', 'asset_type')\n-            VALUES(?,?)\n-        \"\"\", to_insert)\n-\n-    def _write_equities(self, equities, db_conn):\n+        recs = equities.to_records()\n+        self.equities.insert().values(recs).execute(bind=bind)\n+        self.asset_router.insert().values([\n+            (rec['sid'], 'equity') for rec in recs\n+        ]).execute(bind=bind)\n \n-        # Apply fuzzy matching.\n-        if self.fuzzy_char:\n-            equities['fuzzy'] = equities['symbol'].str.\\\n-                replace(self.fuzzy_char, '')\n-\n-        # Retrieve the data to add to the equitites table\n-        data = [tuple(x) for x in equities.to_records()]\n-\n-        # Retrieve the data to add to the asset_router table\n-        sids = [x[0] for x in data]\n-        eqs = ['equity'] * len(sids)\n-        to_insert = zip(sids, eqs)\n-\n-        c = db_conn.cursor()\n-        c.executemany(\"\"\"\n-            INSERT OR IGNORE INTO equities\n-            ('sid', 'symbol', 'asset_name', 'start_date',\n-             'end_date', 'first_traded', 'exchange', 'fuzzy')\n-            VALUES(?, ?, ?, ?, ?, ?, ?, ?)\n-        \"\"\", data)\n-\n-        c.executemany(\"\"\"\n-            INSERT INTO asset_router\n-            ('sid', 'asset_type')\n-            VALUES(?,?)\n-        \"\"\", to_insert)\n-\n-    def init_db(self,\n-                db_conn,\n-                constraints=False):\n+    def init_db(self, engine, constraints=False):\n         \"\"\"Connect to database and create tables.\n \n         Parameters\n         ----------\n-        db_conn: sqlite3.Connection\n-            A connection to a SQLite database.\n-        constraints: boolean\n+        engine : Engine\n+            An engine to a SQL database.\n+        constraints : bool\n             If True, create SQL ForeignKey and Index constraints.\n         \"\"\"\n-\n-        c = db_conn.cursor()\n-\n-        c.execute(\"\"\"\n-            CREATE TABLE IF NOT EXISTS equities (\n-            sid INTEGER NOT NULL,\n-            symbol TEXT,\n-            asset_name TEXT,\n-            start_date INTEGER DEFAULT 0,\n-            end_date INTEGER,\n-            first_traded INTEGER,\n-            exchange TEXT,\n-            fuzzy TEXT\n-        )\"\"\")\n-\n-        c.execute(\"\"\"\n-            CREATE TABLE IF NOT EXISTS futures_exchanges (\n-            exchange_id INTEGER NOT NULL,\n-            exchange TEXT,\n-            timezone TEXT\n-        )\"\"\")\n-\n-        c.execute(\"\"\"\n-            CREATE TABLE IF NOT EXISTS futures_root_symbols (\n-            root_symbol_id INTEGER NOT NULL,\n-            root_symbol TEXT,\n-            sector TEXT,\n-            description TEXT,\n-            exchange_id INTEGER{fk}\n-        )\"\"\".format(fk=\", FOREIGN KEY(exchange_id) REFERENCES \"\n-                    \"futures_exchanges(exchange_id)\"\n-                    if constraints else \"\"))\n-\n-        c.execute(\"\"\"\n-            CREATE TABLE IF NOT EXISTS futures_contracts (\n-            sid INTEGER NOT NULL,\n-            symbol TEXT,\n-            root_symbol_id INTEGER,\n-            root_symbol TEXT,\n-            asset_name TEXT,\n-            start_date INTEGER DEFAULT 0,\n-            end_date INTEGER,\n-            first_traded INTEGER,\n-            exchange_id INTEGER,\n-            exchange TEXT,\n-            notice_date INTEGER,\n-            expiration_date INTEGER,\n-            contract_multiplier REAL{fk}\n-        )\"\"\".format(fk=\", FOREIGN KEY(exchange_id) REFERENCES \"\n-                    \"futures_exchanges(exchange_id), \"\n-                    \"FOREIGN KEY(root_symbol_id) REFERENCES \"\n-                    \"futures_root_symbols(root_symbol_id)\"\n-                    if constraints else \"\"))\n-\n-        c.execute(\"\"\"\n-            CREATE TABLE IF NOT EXISTS asset_router\n-            (sid integer,\n-            asset_type text\n-        )\"\"\")\n-\n-        # Note: Would be optimal to use INTEGER PRIMARY KEY here, but SQLite\n-        # tables cannot be modified after creation. Using CREATE UNIQUE INDEX\n-        # only marginally less performant.\n-        if constraints:\n-\n-            c.execute('CREATE UNIQUE INDEX IF NOT EXISTS ix_equities_sid '\n-                      'ON equities(sid)')\n-            c.execute('CREATE UNIQUE INDEX IF NOT EXISTS ix_equities_symbol '\n-                      'ON equities(symbol)')\n-            c.execute('CREATE UNIQUE INDEX IF NOT EXISTS ix_equities_fuzzy '\n-                      'ON equities(fuzzy)')\n-            c.execute('CREATE UNIQUE INDEX IF NOT EXISTS ix_futures_exchanges_en '   # noqa\n-                      'ON futures_exchanges(exchange_id)')\n-            c.execute('CREATE UNIQUE INDEX IF NOT EXISTS ix_futures_contracts_sid '  # noqa\n-                      'ON futures_contracts(sid)')\n-            c.execute('CREATE UNIQUE INDEX IF NOT EXISTS ix_futures_root_symbols_id '  # noqa\n-                      'ON futures_root_symbols(root_symbol_id)')\n-            c.execute('CREATE UNIQUE INDEX IF NOT EXISTS ix_asset_router_sid  '\n-                      'ON asset_router(sid)')\n-\n-        # Note: Also need a max_date table.\n-\n-        db_conn.commit()\n+        self.sql_metadata = metadata = sa.MetaData(bind=engine)\n+        self.equities = sa.Table(\n+            'equities',\n+            metadata,\n+            sa.Column(","path":"zipline/assets/asset_writer.py","position":367,"original_position":367,"commit_id":"d0b22022b0dd8a6c1d37237080ad689f56fb6e5f","original_commit_id":"d0b22022b0dd8a6c1d37237080ad689f56fb6e5f","user":{"login":"ssanderson","id":1588357,"avatar_url":"https://avatars.githubusercontent.com/u/1588357?v=3","gravatar_id":"","url":"https://api.github.com/users/ssanderson","html_url":"https://github.com/ssanderson","followers_url":"https://api.github.com/users/ssanderson/followers","following_url":"https://api.github.com/users/ssanderson/following{/other_user}","gists_url":"https://api.github.com/users/ssanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/ssanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssanderson/subscriptions","organizations_url":"https://api.github.com/users/ssanderson/orgs","repos_url":"https://api.github.com/users/ssanderson/repos","events_url":"https://api.github.com/users/ssanderson/events{/privacy}","received_events_url":"https://api.github.com/users/ssanderson/received_events","type":"User","site_admin":false},"body":"I'd say that regardless of whether `constraints` defaults to something, there should always be a unique constraint on this column.  Having multiple entries in the database for a given sid is always a bug.","created_at":"2015-08-06T16:01:05Z","updated_at":"2015-08-06T16:01:05Z","html_url":"https://github.com/quantopian/zipline/pull/670#discussion_r36431938","pull_request_url":"https://api.github.com/repos/quantopian/zipline/pulls/670","_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments/36431938"},"html":{"href":"https://github.com/quantopian/zipline/pull/670#discussion_r36431938"},"pull_request":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/670"}}},"pull_request":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/670","id":41737408,"html_url":"https://github.com/quantopian/zipline/pull/670","diff_url":"https://github.com/quantopian/zipline/pull/670.diff","patch_url":"https://github.com/quantopian/zipline/pull/670.patch","issue_url":"https://api.github.com/repos/quantopian/zipline/issues/670","number":670,"state":"open","locked":false,"title":"ENH: sqlalchemy","user":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars.githubusercontent.com/u/3064397?v=3","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-05T23:21:04Z","updated_at":"2015-08-06T16:01:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"918ad14107da3aef4894f1649c241a3243cac561","assignee":{"login":"StewartDouglas","id":5628197,"avatar_url":"https://avatars.githubusercontent.com/u/5628197?v=3","gravatar_id":"","url":"https://api.github.com/users/StewartDouglas","html_url":"https://github.com/StewartDouglas","followers_url":"https://api.github.com/users/StewartDouglas/followers","following_url":"https://api.github.com/users/StewartDouglas/following{/other_user}","gists_url":"https://api.github.com/users/StewartDouglas/gists{/gist_id}","starred_url":"https://api.github.com/users/StewartDouglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StewartDouglas/subscriptions","organizations_url":"https://api.github.com/users/StewartDouglas/orgs","repos_url":"https://api.github.com/users/StewartDouglas/repos","events_url":"https://api.github.com/users/StewartDouglas/events{/privacy}","received_events_url":"https://api.github.com/users/StewartDouglas/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/quantopian/zipline/pulls/670/commits","review_comments_url":"https://api.github.com/repos/quantopian/zipline/pulls/670/comments","review_comment_url":"https://api.github.com/repos/quantopian/zipline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quantopian/zipline/issues/670/comments","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/d0b22022b0dd8a6c1d37237080ad689f56fb6e5f","head":{"label":"quantopian:sqlalchemize","ref":"sqlalchemize","sha":"d0b22022b0dd8a6c1d37237080ad689f56fb6e5f","user":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"repo":{"id":6297520,"name":"zipline","full_name":"quantopian/zipline","owner":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quantopian/zipline","description":"Zipline, a Pythonic Algorithmic Trading Library","fork":false,"url":"https://api.github.com/repos/quantopian/zipline","forks_url":"https://api.github.com/repos/quantopian/zipline/forks","keys_url":"https://api.github.com/repos/quantopian/zipline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quantopian/zipline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quantopian/zipline/teams","hooks_url":"https://api.github.com/repos/quantopian/zipline/hooks","issue_events_url":"https://api.github.com/repos/quantopian/zipline/issues/events{/number}","events_url":"https://api.github.com/repos/quantopian/zipline/events","assignees_url":"https://api.github.com/repos/quantopian/zipline/assignees{/user}","branches_url":"https://api.github.com/repos/quantopian/zipline/branches{/branch}","tags_url":"https://api.github.com/repos/quantopian/zipline/tags","blobs_url":"https://api.github.com/repos/quantopian/zipline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quantopian/zipline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quantopian/zipline/git/refs{/sha}","trees_url":"https://api.github.com/repos/quantopian/zipline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/{sha}","languages_url":"https://api.github.com/repos/quantopian/zipline/languages","stargazers_url":"https://api.github.com/repos/quantopian/zipline/stargazers","contributors_url":"https://api.github.com/repos/quantopian/zipline/contributors","subscribers_url":"https://api.github.com/repos/quantopian/zipline/subscribers","subscription_url":"https://api.github.com/repos/quantopian/zipline/subscription","commits_url":"https://api.github.com/repos/quantopian/zipline/commits{/sha}","git_commits_url":"https://api.github.com/repos/quantopian/zipline/git/commits{/sha}","comments_url":"https://api.github.com/repos/quantopian/zipline/comments{/number}","issue_comment_url":"https://api.github.com/repos/quantopian/zipline/issues/comments{/number}","contents_url":"https://api.github.com/repos/quantopian/zipline/contents/{+path}","compare_url":"https://api.github.com/repos/quantopian/zipline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quantopian/zipline/merges","archive_url":"https://api.github.com/repos/quantopian/zipline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quantopian/zipline/downloads","issues_url":"https://api.github.com/repos/quantopian/zipline/issues{/number}","pulls_url":"https://api.github.com/repos/quantopian/zipline/pulls{/number}","milestones_url":"https://api.github.com/repos/quantopian/zipline/milestones{/number}","notifications_url":"https://api.github.com/repos/quantopian/zipline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quantopian/zipline/labels{/name}","releases_url":"https://api.github.com/repos/quantopian/zipline/releases{/id}","created_at":"2012-10-19T15:50:29Z","updated_at":"2015-08-06T15:10:37Z","pushed_at":"2015-08-06T15:15:24Z","git_url":"git://github.com/quantopian/zipline.git","ssh_url":"git@github.com:quantopian/zipline.git","clone_url":"https://github.com/quantopian/zipline.git","svn_url":"https://github.com/quantopian/zipline","homepage":"","size":21924,"stargazers_count":2437,"watchers_count":2437,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":637,"mirror_url":null,"open_issues_count":138,"forks":637,"open_issues":138,"watchers":2437,"default_branch":"master"}},"base":{"label":"quantopian:asset-db-writer-update","ref":"asset-db-writer-update","sha":"31ba7713eac92c0ce037a6b5d128e6144de5a188","user":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"repo":{"id":6297520,"name":"zipline","full_name":"quantopian/zipline","owner":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quantopian/zipline","description":"Zipline, a Pythonic Algorithmic Trading Library","fork":false,"url":"https://api.github.com/repos/quantopian/zipline","forks_url":"https://api.github.com/repos/quantopian/zipline/forks","keys_url":"https://api.github.com/repos/quantopian/zipline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quantopian/zipline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quantopian/zipline/teams","hooks_url":"https://api.github.com/repos/quantopian/zipline/hooks","issue_events_url":"https://api.github.com/repos/quantopian/zipline/issues/events{/number}","events_url":"https://api.github.com/repos/quantopian/zipline/events","assignees_url":"https://api.github.com/repos/quantopian/zipline/assignees{/user}","branches_url":"https://api.github.com/repos/quantopian/zipline/branches{/branch}","tags_url":"https://api.github.com/repos/quantopian/zipline/tags","blobs_url":"https://api.github.com/repos/quantopian/zipline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quantopian/zipline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quantopian/zipline/git/refs{/sha}","trees_url":"https://api.github.com/repos/quantopian/zipline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/{sha}","languages_url":"https://api.github.com/repos/quantopian/zipline/languages","stargazers_url":"https://api.github.com/repos/quantopian/zipline/stargazers","contributors_url":"https://api.github.com/repos/quantopian/zipline/contributors","subscribers_url":"https://api.github.com/repos/quantopian/zipline/subscribers","subscription_url":"https://api.github.com/repos/quantopian/zipline/subscription","commits_url":"https://api.github.com/repos/quantopian/zipline/commits{/sha}","git_commits_url":"https://api.github.com/repos/quantopian/zipline/git/commits{/sha}","comments_url":"https://api.github.com/repos/quantopian/zipline/comments{/number}","issue_comment_url":"https://api.github.com/repos/quantopian/zipline/issues/comments{/number}","contents_url":"https://api.github.com/repos/quantopian/zipline/contents/{+path}","compare_url":"https://api.github.com/repos/quantopian/zipline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quantopian/zipline/merges","archive_url":"https://api.github.com/repos/quantopian/zipline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quantopian/zipline/downloads","issues_url":"https://api.github.com/repos/quantopian/zipline/issues{/number}","pulls_url":"https://api.github.com/repos/quantopian/zipline/pulls{/number}","milestones_url":"https://api.github.com/repos/quantopian/zipline/milestones{/number}","notifications_url":"https://api.github.com/repos/quantopian/zipline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quantopian/zipline/labels{/name}","releases_url":"https://api.github.com/repos/quantopian/zipline/releases{/id}","created_at":"2012-10-19T15:50:29Z","updated_at":"2015-08-06T15:10:37Z","pushed_at":"2015-08-06T15:15:24Z","git_url":"git://github.com/quantopian/zipline.git","ssh_url":"git@github.com:quantopian/zipline.git","clone_url":"https://github.com/quantopian/zipline.git","svn_url":"https://github.com/quantopian/zipline","homepage":"","size":21924,"stargazers_count":2437,"watchers_count":2437,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":637,"mirror_url":null,"open_issues_count":138,"forks":637,"open_issues":138,"watchers":2437,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/670"},"html":{"href":"https://github.com/quantopian/zipline/pull/670"},"issue":{"href":"https://api.github.com/repos/quantopian/zipline/issues/670"},"comments":{"href":"https://api.github.com/repos/quantopian/zipline/issues/670/comments"},"review_comments":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/670/comments"},"review_comment":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/670/commits"},"statuses":{"href":"https://api.github.com/repos/quantopian/zipline/statuses/d0b22022b0dd8a6c1d37237080ad689f56fb6e5f"}}}}