Python SDK for accessing Freshsales
Project description
freshsales-sdk-py
Unofficial Python SDK for accessing Freshsales.
Warning: This is undergoing active development and we will accept contributions once things are a little stable.
Installation
- Download this project and use it (copy it in your project, etc).
- Install it from pip.
pip install freshsalessdk
Usage
To use this SDK you'll need these Freshsales credentials and your Freshsales domain (https://domain.freshsales.io). See official documentation for steps. We'll assume these are available via environment variables thusly:
export FS_API_KEY=xxx
export FS_DOMAIN=yyy
The following snippet shows you how to initialize and use the SDK.
from freshsalessdk import FreshsalesSDK
import os
fs = FreshsalesSDK(
domain=os.getenv('FS_DOMAIN'),
api_key=os.getenv('FS_API_KEY')
)
# get contact views
views = fs.contacts.get_views()
# get contacts in a view
view_id = 123
contacts = fs.contacts.get_all(view_id=view_id)
contacts = list(fs.contacts.get_all_generator(view_id=view_id))
# get specific contact
contact_id = 1232
contact = fs.contacts.get(id=contact_id)
# get contact activities
activities = fs.contacts.get_activities(id=contact_id)
# get account views
views = fs.accounts.get_views()
# get accounts in a view
view_id = 123
accounts = fs.accounts.get_all(view_id=view_id)
accounts = list(fs.accounts.get_all_generator(view_id=view_id))
# get one account
account_id = 1221
account = fs.accounts.get(id=account_id)
# get deal views
views = fs.deals.get_views()
# get deals in a view
view_id = 1212
deals = fs.deals.get_all(view_id=view_id)
deals = list(fs.deals.get_all_generator(view_id=view_id))
# get single deal
deal_id = 12121
deal = fs.deals.get(id=deal_id)
License
This project is licensed under the MIT License - see the LICENSE file for details
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
File details
Details for the file freshsalessdk-0.0.3.tar.gz
.
File metadata
- Download URL: freshsalessdk-0.0.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b273b8a0b3c3c8c8861fba7d7b6ac9b5d762656c283b2948bcea3790446b64a0 |
|
MD5 | 0d21ab97f4627be500386258a842a9ef |
|
BLAKE2b-256 | 1d7dfbc5a3ef819e8e13e6ff63b04f335e6b0312d950cf5b26c2bd929d0c7967 |
File details
Details for the file freshsalessdk-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: freshsalessdk-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96f09b5bad443f0e373a4776bb2f1ec4eab14171660dd53814e1160792fcfc3d |
|
MD5 | 62bc98831605b45176b593ef628b9ab8 |
|
BLAKE2b-256 | 409e4da3ec9f36f2bf5ac31e8b3d464b58fe852b23e4f768441bcd33c7282e0e |