We use Salesforce REST and Bulk APIs extensively and now we have reached a point where we have to use the metadata API. Our use case is pretty trivial. We only have to create a custom object using metadata API..What is the best way to go about it? It seems that Beatbox does not seem to support metadata API.

4 Answers 4


To my knowledge, there's not a Python library that works with the newer versions of the MDAPI. I hacked together a very basic integration by manually generating the SOAP envelopes for some MDAPI methods including deploy along with some python classes to provide an easy wrapper you can call from other python code.


You'd likely have to modify that file to remove some references to the application code, but the bulk of what you need is there.

  • Do you think SUDS would work?
    – auny
    Commented Jun 5, 2015 at 19:36
  • You could use SUDS, but I think that would mean you'd have to rework the code for every new MDAPI version since the WSDL changes with each version. With either approach, you'd still need to modify the code to handle changes in how the calls are made. For example, I had to modify about a year ago to handle a different mechanism for checking the results of a deploy call. Commented Jun 6, 2015 at 14:55
  • I forgot to mention one key difference in my implementation vs normal MDAPI libraries: it was built to authenticate via OAuth rather than username/password/token. It's for a web based installer that installs a series of managed packages into an org that the user themselves run. They simply grant access to the app via OAuth to access their org. If you're building a Python web app, this is the way you should handle authentication rather than asking the user for a Salesforce username/password/token. Commented Jun 6, 2015 at 15:23

SFDClib is pretty basic (especially when it comes to documentation), but I've used it to retrieve and deploy metadata quite successfully.


I think the main executeable that powers MavensMate is built on Python:

mm is a Python 2.7 package that can be installed and run traditionally (via Python) or optionally run as a standalone executable with no dependencies.

so you maybe could take a look at what is in that repo as a starting point?


I hope this tool will be helpful for your trial.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .