# 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 getter function 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` directory.
## Testing:
Clone with git:
```bash
git clone https://github.com/DroidZed/QuickSpirit-Async && cd QuickSpirit-Async
```
Create a virtual env:
```sh
python3 -m venv .venv && .venv/Scripts/activate
```
Run the tests with pytest (install it first using your package manager of choice):
```sh
# Here I'm using uv to run the tests, but the command should be the same for other package manager:
pytest -vs .
```
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/2b/3f/251dab4cb8002bfd362e56060f855d32b21278b0d739fc9cdbe3c2572f64/quickspirit-2.0.1.tar.gz",
"platform": null,
"description": "# Quick Spirit\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 getter function 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` 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:\n\n```sh\npython3 -m venv .venv && .venv/Scripts/activate\n```\n\nRun the tests with pytest (install it first using your package manager of choice):\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",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Fast, Async Network & File Downloader Client In Python",
"version": "2.0.1",
"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": "18fc1cc16f607071b3fbaf08d6f136e002bf1a44e629611ed5759db0d647d697",
"md5": "aab7a42a783c9bd5d9dc5e1663cce427",
"sha256": "f4401fca615ce754b2f574adec5a34f4eb26bd1dc0fad3fd06a2a850938b8305"
},
"downloads": -1,
"filename": "quickspirit-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "aab7a42a783c9bd5d9dc5e1663cce427",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 17095,
"upload_time": "2025-01-22T16:23:37",
"upload_time_iso_8601": "2025-01-22T16:23:37.977442Z",
"url": "https://files.pythonhosted.org/packages/18/fc/1cc16f607071b3fbaf08d6f136e002bf1a44e629611ed5759db0d647d697/quickspirit-2.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2b3f251dab4cb8002bfd362e56060f855d32b21278b0d739fc9cdbe3c2572f64",
"md5": "be522de9eff71802f667fe6aac0470a2",
"sha256": "ce5e184dbf21a055890a7d236d7a0b151e3550c08a84b97bac3e8029e657b494"
},
"downloads": -1,
"filename": "quickspirit-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "be522de9eff71802f667fe6aac0470a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 15726,
"upload_time": "2025-01-22T16:23:39",
"upload_time_iso_8601": "2025-01-22T16:23:39.931883Z",
"url": "https://files.pythonhosted.org/packages/2b/3f/251dab4cb8002bfd362e56060f855d32b21278b0d739fc9cdbe3c2572f64/quickspirit-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-22 16:23:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "DroidZed",
"github_project": "QuickSpirit-Async",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "quickspirit"
}