{"id":22394370,"url":"https://github.com/akamai/httpie-edgegrid","last_synced_at":"2025-05-16T07:05:57.388Z","repository":{"id":34253297,"uuid":"38137400","full_name":"akamai/httpie-edgegrid","owner":"akamai","description":"Plugin for httpie to allow edge grid authentication for Akamai","archived":false,"fork":false,"pushed_at":"2025-04-28T09:49:40.000Z","size":167,"stargazers_count":68,"open_issues_count":3,"forks_count":22,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-28T09:53:30.810Z","etag":null,"topics":["akamai-devexp","akamai-edgegrid","authentication","devexp-edgegrid","httpie"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akamai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2015-06-26T22:39:56.000Z","updated_at":"2025-04-28T08:30:11.000Z","dependencies_parsed_at":"2024-12-13T11:11:24.482Z","dependency_job_id":"0ceb2c75-b766-4d6b-94c0-5930b059c56a","html_url":"https://github.com/akamai/httpie-edgegrid","commit_stats":{"total_commits":52,"total_committers":17,"mean_commits":"3.0588235294117645","dds":0.8269230769230769,"last_synced_commit":"3182ac6c7793478c1f0e24cc3b23db11f2701c4f"},"previous_names":["akamai-open/httpie-edgegrid"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fhttpie-edgegrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fhttpie-edgegrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fhttpie-edgegrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fhttpie-edgegrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akamai","download_url":"https://codeload.github.com/akamai/httpie-edgegrid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485062,"owners_count":22078767,"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":["akamai-devexp","akamai-edgegrid","authentication","devexp-edgegrid","httpie"],"created_at":"2024-12-05T05:09:56.660Z","updated_at":"2025-05-16T07:05:52.379Z","avatar_url":"https://github.com/akamai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EdgeGrid for HTTPie\n\nEdgeGrid plugin for [HTTPie](https://github.com/jkbr/httpie).\n\nThis library implements an Authentication handler for HTTP requests using the [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) scheme for HTTPie.\n\n## Install\n\nTo use the library, you need to have Python 3.9 or later installed on your system.\n\nThen, install the `httpie-edgegrid` authentication handler from sources by running this command from the project root directory:\n\n   ```\n   pip install .\n   ```\n\nAlternatively, you can install it from PyPI (Python Package Index) by running:\n\n```\npip install httpie-edgegrid\n```\n\n## Authentication\n\nYou can obtain the authentication credentials through an API client. Requests to the API are marked with a timestamp and a signature and are executed immediately.\n\n1. [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials).\n\n2. Place your credentials in an EdgeGrid resource file, `.edgerc`, under a heading of `[default]` at your local home directory.\n\n   ```\n    [default]\n    client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=\n    host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net\n    access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij\n    client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj\n    ```\n\n3. Use your local `.edgerc` by providing the path to your resource file and credentials' section header.\n\n   The `--edgegrid-config` argument is optional, as it defaults to `~/.edgerc`.\n\n    ```bash\n    http --auth-type=edgegrid --edgegrid-config=\u003cpath/to/.edgerc\u003e -a \u003ccredentials_section_name\u003e: \u003cMETHOD\u003e :/\u003capi_endpoint\u003e\n    ```\n\n   Alternatively, you can use an `RC_PATH` environment variable to point to the `.edgerc` resource file. It's equivalent to the `--edgegrid-config` argument.\n\n   ```bash\n   export RC_PATH=\u003cpath/to/.edgerc\u003e\n   ```\n\n## Use\n\nTo use the library, provide your credentials section header and the appropriate endpoint information.\n\n```bash\n$ http --auth-type=edgegrid -a default: GET :/identity-management/v3/user-profile\n```\n\u003e **Note:** You can omit the `METHOD` argument. If you don't specify it, HTTPie sets it by default to:\n\u003e\n\u003e - `GET` for requests without body\n\u003e - `POST` for requests with body\n\nFor details, see the [HTTPie documentation](https://httpie.io/docs/cli/optional-get-and-post).\n\n### Query string parameter\n\nWhen entering query parameters, pass them as name-value pairs separated with a double equal sign (`==`).\n\n```bash\n$ http --auth-type=edgegrid -a default: GET :/identity-management/v3/user-profile \\\n   authGrants==true \\\n   notifications==true \\\n   actions==true\n```\n\nFor detail on adding query string parameters, see [HTTPie documentation](https://httpie.io/docs/cli/querystring-parameters).\n\n\n### Headers\n\nEnter request headers as name-value pairs separated with a colon (`:`).\n\n\u003e **Note:** You don't need to include the `Content-Type` and `Content-Length` headers. The authentication layer adds these values.\n\n```bash\n$ http --auth-type=edgegrid -a default: GET :/identity-management/v3/user-profile \\\n   Accept:application/json\n```\n\nFor detail on setting headers, see [HTTPie documentation](https://httpie.io/docs/cli/http-headers).\n\n### Body data\n\nUse the [HTTPie syntax](https://httpie.io/docs/cli/non-string-json-fields) to pass simple JSON data in the request.\n\n```bash\n$ http --auth-type=edgegrid -a default: PUT :/identity-management/v3/user-profile/basic-info \\\n  contractType=Billing \\\n  country=USA \\\n  firstName=John \\\n  lastName=Smith \\\n  phone=3456788765 \\\n  preferredLanguage=English \\\n  sessionTimeOut:=30 \\\n  timeZone=GMT \\\n  Content-Type:application/json \\\n  Accept:application/json\n```\n\nTo pass a nested JSON object, see [HTTPie documentation](https://httpie.io/docs/cli/nested-json) for details.\n\n### Debug\n\nUse the `--verbose` argument to enable debugging and get additional information on the HTTP request.\n\n```\n$ http --verbose --auth-type=edgegrid -a default: GET :/identity-management/v3/user-profile\n```\n\nIn case of the HTTPie plugin's crash, add the `--traceback` argument to the request. It prints out the request's detailed stack trace. It's useful for [reporting issues](#reporting-issues).\n\n## Run tests in virtual environment\n\nThe `venv` module is included in Python 3 by default.\n\nTo test in a [virtual environment](https://docs.python.org/3/library/venv.html):\n\n1. Initialize your environment in a new directory.\n\n   ```\n   // Unix/macOS\n   python3 -m venv ~/Desktop/myenv\n\n   // Windows\n   py -m venv ~/Desktop/myenv\n   ```\n\n   This creates a `venv` in the specified directory as well as copies pip into it.\n\n2. Activate your environment.\n\n   ```\n   // Unix/macOS\n   source ~/Desktop/myenv/bin/activate\n\n   // Windows\n   ~/Desktop/myenv/Scripts/activate\n   ```\n\n   Your prompt will change to show you're working in a virtual environment, for example:\n\n   ```\n   (myenv) jsmith@abc-de12fg $\n   ```\n\n3. To recreate the environment, install the required dependencies within your project.\n\n   ```\n   pip install -r dev-requirements.txt\n   ```\n\n4. Run the tests.\n\n   ```\n   // Unix/macOS\n   pytest -v\n\n   // Windows\n   py -m pytest -v\n   ```\n\n5. To deactivate your environment, run the `deactivate` command.\n\n## Troubleshooting\n\n| Error message | Solution |\n| ------- | -------|\n| `http: error: argument --auth-type/-A: invalid choice: 'edgegrid' (choose from 'basic', 'digest')` | macOS Sierra users have reported this error after the package installation. To fix it, try installing the package using pip. |\n| `ImportError: 'pyOpenSSL' module missing required functionality. Try upgrading to v0.14 or newer` | If you get this error, then you're required to install an updated version of `pyOpenSSL`: \u003cbr /\u003e \u003cbr /\u003e `$ pip install --ignore-installed pyOpenSSL`|\n| `ImportError: No module named cryptography` | Starting with HTTPie v0.9.4, the Mac homebrew package is built with python3. If you get this error, then probably you've installed httpie-edgegrid with python2.7 (unsupported). To explicitly install with python3, run: \u003cbr /\u003e \u003cbr /\u003e `$ pip3 install .` \u003cbr /\u003e \u003cbr /\u003e Or: \u003cbr /\u003e \u003cbr /\u003e `$ pip3 install httpie-edgegrid` |\n\n## Reporting issues\n\nTo report an issue or make a suggestion, create a new [GitHub issue](https://github.com/akamai/httpie-edgegrid/issues).\n\n## License\n\nCopyright 2024 Akamai Technologies, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakamai%2Fhttpie-edgegrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakamai%2Fhttpie-edgegrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakamai%2Fhttpie-edgegrid/lists"}