tessium 0.0.1__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.
- tessium-0.0.1/.github/workflows/publish.yml +39 -0
- tessium-0.0.1/.gitignore +4 -0
- tessium-0.0.1/LICENSE +21 -0
- tessium-0.0.1/PKG-INFO +90 -0
- tessium-0.0.1/README.md +69 -0
- tessium-0.0.1/pyproject.toml +39 -0
- tessium-0.0.1/tessium/__init__.py +57 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.13"
|
|
18
|
+
- run: pip install build twine
|
|
19
|
+
- run: python -m build
|
|
20
|
+
- run: twine check dist/*
|
|
21
|
+
- uses: actions/upload-artifact@v4
|
|
22
|
+
with:
|
|
23
|
+
name: dist
|
|
24
|
+
path: dist/
|
|
25
|
+
|
|
26
|
+
publish:
|
|
27
|
+
needs: build
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment: pypi
|
|
30
|
+
# OIDC instead of a stored token: the workflow proves its own identity to
|
|
31
|
+
# PyPI, so there is no secret to leak or rotate.
|
|
32
|
+
permissions:
|
|
33
|
+
id-token: write
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/download-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: dist
|
|
38
|
+
path: dist/
|
|
39
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
tessium-0.0.1/.gitignore
ADDED
tessium-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tessium
|
|
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.
|
tessium-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: tessium
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Minimal WebSocket client for Tessium, the realtime Solana data API
|
|
5
|
+
Project-URL: Homepage, https://tessium.dev
|
|
6
|
+
Project-URL: Documentation, https://tessium.dev/docs/
|
|
7
|
+
Project-URL: Repository, https://github.com/tessiumdev/tessium-py
|
|
8
|
+
Project-URL: Examples, https://github.com/tessiumdev/tessium-example
|
|
9
|
+
Author-email: Tessium <contact@tessium.dev>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: api,blockchain,realtime,solana,streaming,trading,websocket
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Framework :: AsyncIO
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Requires-Dist: websockets>=12
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# tessium
|
|
23
|
+
|
|
24
|
+
Minimal Python client for [Tessium](https://tessium.dev) — a realtime Solana
|
|
25
|
+
data API. Open one WebSocket, subscribe to the streams you need, and receive
|
|
26
|
+
on-chain activity as structured events instead of raw RPC payloads you have to
|
|
27
|
+
decode yourself.
|
|
28
|
+
|
|
29
|
+
Eight streams over a single connection: `launches`, `migrations`,
|
|
30
|
+
`pool_creations`, `token_trades`, `token_transfers`, `candles`, `wallet_trades`,
|
|
31
|
+
`wallet_transfers`.
|
|
32
|
+
|
|
33
|
+
> **Preview.** `0.0.x` tracks the published protocol and has not been exercised
|
|
34
|
+
> against a production endpoint yet. Pin an exact version.
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install tessium
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Watch new token launches
|
|
43
|
+
|
|
44
|
+
Every new token on pump.fun, printed as it happens:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
import asyncio
|
|
48
|
+
from tessium import events
|
|
49
|
+
|
|
50
|
+
async def main():
|
|
51
|
+
async for frame in events(
|
|
52
|
+
"YOUR_API_KEY",
|
|
53
|
+
"launches",
|
|
54
|
+
{"platforms": ["pumpfun"]},
|
|
55
|
+
):
|
|
56
|
+
launch = frame["data"]
|
|
57
|
+
print(launch["symbol"], launch["mint"])
|
|
58
|
+
|
|
59
|
+
asyncio.run(main())
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Frames arrive whole rather than unwrapped, because `frame["cursor"]` is what you
|
|
63
|
+
persist after processing an event — it is how you
|
|
64
|
+
[replay a short disconnect](https://tessium.dev/docs/protocol/cursor) instead of
|
|
65
|
+
losing the gap.
|
|
66
|
+
|
|
67
|
+
An [API key](https://tessium.dev/dashboard) on the
|
|
68
|
+
[free plan](https://tessium.dev/pricing) needs no payment details.
|
|
69
|
+
|
|
70
|
+
## Also here
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from tessium import ENDPOINT, STREAMS, endpoint, subscribe_frame
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`endpoint()` builds the URL, `subscribe_frame()` builds the subscribe frame —
|
|
77
|
+
useful when you drive the socket yourself.
|
|
78
|
+
|
|
79
|
+
## More
|
|
80
|
+
|
|
81
|
+
- [Documentation](https://tessium.dev/docs/) — protocol frames, cursors and
|
|
82
|
+
replay, per-stream payloads, limits
|
|
83
|
+
- [Runnable examples](https://github.com/tessiumdev/tessium-example) — launch to
|
|
84
|
+
trades, early volume filter, Telegram alerts, in Node and Python
|
|
85
|
+
- [Coverage](https://tessium.dev/coverage) — every launchpad, AMM and router
|
|
86
|
+
Tessium reads
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
MIT
|
tessium-0.0.1/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# tessium
|
|
2
|
+
|
|
3
|
+
Minimal Python client for [Tessium](https://tessium.dev) — a realtime Solana
|
|
4
|
+
data API. Open one WebSocket, subscribe to the streams you need, and receive
|
|
5
|
+
on-chain activity as structured events instead of raw RPC payloads you have to
|
|
6
|
+
decode yourself.
|
|
7
|
+
|
|
8
|
+
Eight streams over a single connection: `launches`, `migrations`,
|
|
9
|
+
`pool_creations`, `token_trades`, `token_transfers`, `candles`, `wallet_trades`,
|
|
10
|
+
`wallet_transfers`.
|
|
11
|
+
|
|
12
|
+
> **Preview.** `0.0.x` tracks the published protocol and has not been exercised
|
|
13
|
+
> against a production endpoint yet. Pin an exact version.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install tessium
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Watch new token launches
|
|
22
|
+
|
|
23
|
+
Every new token on pump.fun, printed as it happens:
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
import asyncio
|
|
27
|
+
from tessium import events
|
|
28
|
+
|
|
29
|
+
async def main():
|
|
30
|
+
async for frame in events(
|
|
31
|
+
"YOUR_API_KEY",
|
|
32
|
+
"launches",
|
|
33
|
+
{"platforms": ["pumpfun"]},
|
|
34
|
+
):
|
|
35
|
+
launch = frame["data"]
|
|
36
|
+
print(launch["symbol"], launch["mint"])
|
|
37
|
+
|
|
38
|
+
asyncio.run(main())
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Frames arrive whole rather than unwrapped, because `frame["cursor"]` is what you
|
|
42
|
+
persist after processing an event — it is how you
|
|
43
|
+
[replay a short disconnect](https://tessium.dev/docs/protocol/cursor) instead of
|
|
44
|
+
losing the gap.
|
|
45
|
+
|
|
46
|
+
An [API key](https://tessium.dev/dashboard) on the
|
|
47
|
+
[free plan](https://tessium.dev/pricing) needs no payment details.
|
|
48
|
+
|
|
49
|
+
## Also here
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from tessium import ENDPOINT, STREAMS, endpoint, subscribe_frame
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`endpoint()` builds the URL, `subscribe_frame()` builds the subscribe frame —
|
|
56
|
+
useful when you drive the socket yourself.
|
|
57
|
+
|
|
58
|
+
## More
|
|
59
|
+
|
|
60
|
+
- [Documentation](https://tessium.dev/docs/) — protocol frames, cursors and
|
|
61
|
+
replay, per-stream payloads, limits
|
|
62
|
+
- [Runnable examples](https://github.com/tessiumdev/tessium-example) — launch to
|
|
63
|
+
trades, early volume filter, Telegram alerts, in Node and Python
|
|
64
|
+
- [Coverage](https://tessium.dev/coverage) — every launchpad, AMM and router
|
|
65
|
+
Tessium reads
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "tessium"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Minimal WebSocket client for Tessium, the realtime Solana data API"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
authors = [{ name = "Tessium", email = "contact@tessium.dev" }]
|
|
10
|
+
keywords = [
|
|
11
|
+
"solana",
|
|
12
|
+
"websocket",
|
|
13
|
+
"realtime",
|
|
14
|
+
"blockchain",
|
|
15
|
+
"trading",
|
|
16
|
+
"streaming",
|
|
17
|
+
"api",
|
|
18
|
+
]
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 3 - Alpha",
|
|
21
|
+
"Intended Audience :: Developers",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
24
|
+
"Framework :: AsyncIO",
|
|
25
|
+
]
|
|
26
|
+
dependencies = ["websockets>=12"]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://tessium.dev"
|
|
30
|
+
Documentation = "https://tessium.dev/docs/"
|
|
31
|
+
Repository = "https://github.com/tessiumdev/tessium-py"
|
|
32
|
+
Examples = "https://github.com/tessiumdev/tessium-example"
|
|
33
|
+
|
|
34
|
+
[build-system]
|
|
35
|
+
requires = ["hatchling"]
|
|
36
|
+
build-backend = "hatchling.build"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.wheel]
|
|
39
|
+
packages = ["tessium"]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
from collections.abc import AsyncIterator, Mapping
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
import websockets
|
|
8
|
+
|
|
9
|
+
__version__ = "0.0.1"
|
|
10
|
+
|
|
11
|
+
ENDPOINT = "wss://api.tessium.dev/stream"
|
|
12
|
+
|
|
13
|
+
STREAMS = (
|
|
14
|
+
"launches",
|
|
15
|
+
"migrations",
|
|
16
|
+
"pool_creations",
|
|
17
|
+
"token_trades",
|
|
18
|
+
"token_transfers",
|
|
19
|
+
"candles",
|
|
20
|
+
"wallet_trades",
|
|
21
|
+
"wallet_transfers",
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def endpoint(api_key: str, base: str = ENDPOINT) -> str:
|
|
26
|
+
return f"{base}?key={api_key}"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def subscribe_frame(
|
|
30
|
+
stream: str,
|
|
31
|
+
params: Mapping[str, Any] | None = None,
|
|
32
|
+
sub_id: int = 1,
|
|
33
|
+
) -> dict[str, Any]:
|
|
34
|
+
frame: dict[str, Any] = {"op": "subscribe", "stream": stream, "id": sub_id}
|
|
35
|
+
if params:
|
|
36
|
+
frame["params"] = dict(params)
|
|
37
|
+
return frame
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
async def events(
|
|
41
|
+
api_key: str,
|
|
42
|
+
stream: str,
|
|
43
|
+
params: Mapping[str, Any] | None = None,
|
|
44
|
+
*,
|
|
45
|
+
base: str = ENDPOINT,
|
|
46
|
+
) -> AsyncIterator[dict[str, Any]]:
|
|
47
|
+
"""Yield `event` frames for one subscription.
|
|
48
|
+
|
|
49
|
+
Frames are yielded whole, not just `data`: `cursor` is what you persist to
|
|
50
|
+
replay a short disconnect, and it lives on the frame.
|
|
51
|
+
"""
|
|
52
|
+
async with websockets.connect(endpoint(api_key, base)) as ws:
|
|
53
|
+
await ws.send(json.dumps(subscribe_frame(stream, params)))
|
|
54
|
+
async for message in ws:
|
|
55
|
+
frame = json.loads(message)
|
|
56
|
+
if frame.get("op") == "event":
|
|
57
|
+
yield frame
|