Skip to content

Commit 8880c13

Browse files
committed
aio.web: Add app
Signed-off-by: Ryan Northey <[email protected]>
1 parent 8a8f4f6 commit 8880c13

File tree

17 files changed

+210
-0
lines changed

17 files changed

+210
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,21 @@ pypi: https://pypi.org/project/aio.run.runner
120120
---
121121

122122

123+
#### [aio.web](aio.web)
124+
125+
version: 0.1.0.dev0
126+
127+
pypi: https://pypi.org/project/aio.web
128+
129+
##### requirements:
130+
131+
- [abstracts](https://pypi.org/project/abstracts) >=0.0.12
132+
- [aiohttp](https://pypi.org/project/aiohttp)
133+
- [pyyaml](https://pypi.org/project/pyyaml)
134+
135+
---
136+
137+
123138
#### [dependatool](dependatool)
124139

125140
version: 0.2.3.dev0

aio.web/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
toolshed_package("aio.web")

aio.web/README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
aio.web
3+
=======
4+
5+
Web utils for asyncio.

aio.web/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.0-dev

aio.web/aio/web/BUILD

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
toolshed_library(
3+
"aio.web",
4+
dependencies=[
5+
"//deps:reqs#abstracts",
6+
"//deps:reqs#aiohttp",
7+
"//deps:reqs#pyyaml",
8+
],
9+
sources=[
10+
"__init__.py",
11+
"abstract/__init__.py",
12+
"abstract/downloader.py",
13+
"downloader.py",
14+
"exceptions.py",
15+
"interface.py",
16+
"typing.py",
17+
],
18+
)

aio.web/aio/web/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
from .abstract import (
3+
ADownloader,
4+
AChecksumDownloader)
5+
from .interface import (
6+
IDownloader,
7+
IChecksumDownloader)
8+
9+
10+
__all__ = (
11+
"ADownloader",
12+
"AChecksumDownloader",
13+
"IDownloader",
14+
"IChecksumDownloader")
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from .downloader import ADownloader, AChecksumDownloader
2+
3+
4+
__all__ = (
5+
"ADownloader",
6+
"AChecksumDownloader",
7+
)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
import abstracts
3+
4+
from aio.web import interface
5+
6+
7+
@abstracts.implementer(interface.IDownloader)
8+
class ADownloader(metaclass=abstracts.Abstraction):
9+
10+
async def download(self):
11+
"""Download content from the interwebs."""
12+
pass
13+
14+
15+
@abstracts.implementer(interface.IChecksumDownloader)
16+
class AChecksumDownloader(ADownloader, metaclass=abstracts.Abstraction):
17+
18+
async def checksum(self):
19+
"""Download content from the interwebs."""
20+
pass

aio.web/aio/web/downloader.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
import abstracts
3+
4+
from aio.web import abstract
5+
6+
7+
@abstracts.implementer(abstract.ADownloader)
8+
class Downloader:
9+
pass
10+
11+
12+
@abstracts.implementer(abstract.AChecksumDownloader)
13+
class ChecksumDownloader:
14+
pass

aio.web/aio/web/exceptions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
class ChecksumError(Exception):
3+
pass
4+
5+
6+
class DownloadError(Exception):
7+
pass

0 commit comments

Comments
 (0)