Metadata-Version: 2.1
Name: apininjas.py
Version: 0.2.0
Summary: A Python wrapper for the API-Ninjas APIs.
Author: Puncher1
License: MIT License
        
        Copyright (c) 2024 Puncher1
        
        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.
        
Project-URL: Documentation, https://apininjaspy.readthedocs.io/latest
Project-URL: Repository, https://github.com/puncher1/apininjas.py
Project-URL: Issues, https://github.com/puncher1/apininjas.py/issues
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp<4,>=3.9.5
Provides-Extra: docs
Requires-Dist: sphinx==7.1.2; extra == "docs"
Requires-Dist: furo; extra == "docs"


<h1 align="center">apininjas.py</h1>
<p align="center">An easy-to-use and async-ready Python wrapper for the API-Ninjas APIs.</p>

<p align="center">
    <a href="https://pypi.org/project/apininjas.py/"><img alt="PyPi version" src="https://img.shields.io/pypi/v/apininjas.py?style=flat-square&color=016dad"></a>
    <a href="https://pypi.org/project/apininjas.py/"><img alt="Python version" src="https://img.shields.io/pypi/pyversions/apininjas.py?style=flat-square&color=016dad"></a>
    <a href="https://github.com/Puncher1/apininjas.py/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/puncher1/apininjas.py?style=flat-square"></a>
</p>

## Key Features

* Pythonic and modern API
* Asynchronous using `async` and `await`
* Fully type-hinted
* Easy to use with an object oriented design


## Installing

**Python 3.9 or higher is required**

To install the latest stable version, use
```cmd
pip install -U apininjas.py
```

To install the development version (**may be unstable**), use
```cmd
pip install -U git+https://github.com/puncher1/apininjas.py
```


## Example

```python
import asyncio
from apininjas import Client

async def main():
    client = Client("api_key")

    stock = await client.fetch_stock("AAPL")
    print(f"{stock.name} is trading at ${stock.price}")

    await client.close()

if __name__ == "__main__":
    asyncio.run(main())
```
### Example with Context Manager
Or use the context manager, which automatically cleans up.
```python
import asyncio
from apininjas import Client

async def main():
    async with Client("api_key") as client:
        stock = await client.fetch_stock("AAPL")
        print(f"{stock.name} is trading at ${stock.price}")

if __name__ == "__main__":
    asyncio.run(main())
```


## Links
* [Documentation][1] <br>
* [API-Ninjas][2]


[1]: https://apininjaspy.rtfd.org/latest
[2]: https://api-ninjas.com
