socialfi-api 0.5.0__tar.gz
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.
- socialfi_api-0.5.0/.gitignore +16 -0
- socialfi_api-0.5.0/LICENSE +21 -0
- socialfi_api-0.5.0/PKG-INFO +63 -0
- socialfi_api-0.5.0/README.md +29 -0
- socialfi_api-0.5.0/pyproject.toml +77 -0
- socialfi_api-0.5.0/socialfi_api/__init__.py +24 -0
- socialfi_api-0.5.0/socialfi_api/py.typed +0 -0
- socialfi_api-0.5.0/tests/__init__.py +0 -0
- socialfi_api-0.5.0/tests/test_exports.py +40 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CabalSpy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: socialfi-api
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: SocialFi API — add a social layer to any app: login with X + verified wallets, live trades and PnL of your users, leaderboards and copy trading on Solana, BNB Chain, Base, Ethereum and Robinhood Chain. By CabalSpy ID.
|
|
5
|
+
Project-URL: Homepage, https://www.cabalspy.xyz/cabalspy-id/
|
|
6
|
+
Project-URL: Documentation, https://docs.cabalspy.xyz/cabalspy-id
|
|
7
|
+
Project-URL: Repository, https://github.com/CabalSpy/socialfi-api
|
|
8
|
+
Project-URL: Issues, https://github.com/CabalSpy/socialfi-api/issues
|
|
9
|
+
Project-URL: SDK, https://pypi.org/project/cabalspy-id/
|
|
10
|
+
Author-email: CabalSpy <contact@cabalspy.xyz>
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: base,bnb,cabalspy,cabalspy-id,copy-trading,crypto-login,crypto-social,ethereum,kol,kol-tracker,oidc,openid-connect,pnl,python,sdk,social-trading,socialfi,socialfi-api,socialfi-sdk,solana,trading-leaderboard,wallet-tracker,web3-social
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
23
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Requires-Dist: cabalspy-id<0.6,>=0.5.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: websockets>=14.0; extra == 'dev'
|
|
31
|
+
Provides-Extra: stream
|
|
32
|
+
Requires-Dist: cabalspy-id[stream]<0.6,>=0.5.0; extra == 'stream'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# socialfi-api — the SocialFi API for any app (Python)
|
|
36
|
+
|
|
37
|
+
[](https://pypi.org/project/socialfi-api/) [](https://github.com/CabalSpy/socialfi-api/actions/workflows/ci.yml) [](LICENSE)
|
|
38
|
+
|
|
39
|
+
**socialfi-api** adds a social layer to any crypto app: login with X, wallets verified by a tiny on-chain payment, reviewed KOL badges, live trades and PnL of your users, leaderboards and copy trading — on Solana, BNB Chain, Base, Ethereum and Robinhood Chain. Sync and async.
|
|
40
|
+
|
|
41
|
+
Part of **[CabalSpy ID](https://id.cabalspy.xyz)** — the SocialFi layer for crypto apps. [Website](https://www.cabalspy.xyz/cabalspy-id/) · [Docs](https://docs.cabalspy.xyz/cabalspy-id) · [API dashboard](https://apidashboard.cabalspy.xyz) · [Full SDK: cabalspy-id](https://github.com/CabalSpy/cabalspy-id-js)
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install socialfi-api # live trade stream: pip install "socialfi-api[stream]"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from socialfi_api import CabalSpyID, CabalSpyIDAuth, verify_webhook
|
|
49
|
+
|
|
50
|
+
auth = CabalSpyIDAuth("csid_...", client_secret=os.environ["CSID_CLIENT_SECRET"], redirect_uri="https://your.app/callback")
|
|
51
|
+
req = auth.create_authorization_url(scope=["openid", "profile", "wallets"])
|
|
52
|
+
|
|
53
|
+
csid = CabalSpyID() # reads CABALSPY_ID_API_KEY / CABALSPY_API_KEY
|
|
54
|
+
board = csid.leaderboard(blockchain="solana", period="7d", sort="pnl_usd")
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Contents: `CabalSpyID` / `AsyncCabalSpyID` (Data API), `CabalSpyIDStream`, `CabalSpyIDAuth` (OIDC), `verify_webhook`, errors and response types — the `cabalspy_id.api` module. Full reference: [cabalspy-id README](https://github.com/CabalSpy/cabalspy-id-python#readme).
|
|
58
|
+
|
|
59
|
+
Versions follow `cabalspy-id`: 0.5.0 depends on `cabalspy-id` 0.5.0. This package contains no code of its own — it re-exports part of `cabalspy-id`, so behaviour, fixes and types are always the same.
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
MIT
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# socialfi-api — the SocialFi API for any app (Python)
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/socialfi-api/) [](https://github.com/CabalSpy/socialfi-api/actions/workflows/ci.yml) [](LICENSE)
|
|
4
|
+
|
|
5
|
+
**socialfi-api** adds a social layer to any crypto app: login with X, wallets verified by a tiny on-chain payment, reviewed KOL badges, live trades and PnL of your users, leaderboards and copy trading — on Solana, BNB Chain, Base, Ethereum and Robinhood Chain. Sync and async.
|
|
6
|
+
|
|
7
|
+
Part of **[CabalSpy ID](https://id.cabalspy.xyz)** — the SocialFi layer for crypto apps. [Website](https://www.cabalspy.xyz/cabalspy-id/) · [Docs](https://docs.cabalspy.xyz/cabalspy-id) · [API dashboard](https://apidashboard.cabalspy.xyz) · [Full SDK: cabalspy-id](https://github.com/CabalSpy/cabalspy-id-js)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install socialfi-api # live trade stream: pip install "socialfi-api[stream]"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from socialfi_api import CabalSpyID, CabalSpyIDAuth, verify_webhook
|
|
15
|
+
|
|
16
|
+
auth = CabalSpyIDAuth("csid_...", client_secret=os.environ["CSID_CLIENT_SECRET"], redirect_uri="https://your.app/callback")
|
|
17
|
+
req = auth.create_authorization_url(scope=["openid", "profile", "wallets"])
|
|
18
|
+
|
|
19
|
+
csid = CabalSpyID() # reads CABALSPY_ID_API_KEY / CABALSPY_API_KEY
|
|
20
|
+
board = csid.leaderboard(blockchain="solana", period="7d", sort="pnl_usd")
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Contents: `CabalSpyID` / `AsyncCabalSpyID` (Data API), `CabalSpyIDStream`, `CabalSpyIDAuth` (OIDC), `verify_webhook`, errors and response types — the `cabalspy_id.api` module. Full reference: [cabalspy-id README](https://github.com/CabalSpy/cabalspy-id-python#readme).
|
|
24
|
+
|
|
25
|
+
Versions follow `cabalspy-id`: 0.5.0 depends on `cabalspy-id` 0.5.0. This package contains no code of its own — it re-exports part of `cabalspy-id`, so behaviour, fixes and types are always the same.
|
|
26
|
+
|
|
27
|
+
## License
|
|
28
|
+
|
|
29
|
+
MIT
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "socialfi-api"
|
|
7
|
+
version = "0.5.0"
|
|
8
|
+
description = "SocialFi API — add a social layer to any app: login with X + verified wallets, live trades and PnL of your users, leaderboards and copy trading on Solana, BNB Chain, Base, Ethereum and Robinhood Chain. By CabalSpy ID."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{ name = "CabalSpy", email = "contact@cabalspy.xyz" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"socialfi-api",
|
|
15
|
+
"socialfi-sdk",
|
|
16
|
+
"socialfi",
|
|
17
|
+
"social-trading",
|
|
18
|
+
"copy-trading",
|
|
19
|
+
"crypto-social",
|
|
20
|
+
"web3-social",
|
|
21
|
+
"kol",
|
|
22
|
+
"kol-tracker",
|
|
23
|
+
"wallet-tracker",
|
|
24
|
+
"trading-leaderboard",
|
|
25
|
+
"pnl",
|
|
26
|
+
"crypto-login",
|
|
27
|
+
"solana",
|
|
28
|
+
"bnb",
|
|
29
|
+
"base",
|
|
30
|
+
"ethereum",
|
|
31
|
+
"cabalspy",
|
|
32
|
+
"cabalspy-id",
|
|
33
|
+
"oidc",
|
|
34
|
+
"openid-connect",
|
|
35
|
+
"sdk",
|
|
36
|
+
"python",
|
|
37
|
+
]
|
|
38
|
+
classifiers = [
|
|
39
|
+
"Development Status :: 4 - Beta",
|
|
40
|
+
"Intended Audience :: Developers",
|
|
41
|
+
"License :: OSI Approved :: MIT License",
|
|
42
|
+
"Programming Language :: Python :: 3",
|
|
43
|
+
"Programming Language :: Python :: 3.10",
|
|
44
|
+
"Programming Language :: Python :: 3.11",
|
|
45
|
+
"Programming Language :: Python :: 3.12",
|
|
46
|
+
"Programming Language :: Python :: 3.13",
|
|
47
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
48
|
+
"Topic :: Office/Business :: Financial",
|
|
49
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
50
|
+
"Typing :: Typed",
|
|
51
|
+
]
|
|
52
|
+
dependencies = ["cabalspy-id>=0.5.0,<0.6"]
|
|
53
|
+
|
|
54
|
+
[project.optional-dependencies]
|
|
55
|
+
stream = ["cabalspy-id[stream]>=0.5.0,<0.6"]
|
|
56
|
+
dev = ["pytest>=8.0", "websockets>=14.0"]
|
|
57
|
+
|
|
58
|
+
[project.urls]
|
|
59
|
+
Homepage = "https://www.cabalspy.xyz/cabalspy-id/"
|
|
60
|
+
Documentation = "https://docs.cabalspy.xyz/cabalspy-id"
|
|
61
|
+
Repository = "https://github.com/CabalSpy/socialfi-api"
|
|
62
|
+
Issues = "https://github.com/CabalSpy/socialfi-api/issues"
|
|
63
|
+
SDK = "https://pypi.org/project/cabalspy-id/"
|
|
64
|
+
|
|
65
|
+
[tool.hatch.build.targets.wheel]
|
|
66
|
+
packages = ["socialfi_api"]
|
|
67
|
+
|
|
68
|
+
[tool.pytest.ini_options]
|
|
69
|
+
testpaths = ["tests"]
|
|
70
|
+
|
|
71
|
+
[tool.ruff]
|
|
72
|
+
line-length = 120
|
|
73
|
+
target-version = "py310"
|
|
74
|
+
extend-exclude = ["*.md"]
|
|
75
|
+
|
|
76
|
+
[tool.ruff.lint]
|
|
77
|
+
select = ["E", "F", "W", "I", "UP"]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""socialfi-api — the SocialFi API by CabalSpy ID.
|
|
2
|
+
|
|
3
|
+
Re-exports ``cabalspy_id.api``: Data API clients, the trade stream, Login with
|
|
4
|
+
CabalSpy ID (OpenID Connect) and webhook verification.
|
|
5
|
+
|
|
6
|
+
from socialfi_api import CabalSpyID, CabalSpyIDAuth, verify_webhook
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
import cabalspy_id.api as _source
|
|
12
|
+
from cabalspy_id.api import * # noqa: F403
|
|
13
|
+
from cabalspy_id.api import __all__ as _source_all
|
|
14
|
+
|
|
15
|
+
__version__ = "0.5.0"
|
|
16
|
+
#: The version of the cabalspy-id package doing the work.
|
|
17
|
+
cabalspy_id_version: str = _source.__version__
|
|
18
|
+
|
|
19
|
+
__all__ = [*(n for n in _source_all if n != "__version__"), "__version__", "cabalspy_id_version"] # noqa: PLE0604
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(name: str) -> Any:
|
|
23
|
+
# Names cabalspy_id.api loads lazily (the stream clients) are forwarded too.
|
|
24
|
+
return getattr(_source, name)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import cabalspy_id.api as source
|
|
4
|
+
|
|
5
|
+
import socialfi_api
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_reexports_the_same_objects() -> None:
|
|
9
|
+
for name in source.__all__:
|
|
10
|
+
if name == "__version__":
|
|
11
|
+
continue
|
|
12
|
+
assert getattr(socialfi_api, name) is getattr(source, name), name
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_entry_points() -> None:
|
|
16
|
+
for name in [
|
|
17
|
+
"CabalSpyID",
|
|
18
|
+
"AsyncCabalSpyID",
|
|
19
|
+
"CabalSpyIDAuth",
|
|
20
|
+
"CabalSpyIDStream",
|
|
21
|
+
"verify_webhook",
|
|
22
|
+
"NotFoundError",
|
|
23
|
+
]:
|
|
24
|
+
assert getattr(socialfi_api, name) is getattr(source, name), name
|
|
25
|
+
assert socialfi_api.__version__ == "0.5.0"
|
|
26
|
+
assert socialfi_api.cabalspy_id_version == source.__version__
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_star_import() -> None:
|
|
30
|
+
ns: dict[str, object] = {}
|
|
31
|
+
exec("from socialfi_api import *", ns)
|
|
32
|
+
for name in [
|
|
33
|
+
"CabalSpyID",
|
|
34
|
+
"AsyncCabalSpyID",
|
|
35
|
+
"CabalSpyIDAuth",
|
|
36
|
+
"CabalSpyIDStream",
|
|
37
|
+
"verify_webhook",
|
|
38
|
+
"NotFoundError",
|
|
39
|
+
]:
|
|
40
|
+
assert ns[name] is getattr(source, name), name
|