A client library for Savannah CRM
Project description
Savannah CRM Client
This client library wraps the Savannah CRM API, making it easier to import community members and activity from your own Python code.
Usage
Connecting to an API Source
>>> from savannahcrm import SavannahAPISource
>>> source = SavannahAPISource(token='7fbd4b88-5af7-4acf-bc81-f1888cd8f1b2')
>>> print("Source: %s" % source)
Source: Test
>>> print("Source info: %s" % source.info)
Source info: {'community': 'InfluxDB', 'name': 'Test', 'icon_name': 'fab fa-twitter-square', 'first_import': None, 'last_import': '2021-04-20T14:20:12.440415', 'enabled': True}
Adding a Member
>>> new_member = source.add_member(
... origin_id='test-1',
... username='test_user_1',
... name='API Test User',
... email='api@test.com',
... tags=['api-test']
... )
>>> print("Member: %s" % new_member)
Member: {'origin_id': 'test-1', 'username': 'test_user_1', 'name': 'API Test User', 'email': 'api@test.com', 'avatar': None, 'tags': ['api-test']}
Adding a Converation
>>> convo_tstamp = datetime.datetime(2021, 4, 19, 13, 35, 00)
>>> new_convo = source.add_conversation(
... origin_id='test-convo-1',
... speaker='test-1',
... channel='API Test',
... timestamp=convo_tstamp,
... content='Testing savannah-client library for Python',
... location='https://docs.savannahhq.com/api/',
... tags=['api-test', 'python']
... )
>>> print("Conversation: %s" % new_convo)
Conversation: {'origin_id': 'test-convo-1', 'speaker': 'test-1', 'channel': 'API Test', 'timestamp': '2021-04-19T13:35:00', 'content': 'Testing savannah-client library for Python', 'location': 'https://docs.savannahhq.com/api/', 'participants': ['test-1'], 'tags': ['api-test', 'python']}
Adding a Contribution
>>> new_contrib = source.add_contribution(
... origin_id='test-convo-1',
... author='test-1',
... channel='API Test',
... contribution_type='Pull Request',
... timestamp=convo_tstamp,
... title='Built importer using the Savannah API',
... location='https://github.com/SavannahHQ/savannahcrm-client-python',
... tags=['api-test', 'python'],
... conversation='test-convo-1',
... )
>>> print("Contribution: %s" % new_contrib)
Contribution: {'origin_id': 'test-convo-1', 'author': 'test-1', 'contribution_type': 'Pull Request', 'channel': 'API Test', 'timestamp': '2021-04-19T13:35:00', 'title': 'Built importer using the Savannah API', 'location': 'https://github.com/SavannahHQ/savannahcrm-client-python', 'conversation': 'test-convo-1', 'tags': ['api-test', 'python']}
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file savannahcrm-client-0.1.tar.gz.
File metadata
- Download URL: savannahcrm-client-0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c79cec0edf969c603b34056ea4a374d93657a23750d9dbcaa38b507ae21231e6
|
|
| MD5 |
1579acd13c9a0477acac881909538d30
|
|
| BLAKE2b-256 |
a2ac4e2b8232bf5ed6ab2da7c06b63d0861656ac5a762a4964132204b635d0b7
|
File details
Details for the file savannahcrm_client-0.1-py3-none-any.whl.
File metadata
- Download URL: savannahcrm_client-0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02bce8c4acd0f22977ea6d3a925454eceef06511eddd3f4905f8bc5d4c3390a6
|
|
| MD5 |
06f6e50c170d1a7a657d393220f30f93
|
|
| BLAKE2b-256 |
524f0b49abc173f5f749846bd76af48a0ed639a91d02547161c07ef772a81daf
|