{"id":17823048,"url":"https://github.com/artofcode-/apipy-src","last_synced_at":"2025-04-02T10:29:35.787Z","repository":{"id":69665581,"uuid":"52092709","full_name":"ArtOfCode-/apipy-src","owner":"ArtOfCode-","description":null,"archived":false,"fork":false,"pushed_at":"2016-02-28T21:22:58.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T04:16:43.672Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArtOfCode-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-02-19T14:22:27.000Z","updated_at":"2016-02-19T14:24:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"b60a81b2-86d7-4731-a45c-8f70c273ca36","html_url":"https://github.com/ArtOfCode-/apipy-src","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtOfCode-%2Fapipy-src","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtOfCode-%2Fapipy-src/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtOfCode-%2Fapipy-src/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtOfCode-%2Fapipy-src/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArtOfCode-","download_url":"https://codeload.github.com/ArtOfCode-/apipy-src/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246796433,"owners_count":20835387,"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-10-27T17:50:37.269Z","updated_at":"2025-04-02T10:29:35.760Z","avatar_url":"https://github.com/ArtOfCode-.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apipy\nA Python 3 library for interacting with the Stack Exchange API.\n\n## Installation\napipy is on the Python Package Index, so installing it is easy:\n\n    pip install apipy\n\n## Usage\n\n    from apipy import APIRequester\n\nYou can initialise a requester with your app's client ID, request key, and access token (all optional). You can also add each of these tokens to the requester later, using `requester.set_request_token`. The full signature of the initialiser method is:\n\n    def __init__(self, request_key=None, client_id=None, access_token=None)\n\n#### 1. Create a requester\n\n    requester = APIRequester('L*dhE6DhheuD53((', 6509)\n\n#### 2. Send a request\n\n    response = requester.make_request('/comments/{id}', {\n        'id': [3511992, 3512254],\n        'site': 'stackoverflow',\n        'filter': '!6JEVJZb8BM9ns'\n    })\n    \n#### 3. Deal with the response\n\n    if not response.is_error():\n        for item in response.get_items():\n            print(\"Found comment, ID {0}, text: {1}\".format(item['comment_id'], item['text']))\n        \n        quota_remaining = response.get_wrapper()['quota_remaining']\n    else:\n        print(\"API Error! Message: {0}\".format(response.get_wrapper()['error_message'])\n\n#### Some points\n- If a `request_key` has been supplied, it will be sent with *every* request because it provides increased quota.\n- Access tokens need to be included explicitly: use `'access_token': requester.get_request_token('access_token')` in the `data` dict.\n- Requests use HTTPS by default.\n- `GET` and `POST` requests are supported (these are the only types the API accepts) - GET is the default. To set the request type, use `'request_type': 'post'` in the `data` dict.\n- You can use parameters in your API route: `{param}` will be replaced with the value of `data['param']` if it exists. You can set `data['param']` to a single value or a list of values; lists will be joined with `;` as the delimeter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartofcode-%2Fapipy-src","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartofcode-%2Fapipy-src","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartofcode-%2Fapipy-src/lists"}