GithubHelp home page GithubHelp logo

pyqb's People

Contributors

avinashjoshi avatar dunika avatar georgenmatthew avatar hazeliscoding avatar nickcatal avatar rv2910 avatar sjmh avatar trangpham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyqb's Issues

Client setup error

root@local-0UN:~# python
Python 2.7.12 (default, Nov 20 2017, 18:23:56)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import pyqb
qbc = pyqb.Client(username='shawn', password='test')
Traceback (most recent call last):
File "", line 1, in
TypeError: init() got an unexpected keyword argument 'username'

Can I add user management to this?

I was wondering if this repo was open to new contributors. I wanted to add some user management functionality.
I can add them as decorators to the Client class, but felt it was worth trying to share.

    def addUser(self, database=None, roleid=None, userEmail=None, 
                userFirst=None, userLast=None):
        if database is None:
            database = self.database
        req = {'roleid':roleid, 'email':userEmail, 'fname':userFirst, 'lname':userLast}
        res = self.__request("ProvisionUser", database, req)
        return xmltodict.parse(et.tostring(res))['qdbapi']

    def getUserID(self, userEmail=None):
        req = {'email':userEmail}
        res = self.__request("GetUserInfo", 'main', req)
        return xmltodict.parse(et.tostring(res))['qdbapi']['user']['@id']

    def sendInvite(self, database=None, userid=None, messageText=None):
        if database is None:
            database = self.database
        req = {'userid':userid, 'usertext':messageText}
        res = self.__request("SendInvitation", database, req)
        return xmltodict.parse(et.tostring(res))['qdbapi']

    def changeUserRole(self, database=None, userid=None, roleid='9', newroleid=None):
        if database is None:
            database = self.database
        req = {'userid':userid, 'roleid':roleid}
        if newroleid is not None:
            req['newroleid'] = newroleid
        res = self.__request("ChangeUserRole", database, req)
        return xmltodict.parse(et.tostring(res))['qdbapi']

query too large?

Is this a qbase limitation ?

raise ResponseError('Received err #{0} : {1}'.format(errcode, errtext))

pyqb.ResponseError: Received err #75 : Report too large

Issue with DoQuery

While doing query the returned ordered dictionary doesn't have the key 'record' if the returned result is just one recrod. But if the result of the returned query have more than one record then the key record and the list of records can be received.
In the quickbase for "TSW131E" there is more than 1 record , but for "BKS1359" there is only a single record in quickbase

a=qbc.doquery(query='{"36".EX."' +"TSW131E" + '"}',fields=['37', '38','19','3','449'] , database='be4uqew8m')
print(a.keys())
Output
odict_keys(['action', 'errcode', 'errtext', 'dbinfo', 'variables', 'chdbids', 'record'])
Query for BKS1359 , which have just 1 record in quickbase.

qbc.doquery(query='{"36".EX."' +'BKS1359' + '"}',fields=['37', '38','19','3','449'] , database='be4uqew8m')
print(a.keys())
output
odict_keys(['action', 'errcode', 'errtext', 'dbinfo', 'variables', 'chdbids'])
since the key record is not present, I am not able to see the output.

bad hand shake

I tried several times and I am not sure why I can't get access. I will appreciate it if anyone can help to resolve it. Thanks in advance!
qbc = pyqb.Client(url='https://mycompany.quickbase.com', database = 'DBNamebetween/db/ and ?', user_token='token12345')
qbc.doquery(qid=1,database='DBNamebetween/db/ and ?')
I got error message below:
Max retries exceeded with url: /db/bq5ni99jh (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
I have already updated my certifi through command pip install --upgrade certifi but why I still have this issue?
is there a way to do "verify=False"?
I have tried python library json and requests. When I apply verigy=False in that 2 libraries, at least I got status=200, not 404 which means I can access and my token works.

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.