salesforce-reporting-chunked
Get > 2000 rows from Your Date-Sortable Salesforce Reports
salesforce-reporting-chunks is a wrapper around cghall's salesforce-reporting module. The Salesforce API limits output to 2000 rows for a given report. salesforce-reporting-chunked works around this limitation by returning a generator that simply pulls a date range from your report a given number of days at a time.
Install
pip install salesforce-reporting-chunked
Documentation
Documentation at readthedocs.
Usage
- Obtain a Salesforce security token.
- Choose your API version
- Get your report id from the Salesforce report URL
from salesforce_reporting_chunked import chunk_report_by_date
CONFIG = {
"security_token": "REPLACE WITH YOUR TOKEN",
"username": "REPLACE WITH YOUR USERNAME",
"password": "REPLACE WITH YOUR PASSWORD",
"api_version": "v38.0"
}
FIELDNAMES = [
"First Name",
"Last Name",
"Date Column", # this is the magic column use for chunking.
"Corhuscorrated Plethanth",
"Other Column",
]
REPORT_ID = "YOURREPORTID"
>>> data = chunk_report_by_date(
CONFIG,
REPORT_ID,
FIELDNAMES,
date_fieldname="Date Column",
start_date="2018-01-01",
start_date="2019-01-31",
)
>>> next(data)
OrderedDict([('First Name', 'Fred'),('Last Name', 'Garvin'),('DATE_COLUMN_NAME', '2018-01-01'),('Corhuscorrated Plethanth', True),('Other Column': 'Yep. Another')])
Metadata
Release files for salesforce-reporting-chunked 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| salesforce-reporting-chunked-0.1.7.tar.gz | 5.6 kB | Without provenance | Details |
Release files / salesforce-reporting-chunked-0.1.7.tar.gz
| Download URL | salesforce-reporting-chunked-0.1.7.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ec23b2d52e5a9b4c8c72b7212ba3c229d5bea51ba9f0aa248e0950df7ae5856
|
|
BLAKE2b-256 checksum How to use checksums |
3e91b4281904ab6e75d16bf9b0603dfc58c30dee7d3bfd150b792289e54e12f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
|
Security for salesforce-reporting-chunked 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.