Package: quickbase-json-api-client
quickbase-json-api-clientUnofficial QuickBase JSON API wrapper for Python.Created by Synctivate Developers!Custom software solutionsfrom Fredericksburg, Virginia!Documentationhttps://github.com/robswc/quickbase-json-api-client/wikiQuickstartInstallationTo install, run:pipinstallquickbase-json-api-clientInitialize ClientUse the following code to create and initialize a client object.fromquickbase_jsonimportQBClientclient=QBClient(realm="yourRealm",auth="userToken")WhereyourRealmis the name (subdomain) of your Quickbase Realm anduserTokenis the user token used to authenticate
with the realm.  You can also include an optionalagent: strargument, which will change the User-Agent (used in headers) from the default "QJAC" to whatever string is passed.  This isheavily recommended, as it makes figuring out the origin of API calls easier.Query RecordsQuerying for records is one of the most useful features of the Quickbase JSON API.  Querying records with QJAC can be done
using the following codeBasic Exampleresponse=client.query_records(table='tableId',select=[3,6,12],where='queryString')data=response.data()WheretableIdis the ID of the table you wish to query from,fidsis a list of field IDs you wish to receive andqueryStringis a quickbasequery string.Adv. Examplefromquickbase_json.helpersimportWhere# have static fids for table/recordsNEEDED_FIDS=[3,6,12]# build query str where 3 is either 130, 131 or 132# https://help.quickbase.com/api-guide/componentsquery.htmlq_str=Where(3,'EX',[130,131,132]).build(join='OR')response=client.query_records(table='tableId',select=NEEDED_FIDS,where=q_str)In this example, we use theWhere()helper.  This can make building complexQuickBase querieseasier.TheWhere()helper documentation can be foundhere.Response ObjectsAQBResponseobject is returned when querying records with QJAC.  AQBResponsehas several methods that make
handling returned data easier.  Here are a few of the most useful ones.Response Methods.data()r=qbc.query_records(...).data()Returns the data from QuickBase.  Equivalent to calling.get('data').denest()r=qbc.query_records(...).denest()Denests the data.  I.e. changes{'fid': {'value': 'actualValue'}}to{'fid': 'actualValue'}orient(orient: str, key: int)r=qbc.query_records(...).orient('records',key=3)Orients the data.  Currently, the only option is 'records'.  This will orient the returned data into a "record like structure", i.e. changes{'fid': 'actualValue', 'fid': 'actualValue'}to{'key': {etc: etc}}convert()r=qbc.query_records(...).convert('datetime')Converts the data, based on fields and provided arguments.  For example, callingconvert('datetime')will convert all data with fields
of the 'date time' type to python datetime objects.  Other conversions are 'currency' and 'int'.round_ints()r=qbc.query_records(...).round_ints()Rounds all float integers into whole number ints.  i.e. converts55.0to55.Additional FeaturesInformation on additional features that go beyond the scope of an introduction README.md, can be found on theGitHub Wiki!This include things like...Easy file uploading/downloadingInserting, Updating and Deleting recordsCreating tablesAuthenticating w/Quickbaseetc.Issues/BugsIf you come across any issues or want to file a bug report, please do sohere.Thanks!