Skip to content

Commit 1dedc3c

Browse files
committed
wip: configure pypi in workflows
1 parent 23a38ea commit 1dedc3c

File tree

11 files changed

+401
-9
lines changed

11 files changed

+401
-9
lines changed

.github/workflows/python.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: sdk-python
22

3+
env:
4+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
5+
36
on:
47
push:
58
branches:
@@ -30,4 +33,8 @@ jobs:
3033

3134
- name: Run tests
3235
run: uv run pytest test/
36+
working-directory: python/
37+
38+
- name: Initialize PyPI config from token
39+
run: echo $PYPI_TOKEN | uv run twine login --username __token__ --password-stdin
3340
working-directory: python/

python/.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ profile.json
4242

4343
__pycache__/
4444
*.pyc
45-
.pytest_cache/
45+
.pytest_cache/
46+
47+
dist
48+
49+
*.egg-info

python/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
clean:
2+
rm -f *.pyc && rm -rf dist
3+
4+
build:
5+
uv build
6+
7+
test:
8+
uv run pytest test
9+
10+
publish: clean test build
11+
uv run twine upload dist/*

python/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
### Usage
1010

1111
```python
12-
from kadoa-sdk import Kadoa
12+
from kadoa_sdk import Kadoa
1313
kadoa_props = {
1414
"api_key": None,
1515
"team_api_key": os.getenv("KADOA_TEAM_API_KEY")
@@ -18,7 +18,6 @@ kadoa_client = Kadoa(**kadoa_props)
1818
kadoa_client.realtime.listen(process_event)
1919
```
2020

21-
installe
2221
## Examples
2322

2423
### Requirements

python/examples/realtime_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
mypath = os.path.join(os.path.dirname(__file__), "..")
33
sys.path.append(mypath)
44

5-
from modules.core import Kadoa
5+
from kadoa_sdk.core import Kadoa
66

77
def process_event(event):
88
print(f"Received event: {event['id']}, type: {event['type']}")

python/kadoa_sdk/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .core import Kadoa
2+
3+
__all__ = ["Kadoa"]
File renamed without changes.
File renamed without changes.

python/modules/__init__.py

Whitespace-only changes.

python/pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "kadoa-sdk"
3-
version = "0.1.0"
4-
description = "Kadoa python SDK"
3+
version = "0.1.4"
4+
description = "Kadoa official python SDK"
55
readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
@@ -10,12 +10,16 @@ dependencies = [
1010
"websocket-client>=1.8.0",
1111
]
1212

13+
[tool.setuptools]
14+
packages = ["kadoa_sdk"]
15+
1316
[dependency-groups]
1417
dev = [
1518
"pytest>=8.3.4",
19+
"twine>=6.0.1",
1620
]
1721

1822
[tool.pytest.ini_options]
1923
pythonpath = [
2024
"."
21-
]
25+
]

python/uv.lock

Lines changed: 366 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)