kellian 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kellian/__init__.py +59 -0
- kellian/_domain.py +4 -0
- kellian/_env.py +10 -0
- kellian/_generated/__init__.py +4 -0
- kellian/_generated/client.py +4024 -0
- kellian/_generated/models/__init__.py +7 -0
- kellian/api/__init__.py +31 -0
- kellian/api/orderbook.py +870 -0
- kellian/api/pm_order.py +540 -0
- kellian/api/trade.py +284 -0
- kellian/client.py +335 -0
- kellian/clob.py +1049 -0
- kellian/exceptions.py +103 -0
- kellian/py.typed +1 -0
- kellian/streaming/__init__.py +21 -0
- kellian/streaming/sse.py +142 -0
- kellian/streaming/ws.py +537 -0
- kellian-1.0.0.dist-info/METADATA +557 -0
- kellian-1.0.0.dist-info/RECORD +22 -0
- kellian-1.0.0.dist-info/WHEEL +5 -0
- kellian-1.0.0.dist-info/licenses/LICENSE +202 -0
- kellian-1.0.0.dist-info/top_level.txt +1 -0
kellian/__init__.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Kellian Python SDK
|
|
3
|
+
|
|
4
|
+
Official Python client for the Kellian prediction market API.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from importlib.metadata import PackageNotFoundError
|
|
8
|
+
from importlib.metadata import version as _pkg_version
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
__version__ = _pkg_version("kellian")
|
|
12
|
+
except PackageNotFoundError: # editable/source install without metadata
|
|
13
|
+
__version__ = "1.0.0+source"
|
|
14
|
+
|
|
15
|
+
from ._generated import GeneratedAgentClient
|
|
16
|
+
from .api.orderbook import (
|
|
17
|
+
BookLevel,
|
|
18
|
+
BookSnapshot,
|
|
19
|
+
OpenOrder,
|
|
20
|
+
OpenOrdersPage,
|
|
21
|
+
OrderbookAPI,
|
|
22
|
+
PlacedOrder,
|
|
23
|
+
SigningPayload,
|
|
24
|
+
eth_account_signer,
|
|
25
|
+
)
|
|
26
|
+
from .api.pm_order import PmOrderCheckError
|
|
27
|
+
from .api.trade import TradeApproval, TradeApprovalsResult
|
|
28
|
+
from .client import ProbClient
|
|
29
|
+
from .exceptions import (
|
|
30
|
+
APIError,
|
|
31
|
+
AuthenticationError,
|
|
32
|
+
NotFoundError,
|
|
33
|
+
ProbError,
|
|
34
|
+
RateLimitError,
|
|
35
|
+
ValidationError,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
__all__ = [
|
|
39
|
+
"__version__",
|
|
40
|
+
"ProbClient",
|
|
41
|
+
"GeneratedAgentClient",
|
|
42
|
+
"TradeApproval",
|
|
43
|
+
"TradeApprovalsResult",
|
|
44
|
+
"OrderbookAPI",
|
|
45
|
+
"BookLevel",
|
|
46
|
+
"BookSnapshot",
|
|
47
|
+
"OpenOrder",
|
|
48
|
+
"OpenOrdersPage",
|
|
49
|
+
"SigningPayload",
|
|
50
|
+
"PlacedOrder",
|
|
51
|
+
"eth_account_signer",
|
|
52
|
+
"PmOrderCheckError",
|
|
53
|
+
"ProbError",
|
|
54
|
+
"AuthenticationError",
|
|
55
|
+
"RateLimitError",
|
|
56
|
+
"NotFoundError",
|
|
57
|
+
"ValidationError",
|
|
58
|
+
"APIError",
|
|
59
|
+
]
|
kellian/_domain.py
ADDED
kellian/_env.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Environment settings. The package was published as ``problee`` before it was renamed, so each
|
|
2
|
+
``KELLIAN_*`` variable falls back to its ``PROBLEE_*`` name."""
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def env(name: str) -> Optional[str]:
|
|
9
|
+
"""``KELLIAN_<name>``, else ``PROBLEE_<name>``. An empty value counts as unset."""
|
|
10
|
+
return os.environ.get(f"KELLIAN_{name}") or os.environ.get(f"PROBLEE_{name}") or None
|