Code Monkey home page Code Monkey logo

salesforce-files-download's Introduction

salesforce-files-download

Python script to download Salesforce Files (aka ContentDocument). It's using ProcessPoolExecutor to run downloads in parallell which makes the experience nicer if you have a large number of files.

In a very non scientific test 1614 files (3.23 GB) were downloaded in under 6 minutes.

Getting Started

Download the script, satisfy requirements.txt and you're good to go!

Prerequisites

simple-salesforce (https://github.com/simple-salesforce/simple-salesforce)

Usage

  1. Copy download.ini.template to download.ini and fill it out
  2. Launch the script
usage: download.py [-h] -q query

Export ContentVersion (Files) from Salesforce

optional arguments:
  -h, --help            show this help message and exit
  -q query, --query query
                        SOQL to limit the valid ContentDocumentIds. Must
                        return the Id of related/parent objects.

Example

python download.py -q 
"SELECT Id FROM Custom_Object__c WHERE Status__c = 'Approved'"

Bug free software?

This was a small implementation for a customer that I decided to clean up and put on GitHub, I guess there are tons of bugs in here so please feel free to contact me if you find any of those.

salesforce-files-download's People

Contributors

snorf avatar cmajors-genscape avatar

Watchers

James Cloos avatar

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.