Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (96 loc) · 3.16 KB
/
Copy pathpyproject.toml
File metadata and controls
110 lines (96 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
[project]
name = "phala-pay"
version = "0.13.6"
description = "Phala Pay for Python: quotes, deposits, refunds, and webhooks"
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
license-files = ["LICENSE"]
keywords = ["crypto", "payments", "top-up", "webhooks", "erc20"]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Typing :: Typed",
]
# Runtime ranges stay open within the tested major version so integrators can resolve them
# alongside their own dependencies; uv.lock pins the exact versions used by CI and the examples.
dependencies = [
"attrs>=26.1,<27",
"cryptography>=50.0.1,<51",
"http-sf>=1.3,<2",
"httpx>=0.28.1,<0.29",
"pycryptodome>=3.23,<4",
"python-dateutil>=2.9.0.post0,<4",
"typing-extensions>=4.16,<5",
]
[project.optional-dependencies]
# `topup_sdk.treasury.sign_treasury_challenge`: an EOA treasury's EIP-191 proof.
eoa = ["eth-account>=0.14,<0.15"]
[project.urls]
Homepage = "https://github.com/Phala-Network/phala-pay/tree/main/sdk/python"
Repository = "https://github.com/Phala-Network/phala-pay"
Changelog = "https://github.com/Phala-Network/phala-pay/blob/main/CHANGELOG.md"
[project.scripts]
topup-sdk = "topup_sdk.__main__:main"
[dependency-groups]
dev = [
"mypy==2.4.0",
"pytest==9.1.1",
"ruff==0.17.2",
]
codegen = [
"openapi-python-client==0.29.1",
"ruff==0.17.2",
]
product = [
"anyio==4.15.1",
"cachetools==7.2.4",
"granian==2.8.5",
"starlette==1.9.0",
"web3==8.0.0",
]
# The FastAPI example (sdk/examples/fastapi_app.py) and its test.
examples = [
"fastapi==0.162.0",
]
[build-system]
requires = ["hatchling==1.32.4"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/phala_pay", "src/topup_client", "src/topup_sdk"]
[tool.uv]
default-groups = ["dev", "product", "examples"]
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["src", "tests", "../examples", "../../deploy/product", "../../deploy/sandbox/scenarios"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP", "S", "N", "SIM", "RUF", "PL", "PT"]
ignore = [
"PLR0913", # public helpers mirror the API's keyword parameters
"PLR2004", # protocol constants such as HTTP status codes are clearer inline
]
[tool.ruff.lint.per-file-ignores]
"src/topup_client/**" = ["ALL"]
"tests/**" = ["S101", "PLR0915"]
"../examples/**" = ["S101"]
"../../deploy/sandbox/smoke.py" = ["S101"]
"../../deploy/product/**" = ["S101", "PLR0911", "PLR0912", "PLR0915"]
"../../deploy/sandbox/scenarios/**" = ["S101", "S603", "S607", "PLR0915", "PLR0912", "PLR0911", "N818"]
[tool.mypy]
python_version = "3.12"
strict = true
mypy_path = ["src", "../examples", "../../deploy/product", "../../deploy/sandbox/scenarios", "../../deploy/local"]
explicit_package_bases = true
[[tool.mypy.overrides]]
module = ["topup_client.*"]
disallow_untyped_defs = false
warn_return_any = false
[[tool.mypy.overrides]]
module = ["Crypto.*", "http_sf.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests", "../../deploy/product/tests"]
addopts = "-ra"