bitpin-sdk 0.1.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.
- bitpin_sdk/__init__.py +26 -0
- bitpin_sdk/_async/__init__.py +1 -0
- bitpin_sdk/_async/_compat.py +16 -0
- bitpin_sdk/_async/client.py +922 -0
- bitpin_sdk/_core/__init__.py +1 -0
- bitpin_sdk/_core/auth.py +109 -0
- bitpin_sdk/_core/errors.py +91 -0
- bitpin_sdk/_core/numbers.py +37 -0
- bitpin_sdk/_core/parse.py +435 -0
- bitpin_sdk/_core/ratelimit.py +78 -0
- bitpin_sdk/_core/request.py +75 -0
- bitpin_sdk/_core/symbols.py +35 -0
- bitpin_sdk/_generated/__init__.py +1 -0
- bitpin_sdk/_generated/spec.py +436 -0
- bitpin_sdk/_sync/__init__.py +2 -0
- bitpin_sdk/_sync/_compat.py +21 -0
- bitpin_sdk/_sync/client.py +922 -0
- bitpin_sdk/config.py +170 -0
- bitpin_sdk/errors.py +127 -0
- bitpin_sdk/py.typed +0 -0
- bitpin_sdk/token_store.py +102 -0
- bitpin_sdk/types.py +209 -0
- bitpin_sdk/ws/__init__.py +10 -0
- bitpin_sdk/ws/client.py +167 -0
- bitpin_sdk/ws/parse.py +66 -0
- bitpin_sdk/ws/transport.py +48 -0
- bitpin_sdk-0.1.0.dist-info/METADATA +61 -0
- bitpin_sdk-0.1.0.dist-info/RECORD +30 -0
- bitpin_sdk-0.1.0.dist-info/WHEEL +4 -0
- bitpin_sdk-0.1.0.dist-info/licenses/LICENSE +21 -0
bitpin_sdk/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Official Python SDK for the Bitpin exchange.
|
|
2
|
+
|
|
3
|
+
from bitpin_sdk import Bitpin, AsyncBitpin, Config
|
|
4
|
+
|
|
5
|
+
See https://bitpin-dev.github.io/bitpin-sdk/ for the full documentation.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0" # x-release-please-version
|
|
9
|
+
|
|
10
|
+
from bitpin_sdk import errors
|
|
11
|
+
from bitpin_sdk._async.client import AsyncBitpin
|
|
12
|
+
from bitpin_sdk._sync.client import Bitpin
|
|
13
|
+
from bitpin_sdk.config import Config, RateLimit
|
|
14
|
+
from bitpin_sdk.token_store import FileTokenStore, MemoryTokenStore, TokenStore
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"AsyncBitpin",
|
|
18
|
+
"Bitpin",
|
|
19
|
+
"Config",
|
|
20
|
+
"FileTokenStore",
|
|
21
|
+
"MemoryTokenStore",
|
|
22
|
+
"RateLimit",
|
|
23
|
+
"TokenStore",
|
|
24
|
+
"__version__",
|
|
25
|
+
"errors",
|
|
26
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""The async client. The hand-written source of truth; ``_sync`` is generated from it."""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Async primitives. ``_sync/_compat.py`` is the hand-written sync counterpart."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import asyncio
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
Lock = asyncio.Lock
|
|
9
|
+
default_sleep = asyncio.sleep
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def websocket(client: Any, transport_factory: Any) -> Any:
|
|
13
|
+
"""The WebSocket client behind ``AsyncBitpin.watch_*``."""
|
|
14
|
+
from bitpin_sdk.ws.client import BitpinWS
|
|
15
|
+
|
|
16
|
+
return BitpinWS(client, transport_factory=transport_factory)
|