{ "info": { "author": "RAS Development Team", "author_email": "onsdigital@linux.co.uk", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Requests Defaulter\n\nSmall library to set default headers in requests\n\nCurrently there's no easy way to set default headers in requests. This\npatches the requests library to enable default headers to be set across\nthe board.\n\n## Using this library\n\nYou can install this library from pypi. \n\nTo do this using [pipenv](https://docs.pipenv.org/) run:\n\n```\npipenv install requestsdefaulter\n```\n\nYou can then set default headers in requests by running\n\n```python\nimport requestsdefaulter\n\ndef default_header_provider():\n return { \"X-Your-Header\": \"Contents Of Header\"}\n\nrequestsdefaulter.default_headers(default_header_provider)\n```\n\nAnd make your request as normal\n\n```python\nimport requests\n\nrequests.get(\"https://example.com\")\n```\n\nAnd your request will contain the header\n\n## Developing\n\nThese instructions will get you a copy of the project up and running.\n\n### Prerequisites\n\nThis project uses [pipenv](https://docs.pipenv.org/).\n\nIt expects Python 3.6\n\n### Installing\n\nTo install the dependencies of this library run\n\n```shell\n$ pipenv install --dev master \u2731 \u279c \u25fc\nInstalling dependencies from Pipfile.lock (f97fb9)\u2026\n \ud83d\udc0d \u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589\u2589 11/11 \u2014 00:00:01\nTo activate this project's virtualenv, run the following:\n $ pipenv shell\n```\n\n## Running the tests\n\nTo run all the tests simply run\n\n```shell\nmake test\n```\n\n### Behavioural Tests\n\nWe use behave to test the library to run the tests run\n\n```shell\npipenv run behave\n```\n\n### Security Check\n\nThis will check against PEP 508 and for security vulnerabilities in dependencies\n\n```shell\npipenv check\n```\n\n### Coding Style Checks\n\nCompare the code to pep8\n\n```\npipenv run flake8\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ONSdigital/requestsdefaulter", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "requestsdefaulter", "package_url": "https://pypi.org/project/requestsdefaulter/", "platform": "", "project_url": "https://pypi.org/project/requestsdefaulter/", "project_urls": { "Homepage": "https://github.com/ONSdigital/requestsdefaulter" }, "release_url": "https://pypi.org/project/requestsdefaulter/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Small library to set default headers in requests", "version": "0.1.1" }, "last_serial": 4199325, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6bbbe3f5f25f92a73a256836412c940a", "sha256": "bb83e7f96009be470d1dea55c270c9dad06fb231dd33dda483ab3d8ffb6b8102" }, "downloads": -1, "filename": "requestsdefaulter-0.1.0-py3.6.egg", "has_sig": false, "md5_digest": "6bbbe3f5f25f92a73a256836412c940a", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 1824, "upload_time": "2018-08-23T08:31:05", "url": "https://files.pythonhosted.org/packages/ef/7a/803bcffddd40387114ba2080b536e7a64cdfb7ccd32053a3da6177c4be24/requestsdefaulter-0.1.0-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "7e4edcf5dc7c75fcd785f549e10b1bf0", "sha256": "5e185d9b38f29215c78446188afd70765a8e876244eec6a5f0e71ae437fdb128" }, "downloads": -1, "filename": "requestsdefaulter-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7e4edcf5dc7c75fcd785f549e10b1bf0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 1523, "upload_time": "2018-08-23T08:31:04", "url": "https://files.pythonhosted.org/packages/c8/82/49aec7d18837c47aa2a4385dca8ec743fd6b8af43600621b183bce03302d/requestsdefaulter-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9a2a023dc6e7fe61327d5c35ca7fb74b", "sha256": "5682733d391af907d8e5e95a5470b3b785275f1089a7a7113f1bb288b9d4631a" }, "downloads": -1, "filename": "requestsdefaulter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9a2a023dc6e7fe61327d5c35ca7fb74b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2214, "upload_time": "2018-08-23T10:04:58", "url": "https://files.pythonhosted.org/packages/1d/04/02ac766ec7cca5e40cab5ad6e7272e514598e9d9899f4fb4f1f25b449a9c/requestsdefaulter-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9a2a023dc6e7fe61327d5c35ca7fb74b", "sha256": "5682733d391af907d8e5e95a5470b3b785275f1089a7a7113f1bb288b9d4631a" }, "downloads": -1, "filename": "requestsdefaulter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9a2a023dc6e7fe61327d5c35ca7fb74b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2214, "upload_time": "2018-08-23T10:04:58", "url": "https://files.pythonhosted.org/packages/1d/04/02ac766ec7cca5e40cab5ad6e7272e514598e9d9899f4fb4f1f25b449a9c/requestsdefaulter-0.1.1.tar.gz" } ] }