{"id":20180801,"url":"https://github.com/frain-dev/convoy-python","last_synced_at":"2026-02-26T18:37:43.648Z","repository":{"id":42013969,"uuid":"468710405","full_name":"frain-dev/convoy-python","owner":"frain-dev","description":"Convoy SDK for Python","archived":false,"fork":false,"pushed_at":"2024-10-22T17:39:20.000Z","size":52,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T05:08:44.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/frain-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.MD","funding":null,"license":"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}},"created_at":"2022-03-11T10:43:40.000Z","updated_at":"2024-10-22T17:39:25.000Z","dependencies_parsed_at":"2024-10-23T01:28:13.602Z","dependency_job_id":null,"html_url":"https://github.com/frain-dev/convoy-python","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.4444444444444444,"last_synced_commit":"b2d2734ae1b847b3d2113703a181ae41e4785583"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frain-dev%2Fconvoy-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frain-dev%2Fconvoy-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frain-dev%2Fconvoy-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frain-dev%2Fconvoy-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frain-dev","download_url":"https://codeload.github.com/frain-dev/convoy-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161269,"owners_count":21057555,"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":"2024-11-14T02:32:59.483Z","updated_at":"2026-02-26T18:37:38.619Z","avatar_url":"https://github.com/frain-dev.png","language":"Python","readme":"# convoy-python\nConvoy SDK for Python\n\nThis is the Convoy Python SDK. This SDK contains methods for easily interacting with Convoy's API. Below are examples to get you started. See our [API Reference](https://docs.getconvoy.io/api-reference/welcome) for more.\n\n\n## Installation\nInstall convoy-python with\n\n```bash\npip install convoy-python\n```\n\n## Setup Client\nNext, import the `convoy` module and setup with your auth credentials.\n\n```python\nfrom convoy import Convoy\nconvoy = Convoy({\"api_key\":\"your_api_key\", \"project_id\": \"your_project_id\"})\n```\nThe SDK also supports authenticating via Basic Auth by defining your username and password.\n\nIn the event you're using a self-hosted convoy instance, you can define the `uri` as part of what is passed into the convoy's constructor.\n\n```python\nconvoy = Convoy({ \"api_key\": 'your_api_key', \"uri\": 'self-hosted-instance', \"project_id\": \"your_project_id\"})\n```\n\n## Usage\n\n### Get all groups\n\n```python\n(response, status) = convoy.group.all({ \"perPage\": 10, \"page\": 1 })\n```\n\n### Create an Endpoint\n\nAn endpoint represents a target URL to receive events.\n\n```python\nendpointData = {\n    \"url\": \"https://0d87-102-89-2-172.ngrok.io\",\n    \"description\": \"Default Endpoint\",\n    \"secret\": \"endpoint-secret\",\n    \"events\": [\"*\"],\n  }\n\n(response, status) = convoy.endpoint.create({}, endpointData)\nendpoint_id = response[\"data\"][\"uid\"]\n```\n\n### Sending an Event\n\nTo send an event, you'll need the `uid` we created in the earlier section.\n\n```python\neventData = {\n    \"endpoint_id\": endpoint_id,\n    \"event_type\": \"payment.success\",\n    \"data\": {\n      \"event\": \"payment.success\",\n      \"data\": {\n        \"status\": \"Completed\",\n        \"description\": \"Transaction Successful\",\n        \"userID\": \"test_user_id808\",\n      },\n    },\n  }\n\n(response, status) = convoy.event.create({}, eventData)\n```\n\n## Testing\n\n```python\npytest ./test/test.py\n```\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.MD) for details.\n\n\n## Credits\n\n- [Frain](https://github.com/frain-dev)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrain-dev%2Fconvoy-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrain-dev%2Fconvoy-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrain-dev%2Fconvoy-python/lists"}