diff --git a/Makefile b/Makefile index 67dff50..0f41f50 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ install: @python3 setup.py install --user -build: +release: @python3 setup.py sdist + @python3 setup.py sdist bdist_wheel upload: @twine upload dist/* diff --git a/README.md b/README.md index b907a57..d78ce1d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This library handles All Requests done to https://api.intellivoid.net/spamprotec ## Getting Started - Installing the library: - `pip install git+https://github.com/OpenRestfulAPI/intellivoid-spam-protection` + `pip install Intellivoid-SPB` - For those who wants to try out Development Builds: diff --git a/docs.md b/docs.md index 3a0c067..900a28e 100644 --- a/docs.md +++ b/docs.md @@ -5,7 +5,7 @@ This library handles All Requests done to https://api.intellivoid.net/spamprotec ## ✨ Getting Started - Installing the library: - `pip install git+https://github.com/OpenRestfulAPI/intellivoid-spam-protection` + `pip install Intellivoid-SPB` - For those who wants to try out Development Builds: diff --git a/examples/raw_example.py b/examples/raw_example.py index 23c3cbb..4e708bc 100644 --- a/examples/raw_example.py +++ b/examples/raw_example.py @@ -1,5 +1,4 @@ from spamprotection.sync import SPBClient -from spamprotection.types import Blacklist # initializing the client client = SPBClient() diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..81f935f --- /dev/null +++ b/manage.py @@ -0,0 +1,33 @@ +from spamprotection import SPBClient as AsyncClient +from spamprotection.sync import SPBClient as SyncClient +from spamprotection.types import Blacklist +import asyncio +import logging +logging.basicConfig(level=logging.INFO) + + +async def async_types_check(): + return AsyncClient() + + +async def async_raw_check(): + return AsyncClient() + + +def sync_types_check(): + return SyncClient() + + +def sync_raw_check(): + return SyncClient() + + +def types_check(): + return Blacklist + + +if __name__ == "__main__": + asyncio.run(async_types_check()) + asyncio.run(async_raw_check()) + sync_types_check() + sync_raw_check() \ No newline at end of file diff --git a/spamprotection/__init__.py b/spamprotection/__init__.py index 09f04c5..bbf3f9c 100644 --- a/spamprotection/__init__.py +++ b/spamprotection/__init__.py @@ -1,4 +1,4 @@ """Initial Directory.""" from .client import SPBClient # noqa: F401 -__version__ = "0.0.4" +__version__ = "0.1.0" diff --git a/spamprotection/client.py b/spamprotection/client.py index 7aec4e7..c30b44a 100644 --- a/spamprotection/client.py +++ b/spamprotection/client.py @@ -12,13 +12,19 @@ class SPBClient: *, host: str = "https://api.intellivoid.net/spamprotection/v1/lookup" ) -> None: + """ + [SPBClient] + + Args: + host (str): [current spam protection lookup endpoint]. + """ self._host = host - async def do_request( self, user_id: str, ): - """[Requests to the url] + """ + [Requests to the url] Args: user_id (str): [username or user_id can be passed into the arg] @@ -37,7 +43,8 @@ class SPBClient: self, user_id: Union[int, str] ): - """[raw json output] + """ + [raw json output] Args: user_id (Union[int, str]): [can pass user_id or username] @@ -55,7 +62,8 @@ class SPBClient: self, user_id: Union[int, str] ) -> Union[Blacklist, bool]: - """[checks spb for blacklist] + """ + [checks spb for blacklist] Args: user_id (Union[int, str]): [can pass user_id or username] diff --git a/spamprotection/sync.py b/spamprotection/sync.py index 3210dd2..bf6866d 100644 --- a/spamprotection/sync.py +++ b/spamprotection/sync.py @@ -13,6 +13,12 @@ class SPBClient: *, host: str = "https://api.intellivoid.net/spamprotection/v1/lookup" ) -> None: + """ + [SPBClient] + + Args: + host (str): [current spam protection lookup endpoint]. + """ self._host = host def do_request(