quickspirit


Namequickspirit JSON
Version 2.0.2 PyPI version JSON
download
home_pagehttps://github.com/DroidZed/QuickSpirit-Async
SummaryFast, Async Network & File Downloader Client In Python
upload_time2025-01-28 11:41:58
maintainerNone
docs_urlNone
authorDroidZed
requires_python>=3.9
licenseGPL-3.0-or-later
keywords api speed fast library networking
VCS
bugtrack_url
requirements aiofiles anyio build CacheControl certifi cfgv charset-normalizer cleo colorama crashtest distlib dulwich fastjsonschema filelock h11 httpcore httpx identify idna iniconfig installer jaraco.classes jaraco.context jaraco.functools keyring more-itertools msgpack nodeenv packaging pkginfo platformdirs pluggy poetry poetry-core pre-commit pyfakefs pyproject_hooks pytest pytest-aiofiles pytest-asyncio pytest-httpx pywin32-ctypes PyYAML RapidFuzz requests requests-toolbelt ruff shellingham sniffio tomlkit trove-classifiers typing_extensions urllib3 virtualenv
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DroidZed/QuickSpirit-Async",
    "name": "quickspirit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "api, speed, fast, library, networking",
    "author": "DroidZed",
    "author_email": "41507665+DroidZed@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/f1/21/868748d90cf0997db7feab7ccf61d9977f1157e75e1e49b05d7671ba2af7/quickspirit-2.0.2.tar.gz",
    "platform": null,
    "description": "# Quick Spirit \ud83d\udc2c\n\nAn easy to use HTTP client with a fast downloader.\n\nThis library was made with the famous [HTTPX](https://www.python-httpx.org/) library!\n\nI originally intended to make a small module to refactor my networking layer in my apps using httpx, and ended up creating a library !\n\n----\n\n## Install\n\n```sh\n# PIP:\n\npip install quickspirit\n\n# Poetry:\n\npoetry add quickspirit\n\n# UV:\n\nuv add quickspirit\n```\n\n## Usage:\n\nThe 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.\n\nA sample code would look like this:\n\n```py\nfrom quickspirit import HttpAsyncClient\nfrom asyncio import run\nfrom json import joads\nfrom typing import Any\n\nasync def main():\n    result = await HttpAsyncClient().get(\"https://some distant url returning json hopefully\")\n\n    if result.Error:\n        raise result.Error\n\n\n    data: dict[str, Any] = loads(result.Data)\n\n    # do whatever you need now that you have the data...\n\n\nif __name__ == \"__main__\":\n    run(main())\n\n```\n\nA complete example can be found in the [`example`](https://github.com/DroidZed/QuickSpirit-Async/tree/main/example) directory.\n\n## Testing:\n\nClone with git:\n\n```bash\ngit clone https://github.com/DroidZed/QuickSpirit-Async && cd QuickSpirit-Async\n```\n\nCreate a virtual env and install the dependencies in it:\n\n```sh\npython3 -m venv .venv && .venv/Scripts/activate\n\n# 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. \npoetry install --no-root\n\n```\n\nRun the tests with pytest:\n\n```sh\n# Here I'm using uv to run the tests, but the command should be the same for other package manager:\n\npytest -vs .\n```\n\n## Licensing\n\nThe project is under the GPT-3.0 License, see the [`License`](https://github.com/DroidZed/QuickSpirit-Async/blob/main/LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Fast, Async Network & File Downloader Client In Python",
    "version": "2.0.2",
    "project_urls": {
        "Homepage": "https://github.com/DroidZed/QuickSpirit-Async",
        "Repository": "https://github.com/DroidZed/QuickSpirit-Async"
    },
    "split_keywords": [
        "api",
        " speed",
        " fast",
        " library",
        " networking"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "38a8d4772186716d84e63050001be6e9e1ba3054d406c5b7d9716b6acd4e87b8",
                "md5": "2018a04fb0a177656d5d51f16fd17c4d",
                "sha256": "bfb9d090adae09a2598df1e6cea52d5e935cc417526d46f809d83a10d6397901"
            },
            "downloads": -1,
            "filename": "quickspirit-2.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2018a04fb0a177656d5d51f16fd17c4d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 17253,
            "upload_time": "2025-01-28T11:41:56",
            "upload_time_iso_8601": "2025-01-28T11:41:56.012146Z",
            "url": "https://files.pythonhosted.org/packages/38/a8/d4772186716d84e63050001be6e9e1ba3054d406c5b7d9716b6acd4e87b8/quickspirit-2.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f121868748d90cf0997db7feab7ccf61d9977f1157e75e1e49b05d7671ba2af7",
                "md5": "4cfd8da1430047802742a05aba095af7",
                "sha256": "ae0e94e10a3c32a8b13458a8fd6fe10dff372a737c0a7f8d527d8d7cc2fdbf43"
            },
            "downloads": -1,
            "filename": "quickspirit-2.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4cfd8da1430047802742a05aba095af7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 15887,
            "upload_time": "2025-01-28T11:41:58",
            "upload_time_iso_8601": "2025-01-28T11:41:58.864993Z",
            "url": "https://files.pythonhosted.org/packages/f1/21/868748d90cf0997db7feab7ccf61d9977f1157e75e1e49b05d7671ba2af7/quickspirit-2.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-28 11:41:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DroidZed",
    "github_project": "QuickSpirit-Async",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "aiofiles",
            "specs": [
                [
                    "==",
                    "24.1.0"
                ]
            ]
        },
        {
            "name": "anyio",
            "specs": [
                [
                    "==",
                    "4.7.0"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.2.2.post1"
                ]
            ]
        },
        {
            "name": "CacheControl",
            "specs": [
                [
                    "==",
                    "0.14.2"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2024.12.14"
                ]
            ]
        },
        {
            "name": "cfgv",
            "specs": [
                [
                    "==",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.4.1"
                ]
            ]
        },
        {
            "name": "cleo",
            "specs": [
                [
                    "==",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "crashtest",
            "specs": [
                [
                    "==",
                    "0.4.1"
                ]
            ]
        },
        {
            "name": "distlib",
            "specs": [
                [
                    "==",
                    "0.3.9"
                ]
            ]
        },
        {
            "name": "dulwich",
            "specs": [
                [
                    "==",
                    "0.22.7"
                ]
            ]
        },
        {
            "name": "fastjsonschema",
            "specs": [
                [
                    "==",
                    "2.21.1"
                ]
            ]
        },
        {
            "name": "filelock",
            "specs": [
                [
                    "==",
                    "3.16.1"
                ]
            ]
        },
        {
            "name": "h11",
            "specs": [
                [
                    "==",
                    "0.14.0"
                ]
            ]
        },
        {
            "name": "httpcore",
            "specs": [
                [
                    "==",
                    "1.0.7"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.27.2"
                ]
            ]
        },
        {
            "name": "identify",
            "specs": [
                [
                    "==",
                    "2.6.3"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.10"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "installer",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "jaraco.classes",
            "specs": [
                [
                    "==",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "jaraco.context",
            "specs": [
                [
                    "==",
                    "6.0.1"
                ]
            ]
        },
        {
            "name": "jaraco.functools",
            "specs": [
                [
                    "==",
                    "4.1.0"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "25.6.0"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.5.0"
                ]
            ]
        },
        {
            "name": "msgpack",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "nodeenv",
            "specs": [
                [
                    "==",
                    "1.9.1"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "24.2"
                ]
            ]
        },
        {
            "name": "pkginfo",
            "specs": [
                [
                    "==",
                    "1.12.0"
                ]
            ]
        },
        {
            "name": "platformdirs",
            "specs": [
                [
                    "==",
                    "4.3.6"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.5.0"
                ]
            ]
        },
        {
            "name": "poetry",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "poetry-core",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "pre-commit",
            "specs": [
                [
                    "==",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "pyfakefs",
            "specs": [
                [
                    "==",
                    "5.7.3"
                ]
            ]
        },
        {
            "name": "pyproject_hooks",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.3.4"
                ]
            ]
        },
        {
            "name": "pytest-aiofiles",
            "specs": [
                [
                    "==",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    "==",
                    "0.23.8"
                ]
            ]
        },
        {
            "name": "pytest-httpx",
            "specs": [
                [
                    "==",
                    "0.30.0"
                ]
            ]
        },
        {
            "name": "pywin32-ctypes",
            "specs": [
                [
                    "==",
                    "0.2.3"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "RapidFuzz",
            "specs": [
                [
                    "==",
                    "3.11.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "requests-toolbelt",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    "==",
                    "0.5.7"
                ]
            ]
        },
        {
            "name": "shellingham",
            "specs": [
                [
                    "==",
                    "1.5.4"
                ]
            ]
        },
        {
            "name": "sniffio",
            "specs": [
                [
                    "==",
                    "1.3.1"
                ]
            ]
        },
        {
            "name": "tomlkit",
            "specs": [
                [
                    "==",
                    "0.13.2"
                ]
            ]
        },
        {
            "name": "trove-classifiers",
            "specs": [
                [
                    "==",
                    "2025.1.10.15"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    "==",
                    "4.12.2"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.3.0"
                ]
            ]
        },
        {
            "name": "virtualenv",
            "specs": [
                [
                    "==",
                    "20.28.0"
                ]
            ]
        }
    ],
    "lcname": "quickspirit"
}
        
Elapsed time: 0.47698s