Skip to content

Commit d45ed1d

Browse files
authored
Merge pull request #1 from perps-studio/claude/recursing-goodall-4c5a39
Port hip4 SDK to Python with sync + async clients
2 parents 1fa4550 + 1622f61 commit d45ed1d

91 files changed

Lines changed: 13906 additions & 1 deletion

Some content is hidden

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

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
7+
# Distribution / packaging
8+
.Python
9+
build/
10+
dist/
11+
*.egg-info/
12+
*.egg
13+
wheels/
14+
.installed.cfg
15+
MANIFEST
16+
17+
# Virtual environments
18+
.env
19+
.venv
20+
env/
21+
venv/
22+
ENV/
23+
24+
# Testing & coverage
25+
.pytest_cache/
26+
.coverage
27+
.coverage.*
28+
htmlcov/
29+
.tox/
30+
.cache
31+
coverage.xml
32+
*.cover
33+
.hypothesis/
34+
35+
# mypy
36+
.mypy_cache/
37+
.dmypy.json
38+
dmypy.json
39+
40+
# Ruff
41+
.ruff_cache/
42+
43+
# IDEs
44+
.idea/
45+
.vscode/
46+
*.swp
47+
*.swo
48+
49+
# OS
50+
.DS_Store
51+
Thumbs.db
52+
53+
# Poetry
54+
poetry.lock.bak
55+
56+
# Jupyter
57+
.ipynb_checkpoints
58+
59+
# Local env files
60+
.env.local
61+
.env.*.local

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-toml
9+
- id: check-added-large-files
10+
- id: check-merge-conflict
11+
- id: debug-statements
12+
13+
- repo: https://github.com/astral-sh/ruff-pre-commit
14+
rev: v0.8.0
15+
hooks:
16+
- id: ruff
17+
args: [--fix]
18+
19+
- repo: https://github.com/psf/black
20+
rev: 24.10.0
21+
hooks:
22+
- id: black
23+
24+
- repo: https://github.com/pycqa/isort
25+
rev: 5.13.2
26+
hooks:
27+
- id: isort
28+
29+
- repo: https://github.com/pre-commit/mirrors-mypy
30+
rev: v1.14.1
31+
hooks:
32+
- id: mypy
33+
additional_dependencies:
34+
- types-requests
35+
- eth-account
36+
args: [--config-file=pyproject.toml]

LICENSE

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Business Source License 1.1
2+
3+
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
4+
"Business Source License" is a trademark of MariaDB Corporation Ab.
5+
6+
---
7+
8+
Parameters
9+
10+
Licensor: Perps S
11+
12+
Licensed Work: @perps/hip4 v1.2.1 (all prior and subsequent versions included)
13+
The Licensed Work is (c) 2026 Perps Studio.
14+
15+
Additional Use Grant: You may make use of the Licensed Work, provided that
16+
you may not use the Licensed Work for a Production Use.
17+
18+
A "Production Use" is any use of the Licensed Work that
19+
makes the Licensed Work available to third parties as
20+
part of a commercial or non-commercial product,
21+
service, or application, including but not limited to:
22+
(a) incorporating the Licensed Work into a product or
23+
service that is offered to third parties;
24+
(b) using the Licensed Work to operate a service
25+
accessible by third parties;
26+
(c) distributing the Licensed Work or derivative works
27+
to third parties.
28+
29+
For purposes of clarity, the following are permitted
30+
under this license without a separate commercial
31+
agreement:
32+
(i) internal evaluation and testing;
33+
(ii) non-production development and prototyping;
34+
(iii) academic and educational use;
35+
(iv) personal, non-commercial projects that are not
36+
offered as a service to third parties.
37+
38+
Any Production Use requires a separate commercial
39+
license from the Licensor. Contact: support@perps.studio
40+
41+
Change Date: April 1, 2028
42+
43+
Change License: MIT License
44+
45+
---
46+
47+
Terms
48+
49+
The Licensor hereby grants you the right to copy, modify, create derivative
50+
works, redistribute, and make non-production use of the Licensed Work. The
51+
Licensor may make an Additional Use Grant, above, permitting limited
52+
production use.
53+
54+
Effective on the Change Date, or the fourth anniversary of the first publicly
55+
available distribution of a specific version of the Licensed Work under this
56+
License, whichever comes first, the Licensor hereby grants you rights under
57+
the terms of the Change License, and the rights granted in the paragraph
58+
above terminate.
59+
60+
If your use of the Licensed Work does not comply with the requirements
61+
currently in effect as described in this License, you must purchase a
62+
commercial license from the Licensor, its affiliated entities, or authorized
63+
resellers, or you must refrain from using the Licensed Work.
64+
65+
All copies of the original and modified Licensed Work, and derivative works
66+
of the Licensed Work, are subject to this License. This License applies
67+
separately for each version of the Licensed Work and the Change Date may vary
68+
for each version of the Licensed Work released by Licensor.
69+
70+
You must conspicuously display this License on each original or modified copy
71+
of the Licensed Work. If you receive the Licensed Work in original or
72+
modified form from a third party, the terms and conditions set forth in this
73+
License apply to your use of that work.
74+
75+
Any use of the Licensed Work in violation of this License will automatically
76+
terminate your rights under this License for the current and all other
77+
versions of the Licensed Work.
78+
79+
This License does not grant you any right in any trademark or logo of
80+
Licensor or its affiliates (provided that you may use a trademark or logo
81+
of Licensor as expressly required by this License).
82+
83+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED
84+
ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND
85+
CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES
86+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT,
87+
AND TITLE.
88+
89+
IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES, WHETHER DIRECT,
90+
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR
91+
IN CONNECTION WITH THIS LICENSE OR THE USE OR INABILITY TO USE THE
92+
LICENSED WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF
93+
SUCH DAMAGES.

Makefile

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.DEFAULT_GOAL := help
2+
3+
PYTHON := python3
4+
POETRY := poetry
5+
6+
.PHONY: help
7+
help:
8+
@echo "Available targets:"
9+
@echo " install Install all dependencies (with async extras + dev)"
10+
@echo " install-prod Install runtime dependencies only"
11+
@echo " test Run pytest"
12+
@echo " test-cov Run pytest with coverage report"
13+
@echo " lint Run ruff + mypy"
14+
@echo " format Run black + isort"
15+
@echo " format-check Check formatting without modifying"
16+
@echo " typecheck Run mypy"
17+
@echo " clean Remove caches and build artifacts"
18+
@echo " build Build distribution packages"
19+
@echo " publish Publish to PyPI (requires credentials)"
20+
21+
.PHONY: install
22+
install:
23+
$(POETRY) install --all-extras --with dev
24+
25+
.PHONY: install-prod
26+
install-prod:
27+
$(POETRY) install --only main
28+
29+
.PHONY: test
30+
test:
31+
$(POETRY) run pytest
32+
33+
.PHONY: test-cov
34+
test-cov:
35+
$(POETRY) run pytest --cov=hip4 --cov-report=term-missing --cov-report=html
36+
37+
.PHONY: lint
38+
lint:
39+
$(POETRY) run ruff check hip4 tests
40+
$(POETRY) run mypy hip4
41+
42+
.PHONY: format
43+
format:
44+
$(POETRY) run isort hip4 tests
45+
$(POETRY) run black hip4 tests
46+
47+
.PHONY: format-check
48+
format-check:
49+
$(POETRY) run isort --check-only hip4 tests
50+
$(POETRY) run black --check hip4 tests
51+
52+
.PHONY: typecheck
53+
typecheck:
54+
$(POETRY) run mypy hip4
55+
56+
.PHONY: clean
57+
clean:
58+
rm -rf build/ dist/ *.egg-info
59+
rm -rf .pytest_cache/ .mypy_cache/ .ruff_cache/ htmlcov/ .coverage
60+
find . -type d -name __pycache__ -exec rm -rf {} +
61+
find . -type f -name "*.pyc" -delete
62+
63+
.PHONY: build
64+
build:
65+
$(POETRY) build
66+
67+
.PHONY: publish
68+
publish: build
69+
$(POETRY) publish

0 commit comments

Comments
 (0)