-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into protocols/smtp_client
- Loading branch information
Showing
45 changed files
with
612 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ def read_file(path): | |
netius.common.ensure_setup() | ||
setuptools.setup( | ||
name = "netius", | ||
version = "1.18.2", | ||
version = "1.19.3", | ||
author = "Hive Solutions Lda.", | ||
author_email = "[email protected]", | ||
description = "Netius System", | ||
|
@@ -105,7 +105,12 @@ def read_file(path): | |
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7" | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12" | ||
], | ||
long_description = read_file("README.rst") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import Any, BinaryIO, Sequence | ||
|
||
class BaseAdapter: | ||
def set(self, value: Any, owner: str = ...): ... | ||
def get(self, key: str) -> bytes | None: ... | ||
def get_file(self, key: str, mode: str = ...) -> BinaryIO: ... | ||
def delete(self, key: str, owner: str = ...): ... | ||
def append(self, key: str, value: Any): ... | ||
def truncate(self, key: str, count: int): ... | ||
def size(self, key: str) -> int: ... | ||
def sizes(self, owner: str | None = ...) -> list[int]: ... | ||
def total(self, owner: str | None = ...) -> int: ... | ||
def reserve(self, owner: str = ...): ... | ||
def count(self, owner: str | None = ...) -> int: ... | ||
def list(self, owner: str | None = ...) -> Sequence[str]: ... | ||
def generate(self) -> str: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from os import PathLike | ||
|
||
from netius import BaseAdapter | ||
|
||
class FsAdapter(BaseAdapter): | ||
base_path: str | ||
|
||
def __init__(self, base_path: str | None = ...): ... | ||
def _path(self, owner: str | None = ...) -> str: ... | ||
def _ensure(self, owner: str) -> str: ... | ||
def _symlink(self, source: PathLike[str], target: PathLike[str]): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from typing import Any, BinaryIO, Callable, Mapping | ||
|
||
from netius import BaseAdapter | ||
|
||
class MemoryAdapter(BaseAdapter): | ||
def __init__(self): ... | ||
def _ensure(self, owner: str) -> Mapping[str, Any]: ... | ||
def _build_close(self, file: BinaryIO, key: str) -> Callable[[], None]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from netius import BaseAdapter | ||
|
||
class MongoAdapter(BaseAdapter): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from netius import BaseAdapter | ||
|
||
class NullAdapter(BaseAdapter): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from typing import Sequence | ||
|
||
from netius import Auth | ||
|
||
class AddressAuth(Auth): | ||
def __init__(self, allowed: Sequence[str] = ..., *args, **kwargs): ... | ||
@classmethod | ||
def auth(cls, allowed: Sequence[str] = ..., *args, **kwargs) -> bool: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from netius import Auth | ||
|
||
class AllowAuth(Auth): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from os import PathLike | ||
from typing import Any, Literal, Mapping, NoReturn | ||
|
||
HashType = Literal["plain", "md5", "sha1", "sha256", "sha512"] | ||
|
||
class Auth: | ||
def __init__(self, *args, **kwargs): ... | ||
@classmethod | ||
def auth(cls, *args, **kwargs) -> bool: ... | ||
@classmethod | ||
def meta(cls, *args, **kwargs) -> Mapping[str, Any]: ... | ||
@classmethod | ||
def auth_assert(cls, *args, **kwargs) -> NoReturn: ... | ||
@classmethod | ||
def verify(cls, encoded: str, decoded: str) -> bool: ... | ||
@classmethod | ||
def generate(cls, password: str, type: HashType = ..., salt: str = ...) -> str: ... | ||
@classmethod | ||
def unpack(cls, password) -> tuple[HashType, str | None, str, str | None]: ... | ||
@classmethod | ||
def get_file( | ||
cls, path: PathLike[str], cache: bool = ..., encoding: str | None = ... | ||
) -> str | bytes: ... | ||
@classmethod | ||
def is_simple(cls) -> bool: ... | ||
def auth_i(self, *args, **kwargs) -> bool: ... | ||
def auth_assert_i(self, *args, **kwargs) -> NoReturn: ... | ||
def is_simple_i(self) -> bool: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from netius import Auth | ||
|
||
class DenyAuth(Auth): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from netius import Auth | ||
|
||
class DummyAuth(Auth): | ||
def __init__(self, value: bool = ..., *args, **kwargs): ... | ||
@classmethod | ||
def auth(cls, value: bool = ..., *args, **kwargs) -> bool: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.