API wrapper for SugarCRM cloud written in Python
This support API v10+ and v11+
## Installing
```
pip install sugarcrm-cloud-python
```
## Usage
```
from sugarcrm.client import Client
client = Client('site_url', version='8.3') # sugarcrm cloud instance version not API version
```
Get user token
```
client.get_token('username', 'password')
```
Set access token to library
```
client.set_access_token('access_token')
```
Refresh user token
```
client.get_token('refresh_token')
```
Get account information
```
client.me()
```
Get leads
```
client.get_leads()
```
Get a lead
```
client.get_lead('lead_id')
```
Filter leads
```
client.filter_leads(filter_expr=[{'first_name': 'Dave'}])
```
Create a lead
```
client.create_lead({"first_name": "Dave", "last_name": "Smith", "assistant": "Mike Smith"})
```
Get contacts
```
client.get_contacts()
```
Get a contact
```
client.get_contact('contact_id')
```
Filter contacts
```
client.filter_contacts(filter_expr=[{'first_name': 'Dave'}])
```
Create a contact
```
client.create_contact({"first_name": "Dave", "last_name": "Smith", "assistant": "Mike Smith"})
```
Get module fields metadata
```
response = client.get_metadata('Leads')
fields = response['modules']['Leads']['fields']
```
## Requirements
- requests
## TODO
- All other modules
## Contributing
We are always grateful for any kind of contribution including but not limited to bug reports, code enhancements, bug fixes, and even functionality suggestions.
#### You can report any bug you find or suggest new functionality with a new [issue](https://github.com/GearPlug/sugarcrm-cloud-python/issues).
#### If you want to add yourself some functionality to the wrapper:
1. Fork it ( https://github.com/GearPlug/sugarcrm-cloud-python )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Adds my new feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
Metadata
Release files for sugarcrm-cloud-python 0.1.0
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 | Actions |
|---|---|---|---|---|
| sugarcrm-cloud-python-0.1.0.tar.gz | 4.1 kB | Without provenance | Details for sugarcrm-cloud-python-0.1.0.tar.gz |
Release files / sugarcrm-cloud-python-0.1.0.tar.gz
| Download URL | sugarcrm-cloud-python-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a80598ecfeefbf53852588587ca2487cad04421cbb33abfaf2c8535d45d2967
|
|
BLAKE2b-256 checksum How to use checksums |
d9c1c32eaaa817086a7d209bcc48a1c6a6602493f243a960e26d1a4cab3e33ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.0 setuptools/32.3.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7
|
Security for sugarcrm-cloud-python 0.1.0
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.