RESTful-Client2


NameRESTful-Client2 JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/johnbrandborg/restful-client2
SummaryRESTful is a simple API library for Humans, inspired by Python Requests
upload_time2023-10-08 18:47:12
maintainer
docs_urlNone
authorJohn Brandborg
requires_python>=3.7
licenseMIT
keywords restful api crud
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python RESTful Client 2
[![Python appliction](https://github.com/johnbrandborg/restful-client2/workflows/Python%20application/badge.svg)](https://github.com/johnbrandborg/restful-client2/actions?query=workflow%3A%22Python+application%22)
[![PyPI version](https://badge.fury.io/py/RESTful-Client.svg)](https://pypi.org/project/RESTful-Client2/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=johnbrandborg_restful-client&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=johnbrandborg_restful-client)

RESTful Clients2 is a simple high level library for Humans, inspired by [Python Requests](https://requests.readthedocs.io/en/latest/)

```python
>>> import restful_client2
>>> cf = restful_client2.CRUD(host="https://catfact.ninja/")
>>> data = cf.read("fact")
```

Focus on using Python data types instead of worrying about serialisation.
Authentication, Timeouts, Retries, Backoff are all built in and can be adjusted.

### Installation

You can install the client using PIP like so.

```bash
pip install RESTful-Client2
```

### Logging

If you want to see logging set the level using the standard logging interface.
DEBUG will show you URLLib3, but INFO will give you general information from
the RESTful-Client2.

``` python
>>> import logging
>>> import restful_client2
>>> logging.basicConfig(level=logging.INFO)
```

### Extending

The library has been created with extensability in mind.  You can Sub Class CRUD
for example and add the logic requirements needed to make the requests.

```python
from restful_client2 import CRUD

class CatFactNinja(CRUD):
    """Cat Fact Ninja Interface"""

    _fact_uri = "fact"

    def __init__(self, **kwargs):
        host = "http://catfact.ninja/"
        super().__init__(host=host, **kwargs)

    @property
    def fact(self):
        """ Get a Fact about Cats"""
        return self.read(self._fact_uri)

cat = CatFactNinja()
print(cat.fact)
```

## Todo List
- [ ] OAuth Client for Authentication

## License
RESTful-Client is released under the MIT License. See the bundled LICENSE file for details.

## Credits
* [URLLib3 Team](https://github.com/urllib3)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/johnbrandborg/restful-client2",
    "name": "RESTful-Client2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "restful api crud",
    "author": "John Brandborg",
    "author_email": "john.brandborg+pypi@pm.me",
    "download_url": "https://files.pythonhosted.org/packages/83/bc/afe1b3f725c8ae857550b001ac2e144abba1b52eeb2489f543fe08133d3d/RESTful-Client2-1.0.0.tar.gz",
    "platform": "unix",
    "description": "# Python RESTful Client 2\n[![Python appliction](https://github.com/johnbrandborg/restful-client2/workflows/Python%20application/badge.svg)](https://github.com/johnbrandborg/restful-client2/actions?query=workflow%3A%22Python+application%22)\n[![PyPI version](https://badge.fury.io/py/RESTful-Client.svg)](https://pypi.org/project/RESTful-Client2/)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=johnbrandborg_restful-client&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=johnbrandborg_restful-client)\n\nRESTful Clients2 is a simple high level library for Humans, inspired by [Python Requests](https://requests.readthedocs.io/en/latest/)\n\n```python\n>>> import restful_client2\n>>> cf = restful_client2.CRUD(host=\"https://catfact.ninja/\")\n>>> data = cf.read(\"fact\")\n```\n\nFocus on using Python data types instead of worrying about serialisation.\nAuthentication, Timeouts, Retries, Backoff are all built in and can be adjusted.\n\n### Installation\n\nYou can install the client using PIP like so.\n\n```bash\npip install RESTful-Client2\n```\n\n### Logging\n\nIf you want to see logging set the level using the standard logging interface.\nDEBUG will show you URLLib3, but INFO will give you general information from\nthe RESTful-Client2.\n\n``` python\n>>> import logging\n>>> import restful_client2\n>>> logging.basicConfig(level=logging.INFO)\n```\n\n### Extending\n\nThe library has been created with extensability in mind.  You can Sub Class CRUD\nfor example and add the logic requirements needed to make the requests.\n\n```python\nfrom restful_client2 import CRUD\n\nclass CatFactNinja(CRUD):\n    \"\"\"Cat Fact Ninja Interface\"\"\"\n\n    _fact_uri = \"fact\"\n\n    def __init__(self, **kwargs):\n        host = \"http://catfact.ninja/\"\n        super().__init__(host=host, **kwargs)\n\n    @property\n    def fact(self):\n        \"\"\" Get a Fact about Cats\"\"\"\n        return self.read(self._fact_uri)\n\ncat = CatFactNinja()\nprint(cat.fact)\n```\n\n## Todo List\n- [ ] OAuth Client for Authentication\n\n## License\nRESTful-Client is released under the MIT License. See the bundled LICENSE file for details.\n\n## Credits\n* [URLLib3 Team](https://github.com/urllib3)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "RESTful is a simple API library for Humans, inspired by Python Requests",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/johnbrandborg/restful-client2",
        "Source": "https://github.com/johnbrandborg/restful-client2",
        "Tracker": "https://github.com/johnbrandborg/restful-client2/issues"
    },
    "split_keywords": [
        "restful",
        "api",
        "crud"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2c6f36847f44811b1423c1cafa1c42ef124e12751db29dd088f6a3010843385",
                "md5": "d8d92e0823169ba8eff2bbedaf5b5d19",
                "sha256": "555a8e383a42893f5cc810a2b16267618f306c57b8f6a4c619fc93db74509e04"
            },
            "downloads": -1,
            "filename": "RESTful_Client2-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d8d92e0823169ba8eff2bbedaf5b5d19",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8891,
            "upload_time": "2023-10-08T18:47:10",
            "upload_time_iso_8601": "2023-10-08T18:47:10.685493Z",
            "url": "https://files.pythonhosted.org/packages/d2/c6/f36847f44811b1423c1cafa1c42ef124e12751db29dd088f6a3010843385/RESTful_Client2-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "83bcafe1b3f725c8ae857550b001ac2e144abba1b52eeb2489f543fe08133d3d",
                "md5": "fc6a25086e5feed33655d931ee3acf24",
                "sha256": "0c618ede2c60fba0607dd88ea6d4e950cc105fd4aedb126a8627cf8ed2b2d6ee"
            },
            "downloads": -1,
            "filename": "RESTful-Client2-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fc6a25086e5feed33655d931ee3acf24",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7652,
            "upload_time": "2023-10-08T18:47:12",
            "upload_time_iso_8601": "2023-10-08T18:47:12.225045Z",
            "url": "https://files.pythonhosted.org/packages/83/bc/afe1b3f725c8ae857550b001ac2e144abba1b52eeb2489f543fe08133d3d/RESTful-Client2-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-08 18:47:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "johnbrandborg",
    "github_project": "restful-client2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "restful-client2"
}
        
Elapsed time: 0.29281s