pokewrap


Namepokewrap JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/jasongarvin/pokewrap
SummaryA wrapper library for the PokeAPI making it easier to retrieve and use data from the API endpoint.
upload_time2023-09-26 04:13:15
maintainer
docs_urlNone
authorJason Garvin
requires_python>=3.9
license# MIT License Copyright (c) 2023 Jason Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords feed reader tutorial
VCS
bugtrack_url
requirements build certifi charset-normalizer click colorama exceptiongroup idna iniconfig packaging pip-tools pluggy pyproject-hooks pytest requests tomli urllib3 wheel
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pokewrap v1.0.1

A wrapper library for the PokeAPI making it easier to build into other python scripts through a quick import. This library is a personal project to done to learn more about package creation and publishing.

Pokewrap is not regularly updated, and works with current versions of Python.

Please feel free to use it in any of your projects, deconstruct it, and learn from it. If you find any bugs, you can [submit an issue](https://github.com/jasongarvin/pokewrap/issues) and I'll work on resolving it ASAP.

## How it works

Pokewrap relies on objects to handle communicating with the API and parse data into meaningful chunks. This ensures a smooth experience working with the returned json, since the objects that wrap it help provide more meaningful access to the data.

You can use Pokewrap to connect with the API endpoint and request specific pokemon, or use the generic controller to request berries and other resources. The goal of Pokewrap is to abstract away formatting the API call and parse the returned json for you so you don't have to sweat the details.

You can also use it Pokewrap to see which endpoints are available if you're unsure where to start or need to generate a way to pull from several endpoints.

## Getting Started

You can either import the library using pip, pulling from the PyPI database, or by downloading this repository. You can also clone/fork this repository to edit it in your own workspace.

---

To use Pokewrap, first import it into your script or service:

```python
import pokewrap
```

Then you can start making requests using the ApiController class or choose a resource-specific wrapper (currently only available for Pokemon).

Set up the class by specifying as str the type of resource and the specific resource, or as int the Pokemon ID number.

For example, to see the Pokemon "Gengar" and its information, set:

```python
ApiController("pokemon", "gengar")
```

Or, using the ID:

```python
ApiController("pokemon", 94)
```

If you'd prefer to use the wrapper class, Pokemon, you can simply request information for a Pokemon in the following way:

```python
Pokemon("gengar")   # Using the name
```

```python
Pokemon(94)         # Using the ID
```

You can also use ApiResourceList to get a dictionary response of all viable resources within a supertype (or access the global variable RESOURCE_ENDPOINTS).

For example, to see every Pokemon available through the endpoint:

```python
ApiResourceList("pokemon")
```

Or use limit/offset values to improve the specificity of your query, overriding the default limits set by PokeAPI:

```python
ApiResourceList("pokemon", limit=100, offset=2)
```

Note that the default limit is 20 for resource requests. For larger sets of data, please specify the limit in the function call.

For a conprehensive list of all available resource types, check the static RESOURCE_TYPE variable or the dynamically-generated RESOURCE_ENDPOINTS variable.

## Requesting changes

If you run into an issue or find a bug, please [submit an issue](https://github.com/jasongarvin/pokewrap/issues) and I'll get the fix rolled out as soon as I can.

Since this is intended as a learning project, I don't have immediate plans to continue updating Pokewrap. That said, anyone is more than welcome to submit pull requests and I will approve/add code as applicable. I'm also constantly keeping an eye on the library to at least ensure it continues working.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jasongarvin/pokewrap",
    "name": "pokewrap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "feed,reader,tutorial",
    "author": "Jason Garvin",
    "author_email": "Jason Garvin <jsongarvin@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/33/41/a3d67959282ed38b3d347b408ab42e2c576c47a18adeb8afde548ba8a372/pokewrap-1.0.1.tar.gz",
    "platform": null,
    "description": "# Pokewrap v1.0.1\r\n\r\nA wrapper library for the PokeAPI making it easier to build into other python scripts through a quick import. This library is a personal project to done to learn more about package creation and publishing.\r\n\r\nPokewrap is not regularly updated, and works with current versions of Python.\r\n\r\nPlease feel free to use it in any of your projects, deconstruct it, and learn from it. If you find any bugs, you can [submit an issue](https://github.com/jasongarvin/pokewrap/issues) and I'll work on resolving it ASAP.\r\n\r\n## How it works\r\n\r\nPokewrap relies on objects to handle communicating with the API and parse data into meaningful chunks. This ensures a smooth experience working with the returned json, since the objects that wrap it help provide more meaningful access to the data.\r\n\r\nYou can use Pokewrap to connect with the API endpoint and request specific pokemon, or use the generic controller to request berries and other resources. The goal of Pokewrap is to abstract away formatting the API call and parse the returned json for you so you don't have to sweat the details.\r\n\r\nYou can also use it Pokewrap to see which endpoints are available if you're unsure where to start or need to generate a way to pull from several endpoints.\r\n\r\n## Getting Started\r\n\r\nYou can either import the library using pip, pulling from the PyPI database, or by downloading this repository. You can also clone/fork this repository to edit it in your own workspace.\r\n\r\n---\r\n\r\nTo use Pokewrap, first import it into your script or service:\r\n\r\n```python\r\nimport pokewrap\r\n```\r\n\r\nThen you can start making requests using the ApiController class or choose a resource-specific wrapper (currently only available for Pokemon).\r\n\r\nSet up the class by specifying as str the type of resource and the specific resource, or as int the Pokemon ID number.\r\n\r\nFor example, to see the Pokemon \"Gengar\" and its information, set:\r\n\r\n```python\r\nApiController(\"pokemon\", \"gengar\")\r\n```\r\n\r\nOr, using the ID:\r\n\r\n```python\r\nApiController(\"pokemon\", 94)\r\n```\r\n\r\nIf you'd prefer to use the wrapper class, Pokemon, you can simply request information for a Pokemon in the following way:\r\n\r\n```python\r\nPokemon(\"gengar\")   # Using the name\r\n```\r\n\r\n```python\r\nPokemon(94)         # Using the ID\r\n```\r\n\r\nYou can also use ApiResourceList to get a dictionary response of all viable resources within a supertype (or access the global variable RESOURCE_ENDPOINTS).\r\n\r\nFor example, to see every Pokemon available through the endpoint:\r\n\r\n```python\r\nApiResourceList(\"pokemon\")\r\n```\r\n\r\nOr use limit/offset values to improve the specificity of your query, overriding the default limits set by PokeAPI:\r\n\r\n```python\r\nApiResourceList(\"pokemon\", limit=100, offset=2)\r\n```\r\n\r\nNote that the default limit is 20 for resource requests. For larger sets of data, please specify the limit in the function call.\r\n\r\nFor a conprehensive list of all available resource types, check the static RESOURCE_TYPE variable or the dynamically-generated RESOURCE_ENDPOINTS variable.\r\n\r\n## Requesting changes\r\n\r\nIf you run into an issue or find a bug, please [submit an issue](https://github.com/jasongarvin/pokewrap/issues) and I'll get the fix rolled out as soon as I can.\r\n\r\nSince this is intended as a learning project, I don't have immediate plans to continue updating Pokewrap. That said, anyone is more than welcome to submit pull requests and I will approve/add code as applicable. I'm also constantly keeping an eye on the library to at least ensure it continues working.\r\n",
    "bugtrack_url": null,
    "license": "# MIT License  Copyright (c) 2023 Jason  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A wrapper library for the PokeAPI making it easier to retrieve and use data from the API endpoint.",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/jasongarvin/pokewrap"
    },
    "split_keywords": [
        "feed",
        "reader",
        "tutorial"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a06ea7843e901bd7b65b17e700b30d07cf5cb0cbaa05254042912bb2bc5dd9a",
                "md5": "103d0283419eea8d103a789198284643",
                "sha256": "5afeb54931955bd450bfa95b2632cfeb8bd967304bd4d75aa8ee5607eaa4df25"
            },
            "downloads": -1,
            "filename": "pokewrap-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "103d0283419eea8d103a789198284643",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9774,
            "upload_time": "2023-09-26T04:13:12",
            "upload_time_iso_8601": "2023-09-26T04:13:12.732500Z",
            "url": "https://files.pythonhosted.org/packages/8a/06/ea7843e901bd7b65b17e700b30d07cf5cb0cbaa05254042912bb2bc5dd9a/pokewrap-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3341a3d67959282ed38b3d347b408ab42e2c576c47a18adeb8afde548ba8a372",
                "md5": "c1643156dee94a53ae4bbedeee4ba7ae",
                "sha256": "6e18df571d16898f19af0734736fee0ca6da62b2ac6abf9974d373fb874e748e"
            },
            "downloads": -1,
            "filename": "pokewrap-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c1643156dee94a53ae4bbedeee4ba7ae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 12213,
            "upload_time": "2023-09-26T04:13:15",
            "upload_time_iso_8601": "2023-09-26T04:13:15.444243Z",
            "url": "https://files.pythonhosted.org/packages/33/41/a3d67959282ed38b3d347b408ab42e2c576c47a18adeb8afde548ba8a372/pokewrap-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-26 04:13:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jasongarvin",
    "github_project": "pokewrap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.0.3"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2022.9.24"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "exceptiongroup",
            "specs": [
                [
                    "==",
                    "1.1.3"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.4"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "23.1"
                ]
            ]
        },
        {
            "name": "pip-tools",
            "specs": [
                [
                    "==",
                    "7.3.0"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "pyproject-hooks",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.4.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.12"
                ]
            ]
        },
        {
            "name": "wheel",
            "specs": [
                [
                    "==",
                    "0.41.2"
                ]
            ]
        }
    ],
    "lcname": "pokewrap"
}
        
Elapsed time: 0.34374s