Skip to content

Commit 71eb22c

Browse files
committed
Initial commit: vendus SDK v0.1.0 (FT + FR + NC)
0 parents  commit 71eb22c

89 files changed

Lines changed: 5709 additions & 0 deletions

Some content is hidden

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

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copy to .env and fill in. .env is gitignored.
2+
VENDUS_API_KEY=
3+
VENDUS_REGISTER_ID=
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Bug report
2+
description: Report a problem with the SDK
3+
labels: ["bug"]
4+
body:
5+
- type: textarea
6+
id: what-happened
7+
attributes:
8+
label: What happened?
9+
description: A clear description of the bug.
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: repro
14+
attributes:
15+
label: Reproduction
16+
description: Minimal code to reproduce. Redact any API keys and NIFs.
17+
render: python
18+
validations:
19+
required: true
20+
- type: input
21+
id: version
22+
attributes:
23+
label: vendus version
24+
placeholder: "0.1.0"
25+
validations:
26+
required: true
27+
- type: input
28+
id: python
29+
attributes:
30+
label: Python version
31+
placeholder: "3.12"
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: traceback
36+
attributes:
37+
label: Traceback
38+
description: Full traceback if any. Redact PII.
39+
render: text

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security vulnerability
4+
url: https://github.com/bilouro/vendus-python/security/policy
5+
about: Please report security issues privately, not as public issues.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Feature request
2+
description: Suggest a new document type, method, or improvement
3+
labels: ["enhancement"]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem
9+
description: What are you trying to do that the SDK doesn't support?
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: proposal
14+
attributes:
15+
label: Proposed solution
16+
description: How would you like it to work? Include the Vendus API endpoint if relevant.
17+
- type: textarea
18+
id: alternatives
19+
attributes:
20+
label: Alternatives considered

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Summary
2+
3+
<!-- What does this PR change and why? -->
4+
5+
## Checklist
6+
7+
- [ ] `ruff check .` passes
8+
- [ ] `ruff format --check .` passes
9+
- [ ] `mypy src/` passes (strict)
10+
- [ ] `pytest` passes with coverage ≥ 85%
11+
- [ ] New public methods have sync + async variants (R5)
12+
- [ ] Docs updated (PT + EN) if behavior changed
13+
- [ ] CHANGELOG.md updated
14+
15+
## Notes
16+
17+
<!-- Anything reviewers should know. Do not include API keys or real NIFs. -->

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 5
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"

.github/workflows/docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
- "mkdocs.yml"
9+
- "src/**"
10+
- ".github/workflows/docs.yml"
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
25+
- name: Install
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -e ".[docs]"
29+
- name: Deploy
30+
run: mkdocs gh-deploy --force --clean

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
- name: Install
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -e ".[dev]"
21+
- name: Ruff check
22+
run: ruff check .
23+
- name: Ruff format
24+
run: ruff format --check .
25+
- name: Mypy
26+
run: mypy src/
27+
28+
test:
29+
runs-on: ubuntu-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
- name: Install
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install -e ".[dev]"
43+
- name: Pytest
44+
run: pytest

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
dist/
9+
*.egg-info/
10+
*.egg
11+
.eggs/
12+
13+
# Virtualenv
14+
.venv/
15+
venv/
16+
env/
17+
18+
# Testing
19+
.pytest_cache/
20+
.coverage
21+
.coverage.*
22+
htmlcov/
23+
.tox/
24+
.nox/
25+
coverage.xml
26+
*.cover
27+
28+
# Type checkers / linters
29+
.mypy_cache/
30+
.ruff_cache/
31+
.dmypy.json
32+
33+
# Secrets & env
34+
.env
35+
.env.*
36+
!.env.example
37+
38+
# Editors / OS
39+
.idea/
40+
.vscode/
41+
.claude/
42+
*.swp
43+
.DS_Store
44+
45+
# Docs build
46+
site/

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.4.10
4+
hooks:
5+
- id: ruff
6+
args: [--fix]
7+
- id: ruff-format
8+
9+
- repo: https://github.com/pre-commit/mirrors-mypy
10+
rev: v1.10.0
11+
hooks:
12+
- id: mypy
13+
args: [--strict]
14+
additional_dependencies: [pydantic, httpx, types-requests]
15+
files: ^src/
16+
17+
- repo: https://github.com/PyCQA/bandit
18+
rev: 1.7.9
19+
hooks:
20+
- id: bandit
21+
args: [-c, pyproject.toml]
22+
additional_dependencies: ["bandit[toml]"]
23+
files: ^src/

0 commit comments

Comments
 (0)