Skip to content

Commit 51720da

Browse files
authored
First version (#1)
* feat: first version * refactor: add missing types, add private fields, fix docs
1 parent 0f2b0e8 commit 51720da

50 files changed

Lines changed: 5065 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.

.github/workflows/lint.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Lint Check
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
lint:
7+
name: Run lint
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Setup Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v4
19+
20+
- name: Sync dev deps
21+
run: uv sync --group dev
22+
23+
- name: Lint check
24+
run: |
25+
uv run ruff format --check
26+
uv run ruff check .

.github/workflows/main.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Main
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
id-token: write
12+
13+
jobs:
14+
lint:
15+
uses: ./.github/workflows/lint.yaml
16+
typecheck:
17+
needs: lint
18+
uses: ./.github/workflows/typecheck.yaml

.github/workflows/publish.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
secrets:
8+
PYPI_API_TOKEN:
9+
required: true
10+
workflow_dispatch:
11+
12+
concurrency: ${{ github.workflow }}-${{ github.ref }}
13+
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
id-token: write
18+
19+
jobs:
20+
release-please:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
release_created: ${{ steps.release.outputs.release_created }}
24+
tag_name: ${{ steps.release.outputs.tag_name }}
25+
steps:
26+
- uses: googleapis/release-please-action@v4
27+
id: release
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
release-type: python
31+
config-file: release-please-config.json
32+
manifest-file: .release-please-manifest.json
33+
34+
publish:
35+
needs: release-please
36+
if: ${{ needs.release-please.outputs.release_created }}
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
with:
42+
ref: ${{ needs.release-please.outputs.tag_name }}
43+
44+
- name: Install uv
45+
uses: astral-sh/setup-uv@v4
46+
47+
- name: Build package
48+
run: uv build
49+
50+
- name: Publish to PyPI
51+
env:
52+
UV_PUBLISH_USERNAME: __token__
53+
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
54+
run: |
55+
uv publish

.github/workflows/typecheck.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Type Check
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
typecheck:
7+
name: Run type checking
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Setup Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v4
19+
20+
- name: Sync dev deps
21+
run: uv sync --group dev
22+
23+
- name: Type check
24+
run: uv run pyright
25+
26+
- name: Type check
27+
run: uv run mypy .
28+

.gitignore

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.nox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
*.py,cover
48+
.hypothesis/
49+
.pytest_cache/
50+
cover/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
db.sqlite3
60+
db.sqlite3-journal
61+
62+
# Flask stuff:
63+
instance/
64+
.webassets-cache
65+
66+
# Scrapy stuff:
67+
.scrapy
68+
69+
# Sphinx documentation
70+
docs/_build/
71+
72+
# PyBuilder
73+
.pybuilder/
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# IPython
80+
profile_default/
81+
ipython_config.py
82+
83+
# pyenv
84+
.python-version
85+
86+
# pipenv
87+
Pipfile.lock
88+
89+
# poetry
90+
poetry.lock
91+
92+
# pdm
93+
.pdm.toml
94+
.pdm-python
95+
.pdm-build/
96+
97+
# PEP 582
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
136+
137+
# Cython debug symbols
138+
cython_debug/
139+
140+
# PyCharm
141+
.idea/
142+
143+
144+
# uv
145+
.uv/

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.0.0"
3+
}

CHANGELOG.md

Whitespace-only changes.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Blind Pay, Inc.
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.

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.PHONY: lint-check lint-fix typecheck
2+
3+
lint-check:
4+
uv run ruff format --check
5+
uv run ruff check .
6+
7+
lint-fix:
8+
uv run ruff check --fix .
9+
uv run ruff format
10+
11+
typecheck:
12+
uv run pyright
13+
uv run mypy .

README.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,71 @@
1-
# Blindpay Python SDK
1+
# BlindPay Python SDK
22

33
The official Python SDK for Blindpay - Global payments infrastructure made simple.
4+
5+
## Installation
6+
7+
```bash
8+
pip install blindpay
9+
```
10+
11+
## Requirements
12+
13+
- Python 3.12 or higher
14+
15+
## Error Handling
16+
17+
All API methods return a response dictionary with either `data` or `error`:
18+
19+
```python
20+
blindpay = BlindPay(
21+
api_key="your_api_key_here",
22+
instance_id="your_instance_id_here"
23+
)
24+
25+
response = await blindpay.receivers.get("receiver-id")
26+
27+
if response['error']:
28+
print(f"Error: {response['error']['message']}")
29+
return
30+
31+
receiver = response['data']
32+
print(f"Receiver: {receiver}")
33+
```
34+
35+
## Types
36+
37+
The SDK includes comprehensive type definitions for all API resources and parameters. These can be imported from the main package:
38+
39+
```python
40+
from blindpay import (
41+
AccountClass,
42+
BankAccountType,
43+
Country,
44+
Currency,
45+
CurrencyType,
46+
Network,
47+
Rail,
48+
StablecoinToken,
49+
TransactionDocumentType,
50+
TransactionStatus,
51+
PaginationParams,
52+
PaginationMetadata,
53+
# ... and more
54+
)
55+
```
56+
57+
## Development
58+
59+
This SDK uses:
60+
- `uv` for package management
61+
- `httpx` for async HTTP requests
62+
- `pydantic` for data validation
63+
- `typing_extensions` for typing
64+
65+
## License
66+
67+
MIT
68+
69+
## Support
70+
71+
For support, please contact [email protected] or visit [blindpay](https://blindpay.com)

0 commit comments

Comments
 (0)