Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

OpenObject Query Parser

Project Description

Python 2.7 and >=3.5

Parsers OpenObjectes queries like:

import pyscopg2

from oopgrade.oopgrade import get_foreign_keys
from ooquery import OOQuery

conn = psycopg2.connect("dbname=test user=postgres")
with conn.cursor() as cursor:
    def fk_function(table):
        return get_foreign_keys(cursor, table)

    q = OOQuery('account_invoice', fk_function)
    sql = q.select(['number', 'state']).where([
        ('state', '=', 'open'),
        ('partner_id.name', '=', 'Pepito')
    ])
    cursor.execute(*sql)

Support for reading from joined tables

q = OOQuery('account_invoice', fk_function)
sql = q.select(['number', 'partner_id.name', 'partner_id.vat']).where([
    ('state', '=', 'open')
])
Release History

Release History

This version
History Node

0.8.2

History Node

0.8.1

History Node

0.6.0

History Node

0.5.1

History Node

0.5.0

History Node

0.4.0

History Node

0.3.0

History Node

0.2.0

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ooquery-0.8.2.tar.gz (3.0 kB) Copy SHA256 Checksum SHA256 Source Jun 17, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting