jsonrequest-JustinRWong


Namejsonrequest-JustinRWong JSON
Version 0.1.3 PyPI version JSON
download
home_page
SummaryLightweight wrapper to make http(s) requests. POST, PATCH, and DELETE requests only support json content.
upload_time2023-06-26 06:52:41
maintainer
docs_urlNone
authorJustin Wong
requires_python>=3.2
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # [JSONRequest](https://pypi.org/project/jsonrequest/)
Lightweight wrapper for requests library that only supports Content-Type: application/json.

This only supports `GET`, `POST`, `PATCH`, and `DELETE` http(s) request methods.

## How to Use

First, install the package
```bash
pip install jsonrequest
```

Then, you can use the package.
```python
>>> from jsonrequest.jsonrequest import RequestModel, make_request
>>> r = make_request(RequestModel(endpoint="", method='GET', url='https://google.com'))
>>> r
<Response [200]>
>>> 
```

## Note:
This data passed also only applies to `application/json` content.


Across multiple times over the past many years in my python projects, I found this codeblock repeated whenever I tried to make various http(s) requests using the requests library and thought it'd be much simpler to pass the method as a parameter instead of changing the function. I created this package as a result. Hope this helps and Happy coding :)

- by Justin

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "jsonrequest-JustinRWong",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.2",
    "maintainer_email": "",
    "keywords": "",
    "author": "Justin Wong",
    "author_email": "Justin Wong <justinryanwong@berkeley.edu>",
    "download_url": "https://files.pythonhosted.org/packages/13/81/273ceef90b0ceb33de0a032c2f3ae9c5037f655f91249af330c677fab87f/jsonrequest_JustinRWong-0.1.3.tar.gz",
    "platform": null,
    "description": "# [JSONRequest](https://pypi.org/project/jsonrequest/)\nLightweight wrapper for requests library that only supports Content-Type: application/json.\n\nThis only supports `GET`, `POST`, `PATCH`, and `DELETE` http(s) request methods.\n\n## How to Use\n\nFirst, install the package\n```bash\npip install jsonrequest\n```\n\nThen, you can use the package.\n```python\n>>> from jsonrequest.jsonrequest import RequestModel, make_request\n>>> r = make_request(RequestModel(endpoint=\"\", method='GET', url='https://google.com'))\n>>> r\n<Response [200]>\n>>> \n```\n\n## Note:\nThis data passed also only applies to `application/json` content.\n\n\nAcross multiple times over the past many years in my python projects, I found this codeblock repeated whenever I tried to make various http(s) requests using the requests library and thought it'd be much simpler to pass the method as a parameter instead of changing the function. I created this package as a result. Hope this helps and Happy coding :)\n\n- by Justin\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Lightweight wrapper to make http(s) requests. POST, PATCH, and DELETE requests only support json content.",
    "version": "0.1.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/JustinRWong/JSONRequest/issues",
        "Homepage": "https://github.com/JustinRWong/JSONRequest"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e19b1c5d10aed80328f27063b6025b3c0be9745d9d225cc88d6e982b2d0fa00b",
                "md5": "40eb54b2cfd29fc7b35f36d16724b721",
                "sha256": "e3c588a1d27785ead264085ec95910851e33de84c2838096ad7800faa1bb2d86"
            },
            "downloads": -1,
            "filename": "jsonrequest_JustinRWong-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40eb54b2cfd29fc7b35f36d16724b721",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.2",
            "size": 1877,
            "upload_time": "2023-06-26T06:52:37",
            "upload_time_iso_8601": "2023-06-26T06:52:37.560440Z",
            "url": "https://files.pythonhosted.org/packages/e1/9b/1c5d10aed80328f27063b6025b3c0be9745d9d225cc88d6e982b2d0fa00b/jsonrequest_JustinRWong-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1381273ceef90b0ceb33de0a032c2f3ae9c5037f655f91249af330c677fab87f",
                "md5": "1ec48c60ffe4b4941b3da32523997a55",
                "sha256": "8de89dd199754d60d495c0ae6e069ba05cd3adfcfa2b6368f1ea6a5a4969fe5c"
            },
            "downloads": -1,
            "filename": "jsonrequest_JustinRWong-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1ec48c60ffe4b4941b3da32523997a55",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.2",
            "size": 2004,
            "upload_time": "2023-06-26T06:52:41",
            "upload_time_iso_8601": "2023-06-26T06:52:41.312778Z",
            "url": "https://files.pythonhosted.org/packages/13/81/273ceef90b0ceb33de0a032c2f3ae9c5037f655f91249af330c677fab87f/jsonrequest_JustinRWong-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-26 06:52:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JustinRWong",
    "github_project": "JSONRequest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jsonrequest-justinrwong"
}
        
Elapsed time: 0.16822s