deltadefi 0.0.11__tar.gz → 0.1.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.

Potentially problematic release.


This version of deltadefi might be problematic. Click here for more details.

Files changed (39) hide show
  1. deltadefi-0.1.0/.env.example +3 -0
  2. deltadefi-0.1.0/.github/workflows/publish.yml +37 -0
  3. deltadefi-0.1.0/.gitignore +62 -0
  4. deltadefi-0.1.0/Makefile +85 -0
  5. {deltadefi-0.0.11 → deltadefi-0.1.0}/PKG-INFO +19 -19
  6. deltadefi-0.1.0/coverage.xml +762 -0
  7. deltadefi-0.1.0/examples/websocket_example.py +311 -0
  8. deltadefi-0.1.0/pyproject.toml +124 -0
  9. deltadefi-0.1.0/src/deltadefi/__init__.py +2 -0
  10. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/api.py +3 -3
  11. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/api_resources/auth.py +3 -4
  12. deltadefi-0.1.0/src/deltadefi/clients/__init__.py +3 -0
  13. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/clients/accounts.py +22 -7
  14. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/clients/client.py +14 -6
  15. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/clients/markets.py +2 -25
  16. deltadefi-0.1.0/src/deltadefi/clients/websocket.py +355 -0
  17. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/error.py +2 -2
  18. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/models/models.py +3 -3
  19. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/responses/accounts.py +18 -6
  20. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/responses/responses.py +4 -4
  21. deltadefi-0.1.0/tests/clients/__init__.py +0 -0
  22. deltadefi-0.1.0/tests/clients/test_accounts.py +44 -0
  23. deltadefi-0.1.0/tests/clients/test_order.py +37 -0
  24. deltadefi-0.1.0/tests/clients/test_sign.py +26 -0
  25. deltadefi-0.1.0/uv.lock +1696 -0
  26. deltadefi-0.0.11/pyproject.toml +0 -47
  27. deltadefi-0.0.11/src/deltadefi/__init__.py +0 -2
  28. deltadefi-0.0.11/src/deltadefi/clients/__init__.py +0 -2
  29. deltadefi-0.0.11/src/deltadefi/clients/app.py +0 -23
  30. deltadefi-0.0.11/src/deltadefi/lib/utils.py +0 -46
  31. {deltadefi-0.0.11 → deltadefi-0.1.0}/README.md +0 -0
  32. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/api_resources/__init__.py +0 -0
  33. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/api_resources/validation.py +0 -0
  34. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/clients/orders.py +0 -0
  35. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/constants/__init__.py +0 -0
  36. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/constants/constants.py +0 -0
  37. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/models/__init__.py +0 -0
  38. {deltadefi-0.0.11 → deltadefi-0.1.0}/src/deltadefi/responses/__init__.py +0 -0
  39. {deltadefi-0.0.11/src/deltadefi/lib → deltadefi-0.1.0/tests}/__init__.py +0 -0
@@ -0,0 +1,3 @@
1
+ TRADING_PASSWORD="xxxxxxxx"
2
+ DELTADEFI_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
3
+ BASE_URL="http://localhost:8080"
@@ -0,0 +1,37 @@
1
+ name: Release Distributables
2
+
3
+ on:
4
+ release:
5
+ types:
6
+ - published
7
+
8
+ jobs:
9
+ build-n-upload:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Set up Python 3.11
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: "3.11"
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v3
21
+ with:
22
+ enable-cache: true
23
+
24
+ - name: Install dependencies
25
+ run: uv sync --dev
26
+
27
+ - name: Lint with ruff
28
+ run: uv run ruff check src
29
+
30
+ - name: Run unit tests
31
+ run: uv run pytest --cov=deltadefi --cov-report=xml
32
+
33
+ - name: Build distributables
34
+ run: uv build
35
+
36
+ - name: Build and publish to PyPI
37
+ run: uv publish --username __token__ --password ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,62 @@
1
+ # Virtual environment
2
+ .venv/
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.pyc
7
+ *.pyo
8
+ *.pyd
9
+ .Python
10
+ build/
11
+ develop-eggs/
12
+ dist/
13
+ downloads/
14
+ eggs/
15
+ .eggs/
16
+ lib/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ *.egg-info/
23
+ .installed.cfg
24
+ *.egg
25
+
26
+ # Testing
27
+ .pytest_cache/
28
+ .coverage
29
+ htmlcov/
30
+ .tox/
31
+ .nox/
32
+ cov_html/
33
+
34
+ # Type checking
35
+ .mypy_cache/
36
+ .dmypy.json
37
+ dmypy.json
38
+
39
+ # Linting
40
+ .ruff_cache/
41
+
42
+ # Environment variables
43
+ .env
44
+ .env.local
45
+ .env.development.local
46
+ .env.test.local
47
+ .env.production.local
48
+
49
+ # Documentation
50
+ docs/build/
51
+ docs/_build/
52
+
53
+ # IDEs
54
+ .vscode/
55
+ .idea/
56
+ *.swp
57
+ *.swo
58
+ *~
59
+
60
+ # OS
61
+ .DS_Store
62
+ Thumbs.db
@@ -0,0 +1,85 @@
1
+
2
+ # Makefile for deltadefi-python-sdk (uv-managed Python project)
3
+ # Usage examples:
4
+ # make install # create venv and install project + dev deps
5
+ # make test # run pytest
6
+ # make fmt lint # format + lint with Ruff
7
+ # make build # build the package
8
+ # make help # list targets
9
+
10
+ SHELL := /bin/bash
11
+ .DEFAULT_GOAL := help
12
+
13
+ UV := uv
14
+ PY := python
15
+
16
+ .PHONY: help venv install fmt lint type test cov build clean docs deps
17
+
18
+ help: ## Show this help with grouped commands
19
+ @echo "Available commands:"
20
+ @echo ""
21
+ @echo "📦 Installation & Setup:"
22
+ @grep -E '^[a-zA-Z_\-]+:.*##.*install' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
23
+ @echo ""
24
+ @echo "🔧 Testing & Quality:"
25
+ @grep -E '^[a-zA-Z_\-]+:.*##.*\[(test|lint|format|type|quality|check)\]' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
26
+ @echo ""
27
+ @echo "🏗️ Building & Distribution:"
28
+ @grep -E '^[a-zA-Z_\-]+:.*##.*\[(build|dist)\]' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
29
+ @echo ""
30
+ @echo "📚 Other Utilities:"
31
+ @grep -E '^[a-zA-Z_\-]+:.*##[^[]*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
32
+
33
+ # 📦 Installation & Setup
34
+ venv: ## Create virtual environment [install]
35
+ @$(UV) venv
36
+
37
+ install: ## Install project in editable mode with dependencies [install]
38
+ @$(UV) pip install -e . --group dev --group docs
39
+
40
+ deps: install ## Install dependencies (alias for install) [install]
41
+
42
+ # 🔧 Testing & Quality
43
+ fmt: ## Format code with Ruff formatter [format]
44
+ @$(UV) run ruff format .
45
+
46
+ lint: ## Lint with Ruff (auto-fix + fail on remaining issues) [lint]
47
+ @$(UV) run ruff check --fix --exit-non-zero-on-fix .
48
+
49
+ type: ## Static type-check with mypy [type]
50
+ @$(UV) run mypy --config-file=pyproject.toml src/ || true
51
+
52
+ test: install ## Run tests with pytest [test]
53
+ @$(UV) run pytest -vv
54
+
55
+ cov: install ## Check code coverage [test]
56
+ @$(UV) run pytest -n 4 --cov deltadefi
57
+
58
+ cov-html: cov ## Check code coverage and generate HTML report [test]
59
+ @$(UV) run coverage html -d cov_html
60
+ @echo "Coverage report generated in cov_html/"
61
+
62
+ # 🏗️ Building & Distribution
63
+ build: install ## Build the package [build]
64
+ @$(UV) build
65
+
66
+ # 📚 Other Utilities
67
+ docs: install ## Build the documentation
68
+ @mkdir -p docs/requirements
69
+ @$(UV) export --group docs > docs/requirements.txt
70
+ @rm -r -f docs/build
71
+ @$(UV) run sphinx-build docs/source docs/build/html
72
+ @echo "Documentation built in docs/build/html/"
73
+
74
+ clean-test: ## Remove test and coverage artifacts
75
+ @rm -f .coverage
76
+ @rm -fr cov_html/
77
+ @rm -fr .pytest_cache
78
+
79
+ clean: clean-test ## Remove caches, build artifacts, and temp files
80
+ @rm -rf .mypy_cache .ruff_cache dist build
81
+ @find . -type d -name __pycache__ -prune -exec rm -rf {} +
82
+
83
+ version: ## Show uv and Python versions
84
+ @$(UV) --version
85
+ @$(UV) run $(PY) -c "import platform; print('Python', platform.python_version())"
@@ -1,29 +1,30 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: deltadefi
3
- Version: 0.0.11
3
+ Version: 0.1.0
4
4
  Summary: Python SDK for DeltaDeFi protocol.
5
- License: Apache-2.0
6
- Keywords: cardano
7
- Author: HinsonSIDAN
8
- Author-email: wongkahinhinson@gmail.com
9
- Requires-Python: >3.11,<4.0.0
5
+ Author-email: HinsonSIDAN <wongkahinhinson@gmail.com>
6
+ License-Expression: Apache-2.0
7
+ Keywords: cardano,defi,sdk,trading
8
+ Classifier: Development Status :: 3 - Alpha
10
9
  Classifier: Intended Audience :: Developers
11
10
  Classifier: License :: OSI Approved :: Apache Software License
12
11
  Classifier: Natural Language :: English
13
12
  Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
- Classifier: Programming Language :: Python :: 3.11
17
- Requires-Dist: certifi (==2024.8.30)
18
- Requires-Dist: charset-normalizer (==3.4.0)
19
- Requires-Dist: dotenv (>=0.9.9,<0.10.0)
20
- Requires-Dist: idna (==3.10)
21
- Requires-Dist: pycardano (>=0.12.3,<0.13.0)
22
- Requires-Dist: requests (>=2.25,<3.0)
23
- Requires-Dist: sidan-gin (==0.1.6)
24
- Requires-Dist: urllib3 (==2.2.3)
25
- Project-URL: Documentation, https://github.com/deltadefi-protocol/python-sdk
26
- Project-URL: Homepage, https://github.com/deltadefi-protocol/python-sdk
16
+ Classifier: Topic :: Office/Business :: Financial :: Investment
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: <4.0.0,>3.11
19
+ Requires-Dist: certifi>=2024.8.30
20
+ Requires-Dist: charset-normalizer>=3.4.0
21
+ Requires-Dist: idna>=3.10
22
+ Requires-Dist: pycardano>=0.12.3
23
+ Requires-Dist: python-dotenv>=0.9.9
24
+ Requires-Dist: requests>=2.25.0
25
+ Requires-Dist: sidan-gin>=0.1.6
26
+ Requires-Dist: urllib3>=2.2.3
27
+ Requires-Dist: websockets>=12.0
27
28
  Description-Content-Type: text/markdown
28
29
 
29
30
  # DeltaDeFi Python SDK
@@ -119,4 +120,3 @@ DELTADEFI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx make test
119
120
  ## License
120
121
 
121
122
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>
122
-