Git Product home page Git Product logo

beatbox's People

Contributors

baxter001 avatar bmcgue avatar danieldsj avatar enkidulan avatar hynekcer avatar mstevens avatar nate-opti avatar superfell avatar tecktron avatar tltx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beatbox's Issues

can't select fields which contains the word 'Address'

Hello,
When I'm trying to pull Address fields (ShippingAddress, BillingAddress, Address etc.) from any table in Salesforce I run into an error in function query in module python_client (the failure is in function _extractRecord which is being called by function query).

Is that a known issue? Is it because of the name Address? How should I pull those fields?
Thanks a lot in advance!
Itay

retrieve method fails if only one record found

I use demo.py for tests. Your original current source fails on an empty Salesforce instance or if no Account "New Account" has been present before running the demo.

Traceback (most recent call last):
  File "demo.py", line 235, in <module>
    demo.retrieve()
  File "demo.py", line 154, in retrieve
    print str(acc[beatbox._tSObjectNS.Id]) + " : " + str(acc[beatbox._tSObjectNS.Name])
  File "/home/.../Beatbox/xmltramp.py", line 143, in __getitem__
    raise KeyError, n
KeyError: ('urn:sobject.partner.soap.sforce.com', 'Id')

It is because beatbox.Client.retrive returns directly one xmltramp.Element instead of a list of length 1.

The backward compatible solution is to modify only the demo.py so that it is tested if the result is a list or an Element :

     def retrieve(self):
         print("\nretrieve")
         accounts = svc.retrieve("id, name", "Account", self.__theIds)
+        if not beatbox.islst(accounts):
+            accounts = [accounts]
         for acc in accounts:

... but this is not a demo of advisable clean code.
A more natural solution would be to return a list of elements by beatbox.Client.retrieve if the ids parameter is a list, otherwise to return an element if an Id is used directly without list.

         def retrieve(self, fields, sObjectType, ids):^M
                 return RetrieveRequest(self.__serverUrl, self.sessionId, fields, sObjectType, ids
-                                       ).post(self.__conn)
+                                       ).post(self.__conn, islst(ids))

The best solution is probably to add a retrive method to IterClient class and also to write an example with IterClient to the documentation because that class is very useful. It will be both natural and backward compatible. What do you mean?

No longer outputting json like legacy 2.7 version

I'm currently in transition changing our code from 2.7 to 3.7 and I found that beatbox required an update. I updated, it and fixed the calls, but now I'm getting response of a full string, instead of a json list. I use to have a code that did this.

row = {}
response = json.dumps(response)
jsonParser = json.loads(response)
row['Status'] = "Success"
row['IDNumber'] = jsonParser["IDNumber"]

But looks like the output is only showing only full string plus a true boolean at the front of it.
I looked at issue 51, and attempted using the code given by superfell, but the sorting of the columns was completely out of wack, rec[0] had true,rec[1] were empty, and rec[2] had the full string, rec[3] had the third column, rec[4] had the 4th column.

FullString example output:
AccountIDAccountNameIDNumberStatus

gzipRequest not working for python3

The default gzipRequest is set to True, but it doesn't work in python3. Got an error TypeError: string argument expected, got 'bytes' when executing self.fileobj.write(b'\037\213' in file gzip.py.

In python3, BytesIo should be used instead of StringIO, and thus a potential fix would be changing self.__buf = StringIO("") to self.__buf = BytesIO(b"") in file beatbox.py at line 283

Add unit tests

really need some unit tests, especially now that we're supporting both python 2 & 3.

Once we have tests, should also setup travis to run them

Version of Beatbox in Pypi is incorrect?

The version of Beatbox in Pypi is 20.0 http://pypi.python.org/pypi/beatbox/20.0

The version in this repository is 0.94.

The code seems to have been heavily re factored between these two versions.

The code within 20.0 hsa a copyright of 2006, while the one here is from 2006-2012

Which is the correct version to use? If it is 0.94, why isn't this version in Pypi? Why did the version number drop from 20.0 to 0.94? If it is 20.0, why is this repo out of date?

beatbox.py: IndentationError

Trying to install Beatbox from this repository, I get:

Running setup.py install for beatbox
Sorry: IndentationError: unexpected indent (beatbox.py, line 39)

Salesforce Refresh Instances

Salesforce going to do overall change at the 3rd of Dec
what they called - Refresh Instances.

Is it going to affect the use of Beatbox?
Do we need to change of upgrade something>

Thanks!

Getting more results than 500

I attempted to increase the batchsize, but I'm trying to get all the values since the values could increase or decreased based on he batch size. I attempted to use queryAll or querymore. But they both failed. I also attempted to use the following documentation, but doesn't seem to function with this version of beatbox. Can you provide me some insight on how I can get all the rows to show up.
http://tomhayden3.com/2013/08/04/salesforce-python/

bulkify create, update, upsert, delete, or undelete

Forgive me if this isn't the appropriate avenue to post this comment.

Is it possible to "bulkify" any of the create, update, upsert, delete, or undelete methods to avoid the following error: "EXCEEDED_ID_LIMIT: record limit reached. cannot submit more than 200 records into this call"

I know that Lexi Loader handles gracefully. I have created a wrapper around Beatbox to split my sObjects into lists of 200 or less as a workaround.

init of beatbox.Client()

Have to use beatbox._beatbox.Client() to get a client.

Reproduced on Windows running Python 2.7.9, Ubuntu running Python 2.7.6, beatbox v32.1 on both, installed via pip.

>>> import beatbox
>>> svc = beatbox.Client()

Traceback (most recent call last):
  File "<pyshell#44>", line 1, in <module>
    svc = beatbox.Client()
AttributeError: 'module' object has no attribute 'Client'
>>> svc = beatbox._beatbox.Client() #This works
>>> 

Exporting data slow compared to SoqlXplorer

Hi,

I've noticed that SoqlXplorer is generally about 2-3 times faster at saving query results than the export.py demo - but I also see a large variance in times for both so it could just be transient network conditions or some other factor. Neither use much CPU or bandwidth so I'm wondering if there's something at the Salesforce end (maybe a different API?) that might explain the difference.

Thanks.

How to pull the data from method describeGlobal()

Hi,

What is the required namespace for retrieving the returned objects from this method?
When I try the following (as explained in http://www.pocketsoap.com/beatbox/) :
sf = beatbox._tPartnerNS
svc = beatbox.Client()
svc.login(username, password)
res_tables = svc.describeGlobal()
tables_list = res_tables[sf.types:]

I don't get any results in tables_list.
Should I address another field in sf?

Thanks in advance!
Itay

Query Time Out

I keep getting a Query Time Out error when trying to bring back the whole table of "Case History" not sure if the api used in Beatbox is not the right place. Do I need to investigate the bulk api? Or another way to troubleshoot?

GPL versions

Hi.

Just wondering which version of the GPL applies, the README just says "Beatbox is released under the GPL."

Unable to clear custom field value

I'm trying to update (using the update method) a custom field value to set it to Null/Empty on a Contact object but this doesn't seem to work. I've tried setting the value to None, '' (empty string), 'null' and both failed to clear or reset the value for the field (by looking in the Contact profile in the Salesforce UI).

Is there a way to set a custom field value to Null? Is this even supported?

Thanks

Support for iterable versions of the standard calls.

I have a small collection of monkey patches I put into our internal version of beatbox to add methods that return iterators for the collection returning calls that wrap the need to use queryMore, and alternate forms of upsert,insert and delete that take generators and chunk them into blocks of size batchSize.

How would you feel about a PR for adding these methods onto the Client or an iterClient subclass?

support in setting the batchSize of the service

Hello,
Is it possible to update the batchsize attribute of the service?
In addition I've noticed that in some tables (Oportunity,Task) the chunk size is different than the default value 500 and the data is being pulled in chunks of 200. Can it be changed?

Thanks,
Itay

Python 3.6.7 - wrong output

Result of commands executed with beatbox on python 3.6 is a string combined from all fields, for inscante AccountStatusNameOK etc.
In python 2.7 result is returned as list.

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.