Skip to content

Instantly share code, notes, and snippets.

@vortec
Created October 15, 2015 10:50
Show Gist options
  • Select an option

  • Save vortec/10abb3a181e2579e7cb9 to your computer and use it in GitHub Desktop.

Select an option

Save vortec/10abb3a181e2579e7cb9 to your computer and use it in GitHub Desktop.
connection = psycopg2.connect("dbname=foo")
pool = psycopg2.pool.ThreadedConnectionPool(maxconn=4, "dbname=foo")
tree = Tree(connection=connection)
tree = Tree(pool=pool, prefix='fabian_')
with tree() as transaction:
node = transaction.get_root_node()
node.position = 12
node.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment