{"id":30048279,"url":"https://github.com/segmentio/public-api-sdk-python","last_synced_at":"2025-09-04T12:40:26.082Z","repository":{"id":207283741,"uuid":"415124889","full_name":"segmentio/public-api-sdk-python","owner":"segmentio","description":"Segment Public API Python SDK","archived":false,"fork":false,"pushed_at":"2025-09-03T00:10:29.000Z","size":9682,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T02:20:51.849Z","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/segmentio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-10-08T20:56:18.000Z","updated_at":"2025-09-03T00:10:31.000Z","dependencies_parsed_at":"2024-02-13T02:26:55.913Z","dependency_job_id":"eec1039f-96c2-4757-8b09-d9e9cf8c40a2","html_url":"https://github.com/segmentio/public-api-sdk-python","commit_stats":null,"previous_names":["segmentio/public-api-sdk-python"],"tags_count":1229,"template":false,"template_full_name":null,"purl":"pkg:github/segmentio/public-api-sdk-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fpublic-api-sdk-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fpublic-api-sdk-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fpublic-api-sdk-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fpublic-api-sdk-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/segmentio","download_url":"https://codeload.github.com/segmentio/public-api-sdk-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/segmentio%2Fpublic-api-sdk-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273611447,"owners_count":25136972,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-07T10:08:27.954Z","updated_at":"2025-09-04T12:40:26.067Z","avatar_url":"https://github.com/segmentio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Segment Public API Python SDK\n\n:warning: This SDK is currently released as [Public Beta](https://segment.com/legal/first-access-beta-preview/). Its use in critical systems is discouraged, but [feedback is welcome](#contributing).\n\nThe Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs.\n\nAll CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace.\n\nSee the next sections for more information on how to use the Segment Public API.\n\n\nThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: 59.1.0\n- Package version: 59.1.0\n- Build package: org.openapitools.codegen.languages.PythonClientCodegen\n\nFor more information, please visit [https://docs.segmentapis.com](https://docs.segmentapis.com)\n\n## Requirements.\n\nPython 3.7+\n\n## Installation \u0026 Usage\n### pip install\n\nIf the python package is hosted on a repository, you can install directly using:\n\n```sh\npip install git+https://github.com/segmentio/public-api-sdk-python.git\n```\n(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/segmentio/public-api-sdk-python.git`)\n\nThen import the package:\n```python\nimport segment_public_api\n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport segment_public_api\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\n\nimport time\nimport segment_public_api\nfrom segment_public_api.rest import ApiException\nfrom pprint import pprint\n\n# Configure Bearer authorization: token\nconfiguration = segment_public_api.Configuration(\n    access_token = os.environ[\"BEARER_TOKEN\"]\n)\n\n# Enter a context with an instance of the API client\nwith segment_public_api.ApiClient(configuration) as api_client:\n    # Create an instance of the API class\n    api_instance = segment_public_api.WorkspacesApi(api_client)\n    \n    try:\n        # Get Workspace\n        api_response = api_instance.get_workspace()\n        print(\"The response of WorkspacesApi-\u003eget_workspace:\\n\")\n        pprint(api_response)\n    except ApiException as e:\n        print(\"Exception when calling WorkspacesApi-\u003eget_workspace: %s\\n\" % e)\n\n    source_api_instance = segment_public_api.SourcesApi(api_client)\n    cursor = None\n    while True:\n        try:\n            # Get Sources\n            pagination = segment_public_api.PaginationInput(count=50, cursor= cursor)\n            api_response = source_api_instance.list_sources(pagination)\n            print(\"The response of SourcesApi-\u003elist_sources:\\n\")\n            pprint(api_response)\n            cursor = api_response.data.pagination.next\n            if api_response.data.pagination.next is None:\n                break\n        except ApiException as e:\n            print(\"Exception when calling SourcesApi-\u003elist_sources: %s\\n\" % e)\n```\n\n## Contributing\n\nThe contents of this repository are automatically generated, so we can't take contributions from external developers. If you have any issues with this SDK, please raise an issue or reach out to friends@segment.com instead of opening a pull request. Pull requests will not be reviewed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegmentio%2Fpublic-api-sdk-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsegmentio%2Fpublic-api-sdk-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsegmentio%2Fpublic-api-sdk-python/lists"}