{"id":27946611,"url":"https://github.com/sailthru/sailthru-python-client","last_synced_at":"2025-05-07T13:56:38.408Z","repository":{"id":57463634,"uuid":"1340271","full_name":"sailthru/sailthru-python-client","owner":"sailthru","description":"Python client for Sailthru","archived":false,"fork":false,"pushed_at":"2024-07-30T22:44:05.000Z","size":170,"stargazers_count":29,"open_issues_count":6,"forks_count":46,"subscribers_count":72,"default_branch":"master","last_synced_at":"2025-05-07T13:56:36.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://docs.sailthru.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sailthru.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-02-08T01:01:10.000Z","updated_at":"2025-04-12T14:16:19.000Z","dependencies_parsed_at":"2022-09-14T17:12:40.405Z","dependency_job_id":"6f4b8181-701f-4ebd-ad5f-c2bd941fc023","html_url":"https://github.com/sailthru/sailthru-python-client","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailthru%2Fsailthru-python-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailthru%2Fsailthru-python-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailthru%2Fsailthru-python-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailthru%2Fsailthru-python-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sailthru","download_url":"https://codeload.github.com/sailthru/sailthru-python-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892520,"owners_count":21820646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T13:56:34.069Z","updated_at":"2025-05-07T13:56:38.398Z","avatar_url":"https://github.com/sailthru.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"sailthru-python-client\n======================\n\n\nFor installation instructions, documentation, and examples please visit:\n[http://getstarted.sailthru.com/new-for-developers-overview/api-client-library/python](http://getstarted.sailthru.com/new-for-developers-overview/api-client-library/python)\n\nA simple client library to remotely access the `Sailthru REST API` as per [http://getstarted.sailthru.com/api](http://getstarted.sailthru.com/developers/api)\n\nPython binding for [Sailthru API](http://getstarted.sailthru.com/api) based on [Requests](http://docs.python-requests.org/en/latest/)\n\nIt will make requests in `JSON` format.\n\nSupports Python 2.6, 2.7, 3.3+\n\n### Installation (Tested with Python 2.7.x)\n\nInstalling with [pip](http://www.pip-installer.org/):\n\n    pip install sailthru-client\n    \n### Running tests\nInstall tox and then type:\n\n    tox\n\n### API Rate Limiting\n\nHere is an example how to check rate limiting and throttle API calls based on that. For more information about Rate Limiting, see [Sailthru Documentation](https://getstarted.sailthru.com/new-for-developers-overview/api/api-technical-details/#Rate_Limiting)\n\n\n```python\nsailthru_client = SailthruClient(api_key, api_secret)\n\n# ... make some api calls ...\n\nrate_limit_info = sailthru_client.get_last_rate_limit_info('user', 'POST')\n\n# get_last_rate_limit_info returns None if given endpoint/method wasn't triggered previously\nif rate_limit_info is not None:\n    limit = rate_limit_info['limit'];\n    remaining = rate_limit_info['remaining'];\n    reset_timestamp = rate_limit_info['reset'];\n\n    # throttle api calls based on last rate limit info\n    if remaining \u003c= 0:\n         seconds_till_reset = reset_timestamp - time.time()\n         # sleep or perform other business logic before next user api call\n         time.sleep(seconds_till_reset);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsailthru%2Fsailthru-python-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsailthru%2Fsailthru-python-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsailthru%2Fsailthru-python-client/lists"}