API wrapper for SugarCRM cloud written in Python
Project description
# sugarcrm-cloud-python
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sugarcrm-cloud-python-0.1.0.tar.gz
.
File metadata
- Download URL: sugarcrm-cloud-python-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a80598ecfeefbf53852588587ca2487cad04421cbb33abfaf2c8535d45d2967 |
|
MD5 | de22a21aa5eb81578112261ef0700e34 |
|
BLAKE2b-256 | d9c1c32eaaa817086a7d209bcc48a1c6a6602493f243a960e26d1a4cab3e33ad |