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 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
@@ -0,0 +1,4 @@
1
+ """The public domain. A published package cannot import the monorepo identity module, so it keeps this one constant."""
2
+
3
+ PUBLIC_DOMAIN = "kellian.si"
4
+ API_ORIGIN = f"https://api.{PUBLIC_DOMAIN}"
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
@@ -0,0 +1,4 @@
1
+ # AUTO-GENERATED. Do not edit by hand.
2
+ from .client import GeneratedAgentClient
3
+
4
+ __all__ = ["GeneratedAgentClient"]