quickspirit 1.0.5__tar.gz → 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: quickspirit
3
- Version: 1.0.5
3
+ Version: 2.0.0
4
4
  Summary: Fast, Async Network & File Downloader Client In Python
5
5
  Home-page: https://github.com/DroidZed/QuickSpirit-Async
6
6
  License: GPL-3.0-or-later
@@ -19,9 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
- Provides-Extra: downloader
23
22
  Requires-Dist: aiofiles (>=24.1.0)
24
- Requires-Dist: aiofiles ; extra == "downloader"
25
23
  Requires-Dist: httpx (>=0.27.0)
26
24
  Project-URL: Repository, https://github.com/DroidZed/QuickSpirit-Async
27
25
  Description-Content-Type: text/markdown
@@ -1,8 +1,5 @@
1
1
  [tool.poetry]
2
- packages = [
3
- { include = "quick_spirit_http" },
4
- { include = "quick_spirit_downloader" },
5
- ]
2
+ packages = [{ include = "quickspirit" }]
6
3
  package-mode = true
7
4
  classifiers = [
8
5
  "Intended Audience :: Developers",
@@ -14,7 +11,7 @@ classifiers = [
14
11
  [project]
15
12
  name = "quickspirit"
16
13
  description = "Fast, Async Network & File Downloader Client In Python"
17
- version = "1.0.5"
14
+ version = "2.0.0"
18
15
  dynamic = [ "classifiers" ]
19
16
  license = { text = "GPL-3.0-or-later" }
20
17
  readme = "README.md"
@@ -30,9 +27,6 @@ dependencies = [
30
27
  repository = "https://github.com/DroidZed/QuickSpirit-Async"
31
28
  homepage = "https://github.com/DroidZed/QuickSpirit-Async"
32
29
 
33
- [project.optional-dependencies]
34
- downloader = ["aiofiles"]
35
-
36
30
  [tool.poetry.group.dev.dependencies]
37
31
  pre-commit = "^3.8.0"
38
32
  ruff = "^0.5.5"
@@ -1,8 +1,10 @@
1
+ from .http_async_downloader import HttpAsyncDownloader
1
2
  from .http_errors import RequestError
2
3
  from .http_async_client import HttpAsyncClient
3
4
  from .models import Result
4
5
 
5
6
  __all__ = [
7
+ "HttpAsyncDownloader",
6
8
  "RequestError",
7
9
  "HttpAsyncClient",
8
10
  "Result",
File without changes
@@ -1,5 +0,0 @@
1
- from .http_async_downloader import HttpAsyncDownloader
2
-
3
- __all__ = [
4
- "HttpAsyncDownloader",
5
- ]
@@ -1,16 +0,0 @@
1
- import pytest
2
-
3
- from ..downloader import HttpAsyncDownloader
4
-
5
-
6
- class TestHttpDownloader:
7
- @pytest.mark.asyncio
8
- async def test_should_download_file(self):
9
- client = HttpAsyncDownloader()
10
- await client.get_file_from_url(
11
- "https://api.coinpaprika.com/v1/coins",
12
- "./db.json",
13
- )
14
-
15
- with open("./db.json", "r") as f:
16
- assert f is not None
File without changes
File without changes
@@ -1,65 +0,0 @@
1
- import pytest
2
- from typing import Any
3
- from dataclasses import dataclass
4
- from json import loads
5
-
6
- from ..http import HttpAsyncClient
7
-
8
-
9
- @dataclass
10
- class CharacterData:
11
- id: int
12
- name: str
13
-
14
- def __init__(self, json: dict[str, Any]):
15
- self.id = json["id"]
16
- self.name = json["name"]
17
-
18
-
19
- @dataclass
20
- class AnimeData:
21
- id: int
22
- name: str
23
- altName: str
24
-
25
- def __init__(self, json: dict[str, Any]):
26
- self.id = json["id"]
27
- self.name = json["name"]
28
- self.altName = json["altName"]
29
-
30
-
31
- @dataclass
32
- class QuoteData:
33
- content: str
34
- anime: AnimeData
35
- character: CharacterData
36
-
37
- def __init__(self, json: dict[str, Any]):
38
- self.content = json["content"]
39
- self.anime = AnimeData(json["anime"])
40
- self.character = CharacterData(json["character"])
41
-
42
-
43
- @dataclass
44
- class Quote:
45
- status: str
46
- data: QuoteData
47
-
48
- def __init__(self, json: dict[str, Any]):
49
- self.status = json["status"]
50
- self.data = QuoteData(json["data"])
51
-
52
-
53
- class TestNetworkClient:
54
- @pytest.mark.asyncio
55
- async def test_should_get_a_random_anime_quote(self):
56
- client = HttpAsyncClient()
57
- data = await client.get("https://animechan.io/api/v1/quotes/random")
58
-
59
- assert data.Error is None
60
-
61
- content: Quote = Quote(loads(data.Data))
62
-
63
- assert content.status == "success"
64
-
65
- print(content)
File without changes
File without changes