Skip to content

Instantly share code, notes, and snippets.

@vpzed
vpzed / mock.py
Last active December 22, 2022 22:25
Simple asyncpg test script with jsonb field (python 3.6.3, Postgres 10.0, and asyncpg 0.13.0)
#!/usr/bin/env python
# Use /usr/bin/env python to support virtual environments
# This script is for Python > 3.6
# -*- coding: utf-8 -*-
"""
Test loading mock initial alliances data into a test table with asyncpg and Postgres
"""
import datetime
import json
@vpzed
vpzed / postgresql.txt
Created October 16, 2017 16:08
PostgreSQL prototyping
PostgreSQL:
user A (non-super-user admin account with createdb and createuser)
destiny database:
# main destiny database
user X (job account with read/write)
user Y (api account with read-only)
alliance table:
# Manually created reference info for "meta-clan" groupings
@vpzed
vpzed / manifest_plumbing.py
Created October 9, 2017 00:43
Get manifest files from destiny.plumbing
#!/usr/bin/env python
"""
TEST code for using destiny.plumbing
"""
import os
import sys
import requests
def main():