A straightforward, Pythonic interface for the SugarCRM API
Project description
Zucker
Zucker is a Python library for Sugar CRM with a simple, readable API. Features:
- No dependencies (except for an HTTP client of your choice)
- Native support for both synchronous and asyncio paradigms
- Schema introspection that extracts supported fields from a Sugar server to speed up development
- ORM-like feel that abstracts away details of the upstream API
- Fully type-checked (internal and external code)
To get started, have a look at the Documentation. If you find that something is missing, feel free to open an issue.
What does it look like?
First, connect to a Sugar server. Then you can define a model that matches what you have on the backend (use the introspection features to speed up this process!):
from zucker import model, RequestsClient
crm = RequestsClient("https://crm.example.com", "zucker", "password")
class Contact(model.SyncModule, client=crm, api_name="Contacts"):
lead_source = model.StringField()
phone_work = model.StringField()
contacts = Contact.find(Contact.lead_source == "Word of mouth")
for contact in contacts:
print(contact.phone_work)
print(",".join(contact.phone_work for contact in contacts[:3]))
Again, see the Documentation for more examples.
License
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
zucker-0.2.3.tar.gz
(35.5 kB
view hashes)
Built Distribution
zucker-0.2.3-py3-none-any.whl
(42.0 kB
view hashes)