Skip to content

Commit

Permalink
Update dto.py + client.py
Browse files Browse the repository at this point in the history
  • Loading branch information
German7463 committed Aug 6, 2024
1 parent 2ae83f5 commit 655df4b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@


def test_version():
assert __version__ == "2.0.2"
assert __version__ == "2.0.3"
2 changes: 1 addition & 1 deletion vysion/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
3 changes: 1 addition & 2 deletions vysion/dto/dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion vysion/dto/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion vysion/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
limitations under the License.
"""

__version__ = "2.0.2"
__version__ = "2.0.3"

0 comments on commit 655df4b

Please sign in to comment.