Skip to content

Commit 09a3f19

Browse files
authored
Merge pull request #31 from codex-team/feat/decrease-python-vesrion
2 parents ba5f581 + 10ea59c commit 09a3f19

File tree

4 files changed

+29
-11
lines changed

4 files changed

+29
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Parameters:
106106

107107
## Requirements
108108

109-
- Python \>= 3.12
109+
- Python \>= 3.10
110110
- requests
111111

112112
## Links

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ build-backend = "hatchling.build"
44
[project]
55
dynamic = ["version"]
66
dependencies = ["requests"]
7-
name = "hawkcatcher"
7+
name = "hawk_python_sdk"
88
authors = [{ name = "CodeX Team", email = "[email protected]" }]
99
description = "Python errors Catcher module for Hawk."
1010
readme = "README.md"
11-
requires-python = ">=3.9"
11+
requires-python = ">=3.10"
1212
classifiers = [
1313
"Intended Audience :: Developers",
1414
"Topic :: Software Development :: Bug Tracking",
1515
"License :: OSI Approved :: MIT License",
16-
"Programming Language :: Python :: 3.5",
16+
"Programming Language :: Python :: 3.10",
1717
"Environment :: Console",
1818
"Environment :: Web Environment",
1919
]
2020
[project.optional-dependencies]
2121
flask = ["flask"]
22-
fastapi = ["starlette"]
22+
fastapi = ["fastapi"]
2323
[tool.hatch.version]
2424
path = "src/hawkcatcher/__init__.py"
2525
[project.urls]

src/hawkcatcher/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.5.0"
1+
__version__ = "3.5.1"
22

33
from .core import Hawk
44
from .types import HawkCatcherSettings

src/hawkcatcher/types.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,34 @@ class User(TypedDict):
1212
image: str # User's public picture
1313
url: str # URL for user's details page
1414

15-
class HawkCatcherSettings(TypedDict, Generic[T]):
16-
"""Settings for Hawk catcher for errors tracking"""
17-
15+
class HawkCatcherSettings(Generic[T]):
16+
"""Base settings for Hawk catcher for errors tracking"""
1817
token: str # Hawk integration token
1918
collector_endpoint: str # Collector endpoint for sending event to
2019
release: str # Release name for Suspected Commits feature
2120
before_send: Callable[[dict], None] # This hook allows you to filter any data you don't want sending to Hawk
2221
context: dict # Additional context to be send with event
23-
with_addons: bool = True # This parameter points if you want to send framework data with error (cookies, headers, params, form, json)
24-
set_user: Callable[[T], User] # This hook allows you to set user information, this hook is useful for frameworks
22+
with_addons: bool # This parameter points if you want to send framework data with error (cookies, headers, params, form, json)
23+
24+
def __init__(
25+
self,
26+
*,
27+
token: str,
28+
collector_endpoint: str,
29+
release: str,
30+
before_send: Callable[[dict], None],
31+
context: dict,
32+
with_addons: bool,
33+
set_user: Callable[[T], User]
34+
):
35+
self.token = token
36+
self.collector_endpoint = collector_endpoint
37+
self.release = release
38+
self.before_send = before_send
39+
self.context = context
40+
self.with_addons = with_addons
41+
self.set_user = set_user
42+
2543

2644
class Addons(TypedDict):
2745
"""Additional data to be send with event due to frameworks"""

0 commit comments

Comments
 (0)