Name | async-simple-salesforce JSON |
Version |
1.12.6a4
JSON |
| download |
home_page | None |
Summary | Async fork of simple-salesforce |
upload_time | 2024-09-03 17:34:34 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | Copyright 2012 New Organizing Institute Education Fund Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Some content based off Restforce 1.0 Copyright (C) 2012 Dave Wingate Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
uv
requirements
packaging
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Async Simple Salesforce
This is an **async fork** of the library [simple-salesforce](https://github.com/simple-salesforce/simple-salesforce). It is considered **alpha** software.
This fork is available on PyPI and can be installed like this:
```sh
$ pip install "async-simple-salesforce==1.12.6a3"
```
## Versioning
Versioning for this library tracks the upstream version; i.e., when a new version of upstream has been published, it will be integrated into this codebase and released under the *same* version identifier, with one notable difference: we add *alpha* or *beta* identifiers to make it more obvious that this fork has not been around as long as upstream and that it has also not seen the same wide-scale usage that upstream has.
For example, when changes from upstream version `1.12.4` have been integrated into this library, a new version of this library will be published as `1.12.4a1`. Further changes under the same version will increment the alpha version identifier.
## How to Use
This library attempts to offer the *same API* as `simple-salesforce` inside an `aio` subpackage.
For instance, here's how to create and use an async Salesforce client:
```python
import asyncio
import datetime
from simple_salesforce.aio import build_async_salesforce_client, AsyncSalesforce
async def create_client(username, consumer_key, private_key) -> AsyncSalesforce:
# build_async_salesforce_client accepts all args of simple-salesforce Login
return await build_async_salesforce_client(
username=username,
consumer_key=consumer_key,
privatekey_file=private_key,
request_timeout_seconds=60 * 2,
)
async def update_contact(sf_client):
end = datetime.datetime.now(pytz.UTC) # we need to use UTC as salesforce API requires this
await sf_client.Contact.updated(end - datetime.timedelta(days=10), end)
async def run_query(sf_client, opportunity_name: str):
query = (
f"SELECT Id,StageName from Opportunity where "
f"Name='{opportunity_name}'"
)
return await sf_client.query_all(search)
```
You can typically call *any* method available on the synchronous `Salesforce` object as an async method with an `await` added.
See upstream docs continued [here](./README.rst).
## How to Contribute
This project uses `uv` to manage dependencies. In addition, a `justfile` has been provided to aid contributors. If you have `uv` and `just` in your environment, you can get started with `just bootstrap`. You can run the test suite with `just test` and code quality checks with `just test`. For more common recipes, run `just`:
```sh
❯ just
just --list
Available recipes:
bootstrap # Create a virtual environment and install dependencies
build *args # Build the project as a package
check # Run code quality checks
check-types # Run mypy checks
ci-test coverage_dir='./coverage' # Run all tests locally
format # Run the formatter (`ruff`)
lock # Update the lock file
release # Release this project to PyPI
sync *args # Make sure all dependencies are up to date in env
test *args # Run all tests locally
```
---
The upstream README is located [here](./README.rst)
Raw data
{
"_id": null,
"home_page": null,
"name": "async-simple-salesforce",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "uv, requirements, packaging",
"author": null,
"author_email": "Erik Aker <eaker@mulliganfunding.com>",
"download_url": "https://files.pythonhosted.org/packages/37/47/a9fa8d0f1289113a2d4a4aebc53fb6ba2c91928999047aecbb319f34d114/async_simple_salesforce-1.12.6a4.tar.gz",
"platform": null,
"description": "# Async Simple Salesforce\n\nThis is an **async fork** of the library [simple-salesforce](https://github.com/simple-salesforce/simple-salesforce). It is considered **alpha** software.\n\nThis fork is available on PyPI and can be installed like this:\n\n```sh\n$ pip install \"async-simple-salesforce==1.12.6a3\"\n\n```\n\n## Versioning\n\nVersioning for this library tracks the upstream version; i.e., when a new version of upstream has been published, it will be integrated into this codebase and released under the *same* version identifier, with one notable difference: we add *alpha* or *beta* identifiers to make it more obvious that this fork has not been around as long as upstream and that it has also not seen the same wide-scale usage that upstream has.\n\nFor example, when changes from upstream version `1.12.4` have been integrated into this library, a new version of this library will be published as `1.12.4a1`. Further changes under the same version will increment the alpha version identifier.\n\n## How to Use\n\nThis library attempts to offer the *same API* as `simple-salesforce` inside an `aio` subpackage.\n\nFor instance, here's how to create and use an async Salesforce client:\n\n```python\n\nimport asyncio\nimport datetime\n\nfrom simple_salesforce.aio import build_async_salesforce_client, AsyncSalesforce\n\n\nasync def create_client(username, consumer_key, private_key) -> AsyncSalesforce:\n # build_async_salesforce_client accepts all args of simple-salesforce Login\n return await build_async_salesforce_client(\n username=username,\n consumer_key=consumer_key,\n privatekey_file=private_key,\n request_timeout_seconds=60 * 2,\n )\n\nasync def update_contact(sf_client):\n end = datetime.datetime.now(pytz.UTC) # we need to use UTC as salesforce API requires this\n await sf_client.Contact.updated(end - datetime.timedelta(days=10), end)\n\n\nasync def run_query(sf_client, opportunity_name: str):\n query = (\n f\"SELECT Id,StageName from Opportunity where \"\n f\"Name='{opportunity_name}'\"\n )\n return await sf_client.query_all(search)\n```\n\nYou can typically call *any* method available on the synchronous `Salesforce` object as an async method with an `await` added.\n\nSee upstream docs continued [here](./README.rst).\n\n## How to Contribute\n\nThis project uses `uv` to manage dependencies. In addition, a `justfile` has been provided to aid contributors. If you have `uv` and `just` in your environment, you can get started with `just bootstrap`. You can run the test suite with `just test` and code quality checks with `just test`. For more common recipes, run `just`:\n\n```sh\n\u276f just\njust --list\nAvailable recipes:\n bootstrap # Create a virtual environment and install dependencies\n build *args # Build the project as a package\n check # Run code quality checks\n check-types # Run mypy checks\n ci-test coverage_dir='./coverage' # Run all tests locally\n format # Run the formatter (`ruff`)\n lock # Update the lock file\n release # Release this project to PyPI\n sync *args # Make sure all dependencies are up to date in env\n test *args # Run all tests locally\n\n```\n\n---\n\nThe upstream README is located [here](./README.rst)\n",
"bugtrack_url": null,
"license": "Copyright 2012 New Organizing Institute Education Fund Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Some content based off Restforce 1.0 Copyright (C) 2012 Dave Wingate Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Async fork of simple-salesforce",
"version": "1.12.6a4",
"project_urls": {
"Changelog": "https://github.com/MulliganFunding/async-simple-salesforce/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/MulliganFunding/async-simple-salesforce/blob/main/README.md",
"Releases": "https://github.com/MulliganFunding/async-simple-salesforce/releases",
"Repository": "https://github.com/MulliganFunding/async-simple-salesforce"
},
"split_keywords": [
"uv",
" requirements",
" packaging"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "04b4c4e25f339fabd64997ddc00d171022846be28b90ef656ef4344cfc1526c8",
"md5": "29c074696f9b5c1637871d63f75cf030",
"sha256": "4fb57052f725a683eba33d93bce4e5c09327d85ef5d2fc11d426c06314cff935"
},
"downloads": -1,
"filename": "async_simple_salesforce-1.12.6a4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "29c074696f9b5c1637871d63f75cf030",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 198940,
"upload_time": "2024-09-03T17:34:32",
"upload_time_iso_8601": "2024-09-03T17:34:32.629252Z",
"url": "https://files.pythonhosted.org/packages/04/b4/c4e25f339fabd64997ddc00d171022846be28b90ef656ef4344cfc1526c8/async_simple_salesforce-1.12.6a4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3747a9fa8d0f1289113a2d4a4aebc53fb6ba2c91928999047aecbb319f34d114",
"md5": "cf143824b0994fce4ad13e7fd0281428",
"sha256": "39fd88cd3a94ccae11d2b6432bf04ce5b65a678d227629dda1419ec172d83dd9"
},
"downloads": -1,
"filename": "async_simple_salesforce-1.12.6a4.tar.gz",
"has_sig": false,
"md5_digest": "cf143824b0994fce4ad13e7fd0281428",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 190890,
"upload_time": "2024-09-03T17:34:34",
"upload_time_iso_8601": "2024-09-03T17:34:34.477766Z",
"url": "https://files.pythonhosted.org/packages/37/47/a9fa8d0f1289113a2d4a4aebc53fb6ba2c91928999047aecbb319f34d114/async_simple_salesforce-1.12.6a4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-03 17:34:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MulliganFunding",
"github_project": "async-simple-salesforce",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "async-simple-salesforce"
}