diff --git a/README.md b/README.md index 358f7df..c4bf502 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Vysion-PY -Welcome to the open source repository for vysion-py, our implementation as a Python library to use the Vysion tool. Vysion is a dark web intelligence tool that provides information collected from web pages from Tor, I2P, cybercrime forums on the clearnet, etc. Vysion API also provides a feed of information on ransomware attacks published by the various ransomware groups currently active. +Welcome to the PyPi webpage for Vysion, our implementation as a Python library to use the Vysion tool. Vysion is a dark web intelligence tool that provides information collected from web pages from Tor, I2P, cybercrime forums on the clearnet, etc. Vysion API also provides a feed of information on ransomware attacks published by the various ransomware groups currently active. You can request a demo for the web app or an API-key to use in this library at [vysion.ai](https://vysion.ai). -Latest version: [2.0.2](https://pypi.org/project/vysion/) +Latest version: [2.0.3](https://pypi.org/project/vysion/) You can visit [the documentation](https://developers.vysion.ai/?python) for more information on the searches and requests performed with the library or directly on the API. diff --git a/pyproject.toml b/pyproject.toml index 528d96e..000acfa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "vysion" -version = "2.0.2" +version = "2.0.3" description = "The official Python client library for Vysion" homepage = "https://vysion.ai" repository = "https://gitlab.com/byronlabs/vysion/vysion-py" diff --git a/tests/test_version.py b/tests/test_version.py index b52a6f9..d0d5b2f 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -4,4 +4,4 @@ def test_version(): - assert __version__ == "2.0.2" + assert __version__ == "2.0.3" diff --git a/vysion/client/client.py b/vysion/client/client.py index a83acd9..fa61fc7 100644 --- a/vysion/client/client.py +++ b/vysion/client/client.py @@ -212,7 +212,7 @@ def get_tag(self, tag: str) -> dto.VysionResponse: @vysion_error_manager def find_email( self, email: str, page: int = 1, lte: datetime = None, gte: datetime = None - ) -> dto.VysionResponse: + ) -> dto.VysionResponse[dto.DocumentHit]: url = self._build_api_url__( "document/email", email, page=page, lte=lte, gte=gte ) diff --git a/vysion/dto/dto.py b/vysion/dto/dto.py index f61a24e..7e10c74 100644 --- a/vysion/dto/dto.py +++ b/vysion/dto/dto.py @@ -399,8 +399,7 @@ class PhoneInfo(BaseModel): class Result(BaseModel, Generic[T]): total: int = 0 - hits: Union[List[DocumentHit],List[Stat],List[ImChannelHit],List[ImMessageHit], - List[ImProfileHit],List[RansomFeedHit],List[RansomwareHit]] = Field(default_factory=lambda: []) + hits: List[T] = Field(default_factory=lambda: []) def __init__(self, **kwargs): super().__init__(**kwargs) diff --git a/vysion/dto/util.py b/vysion/dto/util.py index f937fd7..803d51c 100644 --- a/vysion/dto/util.py +++ b/vysion/dto/util.py @@ -111,7 +111,7 @@ def parse_ransom_feed_hit(self, hit: RansomFeedHit, **kwargs): self.misp_event.add_object(misp_object) - def process(self, result: dto.Result, **kwargs) -> MISPEvent: + def process(self, result: dto.Result[DocumentHit|RansomFeedHit], **kwargs) -> MISPEvent: processor = { DocumentHit: self.parse_hit, diff --git a/vysion/version.py b/vysion/version.py index 5c26c2b..3bb78f3 100644 --- a/vysion/version.py +++ b/vysion/version.py @@ -15,4 +15,4 @@ limitations under the License. """ -__version__ = "2.0.2" +__version__ = "2.0.3"