Metadata-Version: 2.3
Name: quickspirit
Version: 2.1.0
Summary: Fast, Async Network & File Downloader Client In Python
Home-page: https://github.com/DroidZed/QuickSpirit-Async
License: GPL-3.0-or-later
Keywords: api,speed,fast,library,networking
Author: DroidZed
Author-email: 41507665+DroidZed@users.noreply.github.com
Requires-Python: >=3.9
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
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: Programming Language :: Python :: 3.13
Requires-Dist: aiofiles (>=24.1.0)
Requires-Dist: httpx (>=0.27.0)
Project-URL: Repository, https://github.com/DroidZed/QuickSpirit-Async
Description-Content-Type: text/markdown

# Quick Spirit 🐬

An easy to use HTTP client with a fast downloader.

This library was made with the famous [HTTPX](https://www.python-httpx.org/) library!

I originally intended to make a small module to refactor my networking layer in my apps using httpx, and ended up creating a library !

----

## Install

```sh
# PIP:

pip install quickspirit

# Poetry:

poetry add quickspirit

# UV:

uv add quickspirit
```

## Usage:

The library's internal mechanism returns a bytes data repersenting the bytes coming in from the network. Since we don't know the shape of the data, I delegated the responsibility to you to figure out how to parse it to your liking.

A sample code would look like this:

```py
from quickspirit import HttpAsyncClient
from asyncio import run
from json import joads
from typing import Any

async def main():
    result = await HttpAsyncClient().get("https://some distant url returning json hopefully")

    if result.Error:
        raise result.Error


    data: dict[str, Any] = loads(result.Data)

    # do whatever you need now that you have the data...


if __name__ == "__main__":
    run(main())

```

A complete example can be found in the [`example`](https://github.com/DroidZed/QuickSpirit-Async/tree/main/example) directory.

## Testing:

Clone with git:

```bash
git clone https://github.com/DroidZed/QuickSpirit-Async && cd QuickSpirit-Async
```

Create a virtual env and install the dependencies in it:

```sh
python3 -m venv .venv && .venv/Scripts/activate

# I built the project using poetry, so you may want to have that inside of your venv ! No need to install it in your global python install. 
poetry install --no-root

```

Run the tests with pytest:

```sh
# Here I'm using uv to run the tests, but the command should be the same for other package manager:

pytest -vs .
```

## Licensing

The project is under the GPT-3.0 License, see the [`License`](https://github.com/DroidZed/QuickSpirit-Async/blob/main/LICENSE) file for details.

