Skip to main content
smsapi-contacts-python
=============

Client for SMSAPI contacts rest api.

## COMPATIBILITY:
Compatible with Python 2.6+, 2.7+, 3.+.

## REQUIREMENTS:
requests

## INSTALLATION:
If You have pip installed:

sudo pip install smsapi-contacts

else You can install manually:

git clone https://github.com/smsapi/smsapi-contacts-python-client.git

cd smsapi-contacts-python

python setup.py install

## USAGE:

```python
from smsapicontacts.api import ContactsApi

api = ContactsApi(username=api_username, password=api_password)
```

#### Contact management

```python
contact = api.create_contact(
first_name='Jon',
last_name='Doe',
idx='id for Your use',
phone_number=123123123,
email='jondoe@somedomain.com'
birthday_date='1970-01-01',
gender='{male|female|undefined}',
city='some_city',
email='jondoe@somedomain.com',
source='some_contact_source',
description='Jon Doe')

contact = api.update_contact(contact_id=1, description='new_description')

contacts = api.list_contacts()

contact = api.get_contact(contact_id=1)

groups = api.list_contact_groups(contact_id=1)

contact = api.bind_contact_to_group(contact_id=1, group_id=1)

api.delete_contact(contact_id=1)
```

#### Group management

```python
group = api.create_group(name='group_name', description='group_description')

groups = api.list_groups()

group = api.get_group(group_id=1)

group = api.update_group(group_id=1, name='new_name')

api.delete_group(group_id=1)

permissions = api.list_group_permissions(group_id=1)

permission = api.create_group_permission(
group_id=1
read=True,
write=False,
send=True)

permissions = api.list_user_group_permissions(group_id=1, username='some_username')

api.delete_user_group_permission(group_id=1, username='some_username')

permission = api.update_user_group_permission(group_id=1, username='some_username', read=False)

api.unpin_contact_from_group(group_id=1, contact_id=1)

contact = api.contact_is_in_group(group_id=1, contact_id=1)
```

#### Custom field management

```python
fields = api.list_custom_fields()

field = api.create_custom_field(name='some_field_name', type='{TEXT|DATE|EMAIL|NUMBER|PHONENUMBER|}')

field = api.update_custom_field(field_id='1', name='new_field_name')

delete_custom_field(field_id=1)
```

#### Error handling

```python
from smsapicontacts.exception import ContactsApiError

try:
contact = api.create_contact(phone_number=123123)
except ContactsApiError as e:
print(e.message, e.code, e.type)
```

## LICENSE
[Apache 2.0 License](https://github.com/smsapi/smsapi-contacts-python/blob/master/LICENSE)

Metadata

Release files for smsapi-contacts 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smsapi-contacts 1.0.5
File Size Uploaded Provenance Actions
smsapi-contacts-1.0.5.tar.gz 8.1 kB Without provenance Details for smsapi-contacts-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for smsapi-contacts 1.0.5
File Interpreter ABI Platform Actions
smsapi_contacts-1.0.5-py2.py3-none-any.whl Python 2, Python 3 none any Details for smsapi_contacts-1.0.5-py2.py3-none-any.whl

Total release size: 21.2 kB

Release files / smsapi-contacts-1.0.5.tar.gz

Download URL smsapi-contacts-1.0.5.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
97e4185033be7d3d71dfa2de82d27a45d71a5c8b5e08b3c32c8f75e6982d5aea
BLAKE2b-256 checksum
How to use checksums
28550849102c3076518c39b005c0636071241ab9fd156641ca669514c2f9f0ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / smsapi_contacts-1.0.5-py2.py3-none-any.whl

Download URL smsapi_contacts-1.0.5-py2.py3-none-any.whl
Size 13.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
67505dfa91d554aec2ac2bd4e744ba1b27be77d70ab08201ddd1981a6422f76d
BLAKE2b-256 checksum
How to use checksums
790ebf02403a3a17063b40c517503e0c6bdbe91a13f2ee4e34d07182986c9bbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for smsapi-contacts 1.0.5

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page