Skip to content

Commit 3d44076

Browse files
committed
chore: clean out old generated stackcoin-python, set up new SDK structure
1 parent 6751388 commit 3d44076

59 files changed

Lines changed: 34 additions & 6147 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

justfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
generate:
2-
rm -rf stackcoin
3-
uvx openapi-python-client generate --url http://localhost:4000/api/openapi --config openapi-python-client-config.yml
4-
uvx ruff format
2+
datamodel-codegen \
3+
--input ../../openapi.json \
4+
--input-file-type openapi \
5+
--output-model-type pydantic_v2.BaseModel \
6+
--output stackcoin/stackcoin/models.py \
7+
--target-python-version 3.13
8+
uvx ruff format stackcoin/
59

610
dev:
711
uv pip install -e "stackcoin @ ./stackcoin"
8-

openapi-python-client-config.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

stackcoin/README.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

stackcoin/pyproject.toml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
[tool.poetry]
1+
[project]
22
name = "stackcoin"
3-
version = "0.1"
4-
description = "A client library for accessing StackCoin API"
5-
authors = []
6-
readme = "README.md"
7-
packages = [
8-
{ include = "stackcoin_python" },
3+
version = "0.1.0"
4+
description = "Python SDK for the StackCoin API"
5+
requires-python = ">=3.13"
6+
dependencies = [
7+
"httpx>=0.27",
8+
"pydantic>=2.0",
9+
"websockets>=13.0",
910
]
10-
include = ["CHANGELOG.md", "stackcoin_python/py.typed"]
11-
12-
[tool.poetry.dependencies]
13-
python = "^3.9"
14-
httpx = ">=0.23.0,<0.29.0"
15-
attrs = ">=22.2.0"
16-
python-dateutil = "^2.8.0"
1711

1812
[build-system]
19-
requires = ["poetry-core>=2.0.0,<3.0.0"]
20-
build-backend = "poetry.core.masonry.api"
13+
requires = ["hatchling"]
14+
build-backend = "hatchling.build"
15+
16+
[tool.hatch.build.targets.wheel]
17+
packages = ["stackcoin"]
2118

2219
[tool.ruff]
23-
line-length = 120
20+
line-length = 100
2421

2522
[tool.ruff.lint]
2623
select = ["F", "I", "UP"]

stackcoin/stackcoin/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""StackCoin Python SDK."""
2+
3+
from .errors import StackCoinError
4+
5+
__all__ = ["StackCoinError"]

stackcoin/stackcoin/errors.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class StackCoinError(Exception):
2+
"""Raised when the StackCoin API returns an error response."""
3+
4+
def __init__(self, status_code: int, error: str, message: str | None = None):
5+
self.status_code = status_code
6+
self.error = error
7+
self.message = message
8+
super().__init__(f"{status_code} {error}: {message}")

stackcoin/stackcoin_python/__init__.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

stackcoin/stackcoin_python/api/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

stackcoin/stackcoin_python/api/default/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

stackcoin/stackcoin_python/api/default/stackcoin_accept_request.py

Lines changed: 0 additions & 171 deletions
This file was deleted.

0 commit comments

Comments
 (0)