simpler-sf


Namesimpler-sf JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/benvigano/simpler-sf
SummaryExtending Simple Salesforce to support Pandas exports and more.
upload_time2023-06-21 14:36:23
maintainer
docs_urlNone
authorbenvigano
requires_python
licenseMIT
keywords salesforce simple salesforce pandas dataframe unpack salesforce
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # simpler-sf
Extending the low-level Salesforce API client [Simple Salesforce](https://github.com/simple-salesforce/simple-salesforce) to support exports in Pandas, and other features.

## Usage
### Install
`pip install simpler-sf`

### Import
```python
import simpler_sf
simpler_sf.simple_salesforce()
import simple_salesforce
```
### Query
Simpler-sf adds the `smart_query()` method to the `simple_salesforce.Salesforce` class.

The advantages over the existing methods are:
- Un-nesting of results for relationship queries (aka the infamous `'attributes'` field) (not just for one level)
- Query results in `pd.Dataframe` format
- No limit on the number of output rows as in `simple_salesforce.Salesforce.query()` **and** at the same time...
- No need to use a different class for each Salesforce object as in `sf.bulk.Account.query(query)`
- The option to filter dynamically, on large amounts of values without a limit on the number of characters

#### Example
```python 
sf = simple_salesforce.Salesforce(username=username, password=password, security_token=token)
df = sf.smart_query('SELECT Contact.Id, Contact.FirstName, Contact.Account.Name, Campaign.Name FROM CampaignMember')
print(df)
```
Output:
```
            Contact.Id   Contact.FirstName   Contact.Account.Name      Campaign.Name
0   0032400000QZbmtAAD               Emily                 Amazon   CampaignA_2023Q2
1   0032400000eGqdZAAS             Jasmine                 Amazon   CampaignA_2023Q2
2   00324036u9QZbnGAAT                Míng              Microsoft   CampaignB_2022Q4
3   0032400000QZbygAAX           Magdalena                 Google   CampaignC_2023Q1
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/benvigano/simpler-sf",
    "name": "simpler-sf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Salesforce,Simple Salesforce,Pandas,Dataframe,Unpack Salesforce",
    "author": "benvigano",
    "author_email": "beniamino.vigano@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d4/71/5956eb5aa02c92e8c2cefbb301d7aa40618a3b9e5ec4bdc9235a1fcf38ac/simpler_sf-1.0.3.tar.gz",
    "platform": null,
    "description": "# simpler-sf\nExtending the low-level Salesforce API client [Simple Salesforce](https://github.com/simple-salesforce/simple-salesforce) to support exports in Pandas, and other features.\n\n## Usage\n### Install\n`pip install simpler-sf`\n\n### Import\n```python\nimport simpler_sf\nsimpler_sf.simple_salesforce()\nimport simple_salesforce\n```\n### Query\nSimpler-sf adds the `smart_query()` method to the `simple_salesforce.Salesforce` class.\n\nThe advantages over the existing methods are:\n- Un-nesting of results for relationship queries (aka the infamous `'attributes'` field) (not just for one level)\n- Query results in `pd.Dataframe` format\n- No limit on the number of output rows as in `simple_salesforce.Salesforce.query()` **and** at the same time...\n- No need to use a different class for each Salesforce object as in `sf.bulk.Account.query(query)`\n- The option to filter dynamically, on large amounts of values without a limit on the number of characters\n\n#### Example\n```python \nsf = simple_salesforce.Salesforce(username=username, password=password, security_token=token)\ndf = sf.smart_query('SELECT Contact.Id, Contact.FirstName, Contact.Account.Name, Campaign.Name FROM CampaignMember')\nprint(df)\n```\nOutput:\n```\n            Contact.Id   Contact.FirstName   Contact.Account.Name      Campaign.Name\n0   0032400000QZbmtAAD               Emily                 Amazon   CampaignA_2023Q2\n1   0032400000eGqdZAAS             Jasmine                 Amazon   CampaignA_2023Q2\n2   00324036u9QZbnGAAT                M\u00edng              Microsoft   CampaignB_2022Q4\n3   0032400000QZbygAAX           Magdalena                 Google   CampaignC_2023Q1\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Extending Simple Salesforce to support Pandas exports and more.",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/benvigano/simpler-sf"
    },
    "split_keywords": [
        "salesforce",
        "simple salesforce",
        "pandas",
        "dataframe",
        "unpack salesforce"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "839b1c0eb42f0f094da3cf746dbad07a32840eda34e525b999aa4807a90e5e08",
                "md5": "3590499ef9c57e43b947ea9402e32e60",
                "sha256": "dd09911e0c5eb9575f9b4b6f1903bb062c81549c0e515e759260e28e7511d737"
            },
            "downloads": -1,
            "filename": "simpler_sf-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3590499ef9c57e43b947ea9402e32e60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5285,
            "upload_time": "2023-06-21T14:36:21",
            "upload_time_iso_8601": "2023-06-21T14:36:21.953973Z",
            "url": "https://files.pythonhosted.org/packages/83/9b/1c0eb42f0f094da3cf746dbad07a32840eda34e525b999aa4807a90e5e08/simpler_sf-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4715956eb5aa02c92e8c2cefbb301d7aa40618a3b9e5ec4bdc9235a1fcf38ac",
                "md5": "07411b18258fe6925618e1152149550f",
                "sha256": "23cd6248ac7f5135a5030291788e1bad089d1fade8651280c194360106293b4d"
            },
            "downloads": -1,
            "filename": "simpler_sf-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "07411b18258fe6925618e1152149550f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4749,
            "upload_time": "2023-06-21T14:36:23",
            "upload_time_iso_8601": "2023-06-21T14:36:23.260181Z",
            "url": "https://files.pythonhosted.org/packages/d4/71/5956eb5aa02c92e8c2cefbb301d7aa40618a3b9e5ec4bdc9235a1fcf38ac/simpler_sf-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-21 14:36:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "benvigano",
    "github_project": "simpler-sf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "simpler-sf"
}
        
Elapsed time: 0.17532s