{"id":28665548,"url":"https://github.com/johnagan/glean-requests","last_synced_at":"2026-02-17T08:31:57.962Z","repository":{"id":280931143,"uuid":"943652058","full_name":"johnagan/glean-requests","owner":"johnagan","description":"A minimal wrapper of the requests library for Glean's API","archived":false,"fork":false,"pushed_at":"2025-03-06T14:49:54.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T19:46:21.909Z","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/johnagan.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}},"created_at":"2025-03-06T03:47:52.000Z","updated_at":"2025-03-06T14:48:48.000Z","dependencies_parsed_at":"2025-03-06T04:38:32.312Z","dependency_job_id":null,"html_url":"https://github.com/johnagan/glean-requests","commit_stats":null,"previous_names":["johnagan/glean-requests"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnagan/glean-requests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fglean-requests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fglean-requests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fglean-requests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fglean-requests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnagan","download_url":"https://codeload.github.com/johnagan/glean-requests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnagan%2Fglean-requests/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259654510,"owners_count":22891032,"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-06-13T13:38:47.870Z","updated_at":"2026-02-17T08:31:52.913Z","avatar_url":"https://github.com/johnagan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glean-requests\n\nA minimal wrapper of the requests library for Glean's API.\n\n## Installation\n\n```bash\npip install glean-requests\n```\n\n## Usage\n\n### REST API Client\n\nFor more information on the REST API, see the [Glean documentation](https://developers.glean.com/client/overview/#section/Introduction).\n\n```python\nfrom glean_requests import GleanRestClient\n\n# Initialize the client\nclient = GleanRestClient(\n    api_token=\"your_api_token\",\n    subdomain=\"your_subdomain\",\n)\n\n# Example Search\n# https://developers.glean.com/client/operation/search/\npayload = { \"query\": \"your_query\" }\nresponse = client.post(\"search\", json=payload)\n```\n\n### Indexing API Client\n\nFor more information on the Indexing API, see the [Glean documentation](https://developers.glean.com/docs/indexing_api/indexing_api_getting_started/).\n\n```python\nfrom glean_requests import GleanIndexingClient\n\n# Initialize the client\nclient = GleanIndexingClient(\n    api_token=\"your_api_token\",\n    subdomain=\"your_subdomain\",\n)\n\n# Example Get Datasource Configuration\n# https://developers.glean.com/indexing/tag/Datasources/paths/~1getdatasourceconfig/post/\npayload = {\"datasource\": \"testing\"}\nresponse = client.post(\"getdatasourceconfig\", json=payload)\n```\n\n### Authentication\n\nFor more information on Authentication, see the [Glean documentation](https://developers.glean.com/docs/client_api/client_api_scopes/).\n\n```python\nclient = GleanRestClient(\n    api_token=\"your_api_token\",\n    subdomain=\"your_subdomain\",\n    act_as=\"optional_user_to_act_as\", # For Global Tokens\n    auth_type=\"OAUTH\" # Optional\n)\n```\n\n## Features\n\n- Simple interface for making authenticated requests to Glean's API endpoints\n- Support for both REST and Indexing APIs\n- Automatic handling of authentication headers and urls\n- Support for [global tokens](https://developers.glean.com/docs/client_api/client_api_scopes/#global)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Fglean-requests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnagan%2Fglean-requests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnagan%2Fglean-requests/lists"}