Coder Social home page Coder Social logo

quickbase-python-sdk's Introduction

Quickbase-Python-SDK

Python bindings for the QuickBase API

QBConn variables:

error: the numerical error code returned by an API call. 0 is no error, negative values are internal to this library
tables: a dictionary containing tablename:tableID pairs

[constructor] QBConn(QB_URL,QB_APPID[,QB_TOKEN, QB_REALM]):

Makes a connection to the QuickBase specified by QB_URL and QB_APPID. Uses QB_TOKEN and QB_REALM if specified.
Note: QB_URL should have a trailing slash. ex. "https://intuitcorp.quickbase.com/db/";

authenticate(username,password):

Authenticates username and password with QuickBase and stores the returned ticket. The tables variable is populated on success

sql(querystr): Performs a query() after translating a simple SQL-style string to QuickBase's query format

Example: qb.sql("SELECT * FROM users WHERE name`EX`John\_Doe OR role`EX`fakeperson") #The \_ represents a space. This is a very basic function that doesn't use state machines. Note: field and table names will not have spaces
Example: qb.sql("SELECT firstname|lastname FROM users WHERE paid`EX`true ORDER BY lastname ASC LIMIT 100")
Example: qb.sql("DELETE FROM assets WHERE value`BF`0")
Please contribute any improvents you make on this function back to this repo. It would make life so much easier for all QuickBase+Python users :)

request(params,url_ext):

Takes a dict of param:value pairs, adds ticket, token, and realm (if specified) and makes an API call to the base URL+url_extension

getFields(tableID):

Returns a dict containing the fields of a table as fieldname:fieldID pairs

addRecord(tableID,data):

Adds a record with data specified by the data dict of fieldname:value pairs to tableID

editRecord(tableID,rid,newdata[,options]):

Updates a record (rid) in table (tableID) with the data given by newdata fieldname:value pairs

deleteRecord(tableID,rid):

Deletes record specified by rid from table specified by tableID

purgeRecords(tableID,query):

Deletes records from tableID that match the QuickBase-style query

_getTables():

Returns a dict containing a QuickBase app's tables as tablename:tableID pairs. This is run automatically after a successful authenticate call

query(tableID,query):

Returns a list of dicts containing fieldname:value pairs that represent rows returned by the query. record ID will always be specified by the "rid" key

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.