{"id":16418804,"url":"https://github.com/georgebv/aiosalesforce","last_synced_at":"2025-07-21T04:32:31.265Z","repository":{"id":225564049,"uuid":"766305524","full_name":"georgebv/aiosalesforce","owner":"georgebv","description":"Asynchronous Python client for Salesforce API","archived":false,"fork":false,"pushed_at":"2024-06-06T19:12:20.000Z","size":1013,"stargazers_count":10,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T17:04:10.792Z","etag":null,"topics":["python","rest-api","salesforce","sfdc","sfdx"],"latest_commit_sha":null,"homepage":"https://georgebv.github.io/aiosalesforce/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/georgebv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-02T22:20:07.000Z","updated_at":"2025-04-02T22:36:54.000Z","dependencies_parsed_at":"2024-03-28T03:32:55.734Z","dependency_job_id":"4085b525-dd08-420d-990c-a19a91c0693b","html_url":"https://github.com/georgebv/aiosalesforce","commit_stats":null,"previous_names":["georgebv/aiosalesforce"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/georgebv/aiosalesforce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgebv%2Faiosalesforce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgebv%2Faiosalesforce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgebv%2Faiosalesforce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgebv%2Faiosalesforce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/georgebv","download_url":"https://codeload.github.com/georgebv/aiosalesforce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgebv%2Faiosalesforce/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266240855,"owners_count":23898062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","rest-api","salesforce","sfdc","sfdx"],"created_at":"2024-10-11T07:15:05.041Z","updated_at":"2025-07-21T04:32:31.245Z","avatar_url":"https://github.com/georgebv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" style=\"font-size:40px; margin:0px 10px 0px 10px\"\u003e\n    \u003cem\u003e⚡ aiosalesforce ⚡\u003c/em\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eAsynchronous Python client for Salesforce APIs\u003c/em\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/georgebv/aiosalesforce/actions/workflows/test.yml\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/georgebv/aiosalesforce/actions/workflows/test.yml/badge.svg?event=pull_request\" alt=\"Test\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/georgebv/aiosalesforce\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/georgebv/aiosalesforce/graph/badge.svg?token=KVMS7YVODO\" alt=\"Coverage\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/aiosalesforce\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://badge.fury.io/py/aiosalesforce.svg\" alt=\"PyPI Package\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n**Documentation:** https://georgebv.github.io/aiosalesforce\n\n**License:** [MIT](https://opensource.org/licenses/MIT)\n\n**Support:** [ask a question](https://github.com/georgebv/aiosalesforce/discussions)\nor [create an issue](https://github.com/georgebv/aiosalesforce/issues/new/choose),\nany input is appreciated and would help develop the project\n\n# About\n\n`aiosalesforce` is a modern, production-ready asynchronous Python client\nfor Salesforce APIs.\nIt is built on top of the `httpx` library and provides a simple and intuitive API\nfor interacting with Salesforce's APIs (such as REST and Bulk).\n\n- **Fast:** designed from the ground up to be fully asynchronous :rocket:\n- **Resilient:** flexible and robust retrying configuration :gear:\n- **Fully typed:** every part of the library is fully typed and annotated :label:\n- **Intuitive:** API follows naming conventions of Salesforce's APIs while\n  staying idiomatic to Python :snake:\n- **Salesforce first:** built with years of experience working with the Salesforce API\n  it is configured to work out of the box and incorporates best practices and\n  latest Salesforce API features :cloud:\n- **Track your API usage:** built-in support for tracking Salesforce API usage\n  :chart_with_upwards_trend:\n\nSupported APIs:\n\n| API                 | Status | Description                              |\n| ------------------- | ------ | ---------------------------------------- |\n| SOQL Query          | ✅     | Execute SOQL queries                     |\n| sObject             | ✅     | CRUD operations on Salesforce objects    |\n| Composite Batch     | ✅     | Execute multiple independent subrequests |\n| Composite           | ✅     | Execute multiple dependent subrequests   |\n| Composite Graph     | 🕒     | Execute multiple composite graphs        |\n| sObject Tree        | 🕒     | Create one or more sObject trees         |\n| sObject Collections | 🕒     | Execute multiple sObject operations      |\n| Bulk API 1.0        | ❌     | Not planned (use Bulk API 2.0)           |\n| Bulk API 2.0        | ✅     | Bulk ingest and query operations         |\n\n## Requirements\n\n`aiosalesforce` depends on:\n\n- Python 3.11+\n- [httpx](https://github.com/encode/httpx)\n- [orjson](https://github.com/ijl/orjson)\n\nOptional dependencies:\n\n- [PyJWT](https://github.com/jpadilla/pyjwt)\n- [cryptography](https://github.com/pyca/cryptography)\n\n## Installation\n\n```shell\npip install aiosalesforce\n```\n\nTo use the JWT Bearer Flow authentication install with the `jwt` extra:\n\n```shell\npip install aiosalesforce[jwt]\n```\n\n# Demo\n\nExample below shows how to:\n\n- Authenticate against Salesforce using the SOAP login method\n- Create a Salesforce client\n- Create a new Contact\n- Read a Contact by ID\n- Execute a SOQL query\n\n```python\nimport asyncio\n\nfrom aiosalesforce import Salesforce\nfrom aiosalesforce.auth import SoapLogin\nfrom httpx import AsyncClient\n\n# Reuse authentication session across multiple clients (refreshes automatically)\nauth = SoapLogin(\n    username=\"your-username\",\n    password=\"your-password\",\n    security_token=\"your-security-token\",\n)\n\nasync def main():\n    async with AsyncClient() as client:\n        # Create a Salesforce client\n        salesforce = Salesforce(\n            client,\n            base_url=\"https://your-instance.my.salesforce.com\",\n            auth=auth,\n        )\n\n        # Create a new Contact\n        contact_id = await salesforce.sobject.create(\n            \"Contact\",\n            {\n                \"FirstName\": \"John\",\n                \"LastName\": \"Doe\",\n                \"Email\": \"john.doe@example.com\",\n            },\n        )\n        print(f\"Created Contact with ID: {contact_id}\")\n\n        # Read Contact by ID\n        contact = await salesforce.sobject.get(\"Contact\", contact_id)\n        print(contact)\n\n        # Execute a SOQL query\n        async for record in salesforce.query(\"SELECT Id, Name FROM Contact\"):\n            print(record)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgebv%2Faiosalesforce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgebv%2Faiosalesforce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgebv%2Faiosalesforce/lists"}