ordercloud-python 2026.4.1__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.
- ordercloud_python-2026.4.1/.github/dependabot.yml +26 -0
- ordercloud_python-2026.4.1/.github/workflows/ci.yml +63 -0
- ordercloud_python-2026.4.1/.github/workflows/codeql.yml +35 -0
- ordercloud_python-2026.4.1/.github/workflows/dependency-review.yml +20 -0
- ordercloud_python-2026.4.1/.github/workflows/release.yml +95 -0
- ordercloud_python-2026.4.1/.github/workflows/sbom.yml +31 -0
- ordercloud_python-2026.4.1/.github/workflows/scorecard.yml +36 -0
- ordercloud_python-2026.4.1/.gitignore +210 -0
- ordercloud_python-2026.4.1/CHANGELOG.md +34 -0
- ordercloud_python-2026.4.1/CODE_REVIEW.md +149 -0
- ordercloud_python-2026.4.1/LICENSE +21 -0
- ordercloud_python-2026.4.1/PKG-INFO +552 -0
- ordercloud_python-2026.4.1/README.md +512 -0
- ordercloud_python-2026.4.1/SECURITY.md +41 -0
- ordercloud_python-2026.4.1/SECURITY_AUDIT.md +180 -0
- ordercloud_python-2026.4.1/examples/basic_workflow.py +60 -0
- ordercloud_python-2026.4.1/pyproject.toml +113 -0
- ordercloud_python-2026.4.1/src/ordercloud/__init__.py +37 -0
- ordercloud_python-2026.4.1/src/ordercloud/auth.py +136 -0
- ordercloud_python-2026.4.1/src/ordercloud/client.py +211 -0
- ordercloud_python-2026.4.1/src/ordercloud/config.py +42 -0
- ordercloud_python-2026.4.1/src/ordercloud/errors.py +47 -0
- ordercloud_python-2026.4.1/src/ordercloud/http.py +218 -0
- ordercloud_python-2026.4.1/src/ordercloud/middleware.py +66 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/__init__.py +271 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/address.py +47 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/api_client.py +116 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/approval.py +73 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/assignments.py +402 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/auth_models.py +114 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/bundle.py +31 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/buyer.py +271 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/catalog.py +33 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/category.py +35 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/cost_center.py +27 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/credit_card.py +35 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/delivery.py +277 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/discount.py +63 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/integration.py +76 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/inventory_record.py +53 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/line_item.py +95 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/line_item_types.py +89 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/message_sender.py +80 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/misc.py +280 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/open_id_connect.py +47 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/order.py +477 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/order_return.py +92 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/payment.py +77 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/price_schedule.py +76 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/product.py +227 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/product_collection.py +186 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/promotion.py +297 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/security.py +89 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/shared.py +131 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/shipment.py +150 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/spec.py +67 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/spending_account.py +33 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/subscription.py +125 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/supplier.py +43 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/sync.py +172 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/user.py +207 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/user_group.py +27 -0
- ordercloud_python-2026.4.1/src/ordercloud/models/webhook.py +58 -0
- ordercloud_python-2026.4.1/src/ordercloud/py.typed +0 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/__init__.py +65 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/addresses.py +228 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/admin_addresses.py +128 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/admin_user_groups.py +185 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/admin_users.py +150 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/api_clients.py +308 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/approval_rules.py +144 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/base.py +145 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/bundle_line_items.py +59 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/bundle_subscription_items.py +54 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/bundles.py +278 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/buyer_groups.py +128 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/buyers.py +164 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/cart.py +613 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/catalogs.py +311 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/categories.py +392 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/cost_centers.py +222 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/credit_cards.py +227 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/delivery_configurations.py +132 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/discounts.py +201 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/entity_syncs.py +534 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/error_configs.py +71 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/forgotten_credentials.py +74 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/group_orders.py +28 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/impersonation_configs.py +132 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/incrementors.py +128 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/integration_events.py +203 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/inventory_integrations.py +65 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/inventory_records.py +484 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/line_items.py +262 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/locales.py +203 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/me.py +1882 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/message_senders.py +261 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/open_id_connects.py +128 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/order_returns.py +306 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/order_syncs.py +65 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/orders.py +689 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/payments.py +176 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/price_schedules.py +164 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/product_collections.py +116 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/product_facets.py +128 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/product_syncs.py +76 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/products.py +454 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/promotion_integrations.py +65 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/promotions.py +203 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/security_profiles.py +222 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/seller_approval_rules.py +128 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/shipments.py +256 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/specs.py +313 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/spending_accounts.py +227 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/subscription_integrations.py +65 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/subscription_items.py +146 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/subscriptions.py +128 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/supplier_addresses.py +144 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/supplier_user_groups.py +210 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/supplier_users.py +170 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/suppliers.py +190 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/tracking_events.py +130 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/user_groups.py +210 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/users.py +254 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/webhooks.py +128 -0
- ordercloud_python-2026.4.1/src/ordercloud/resources/xp_indices.py +77 -0
- ordercloud_python-2026.4.1/src/ordercloud/sync_client.py +170 -0
- ordercloud_python-2026.4.1/tests/__init__.py +0 -0
- ordercloud_python-2026.4.1/tests/conftest.py +123 -0
- ordercloud_python-2026.4.1/tests/integration/__init__.py +0 -0
- ordercloud_python-2026.4.1/tests/integration/conftest.py +238 -0
- ordercloud_python-2026.4.1/tests/integration/test_auth.py +66 -0
- ordercloud_python-2026.4.1/tests/integration/test_crud.py +276 -0
- ordercloud_python-2026.4.1/tests/integration/test_errors.py +59 -0
- ordercloud_python-2026.4.1/tests/integration/test_pagination.py +91 -0
- ordercloud_python-2026.4.1/tests/integration/test_query_params.py +194 -0
- ordercloud_python-2026.4.1/tests/integration/test_sync_client.py +84 -0
- ordercloud_python-2026.4.1/tests/test_auth.py +192 -0
- ordercloud_python-2026.4.1/tests/test_http.py +510 -0
- ordercloud_python-2026.4.1/tests/test_models.py +375 -0
- ordercloud_python-2026.4.1/tests/test_resource_coverage.py +280 -0
- ordercloud_python-2026.4.1/tests/test_resources.py +485 -0
- ordercloud_python-2026.4.1/tests/test_sync_client.py +258 -0
- ordercloud_python-2026.4.1/tools/__init__.py +0 -0
- ordercloud_python-2026.4.1/tools/codegen/__init__.py +5 -0
- ordercloud_python-2026.4.1/tools/codegen/__main__.py +7 -0
- ordercloud_python-2026.4.1/tools/codegen/cli.py +100 -0
- ordercloud_python-2026.4.1/tools/codegen/grouping.py +345 -0
- ordercloud_python-2026.4.1/tools/codegen/ir.py +229 -0
- ordercloud_python-2026.4.1/tools/codegen/naming.py +157 -0
- ordercloud_python-2026.4.1/tools/codegen/parser.py +383 -0
- ordercloud_python-2026.4.1/tools/codegen/renderer.py +192 -0
- ordercloud_python-2026.4.1/tools/codegen/templates/client.py.j2 +97 -0
- ordercloud_python-2026.4.1/tools/codegen/templates/model_module.py.j2 +49 -0
- ordercloud_python-2026.4.1/tools/codegen/templates/models_init.py.j2 +18 -0
- ordercloud_python-2026.4.1/tools/codegen/templates/resource_module.py.j2 +134 -0
- ordercloud_python-2026.4.1/tools/codegen/templates/resources_init.py.j2 +8 -0
- ordercloud_python-2026.4.1/tools/codegen/transformer.py +391 -0
- ordercloud_python-2026.4.1/tools/codegen/type_mapping.py +157 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
updates:
|
|
4
|
+
# Python dependencies
|
|
5
|
+
- package-ecosystem: "pip"
|
|
6
|
+
directory: "/"
|
|
7
|
+
schedule:
|
|
8
|
+
interval: "weekly"
|
|
9
|
+
day: "monday"
|
|
10
|
+
commit-message:
|
|
11
|
+
prefix: "deps"
|
|
12
|
+
labels:
|
|
13
|
+
- "dependencies"
|
|
14
|
+
open-pull-requests-limit: 10
|
|
15
|
+
|
|
16
|
+
# GitHub Actions
|
|
17
|
+
- package-ecosystem: "github-actions"
|
|
18
|
+
directory: "/"
|
|
19
|
+
schedule:
|
|
20
|
+
interval: "weekly"
|
|
21
|
+
day: "monday"
|
|
22
|
+
commit-message:
|
|
23
|
+
prefix: "ci"
|
|
24
|
+
labels:
|
|
25
|
+
- "ci"
|
|
26
|
+
open-pull-requests-limit: 5
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
name: Lint
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
18
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.13"
|
|
21
|
+
- name: Install ruff
|
|
22
|
+
run: pip install "ruff>=0.4"
|
|
23
|
+
- name: Ruff check
|
|
24
|
+
run: ruff check src/ tests/
|
|
25
|
+
- name: Ruff format check
|
|
26
|
+
run: ruff format --check src/ tests/
|
|
27
|
+
|
|
28
|
+
typecheck:
|
|
29
|
+
name: Type check
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
33
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.13"
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: pip install -e ".[dev]"
|
|
38
|
+
- name: Run mypy
|
|
39
|
+
run: mypy src/ordercloud/
|
|
40
|
+
|
|
41
|
+
test:
|
|
42
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
strategy:
|
|
45
|
+
fail-fast: false
|
|
46
|
+
matrix:
|
|
47
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
50
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
51
|
+
with:
|
|
52
|
+
python-version: ${{ matrix.python-version }}
|
|
53
|
+
- name: Install dependencies
|
|
54
|
+
run: pip install -e ".[dev]"
|
|
55
|
+
- name: Run tests with coverage
|
|
56
|
+
run: pytest --cov=ordercloud --cov-report=xml --cov-report=term-missing --cov-fail-under=90
|
|
57
|
+
- name: Upload coverage to Codecov
|
|
58
|
+
if: matrix.python-version == '3.13'
|
|
59
|
+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
|
|
60
|
+
with:
|
|
61
|
+
files: ./coverage.xml
|
|
62
|
+
fail_ci_if_error: false
|
|
63
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 6 * * 1" # Every Monday at 06:00 UTC
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
actions: read
|
|
13
|
+
contents: read
|
|
14
|
+
security-events: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
analyze:
|
|
18
|
+
name: Analyze (Python)
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
22
|
+
|
|
23
|
+
- name: Initialize CodeQL
|
|
24
|
+
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
|
|
25
|
+
with:
|
|
26
|
+
languages: python
|
|
27
|
+
queries: security-and-quality
|
|
28
|
+
|
|
29
|
+
- name: Autobuild
|
|
30
|
+
uses: github/codeql-action/autobuild@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
|
|
31
|
+
|
|
32
|
+
- name: Perform CodeQL Analysis
|
|
33
|
+
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
|
|
34
|
+
with:
|
|
35
|
+
category: "/language:python"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Dependency Review
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
dependency-review:
|
|
12
|
+
name: Review dependencies
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
16
|
+
- name: Dependency Review
|
|
17
|
+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4
|
|
18
|
+
with:
|
|
19
|
+
fail-on-severity: moderate
|
|
20
|
+
deny-licenses: GPL-3.0, AGPL-3.0
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions: {}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build distribution
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
18
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.13"
|
|
21
|
+
- name: Install build
|
|
22
|
+
run: pip install build
|
|
23
|
+
- name: Verify version matches tag
|
|
24
|
+
run: |
|
|
25
|
+
TAG_VERSION="${GITHUB_REF_NAME#v}"
|
|
26
|
+
PKG_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
27
|
+
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
|
|
28
|
+
echo "::error::Tag version ($TAG_VERSION) does not match pyproject.toml version ($PKG_VERSION)"
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
- name: Build sdist and wheel
|
|
32
|
+
run: python -m build
|
|
33
|
+
- name: Upload distributions
|
|
34
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
35
|
+
with:
|
|
36
|
+
name: dist
|
|
37
|
+
path: dist/
|
|
38
|
+
|
|
39
|
+
publish:
|
|
40
|
+
name: Publish to PyPI
|
|
41
|
+
needs: build
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
permissions:
|
|
44
|
+
id-token: write
|
|
45
|
+
environment:
|
|
46
|
+
name: pypi
|
|
47
|
+
url: https://pypi.org/project/ordercloud-python/
|
|
48
|
+
steps:
|
|
49
|
+
- name: Download distributions
|
|
50
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
51
|
+
with:
|
|
52
|
+
name: dist
|
|
53
|
+
path: dist/
|
|
54
|
+
- name: Publish to PyPI
|
|
55
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
56
|
+
|
|
57
|
+
attestation:
|
|
58
|
+
name: Attest build provenance
|
|
59
|
+
needs: build
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
permissions:
|
|
62
|
+
id-token: write
|
|
63
|
+
attestations: write
|
|
64
|
+
contents: read
|
|
65
|
+
steps:
|
|
66
|
+
- name: Download distributions
|
|
67
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
68
|
+
with:
|
|
69
|
+
name: dist
|
|
70
|
+
path: dist/
|
|
71
|
+
- name: Attest build provenance
|
|
72
|
+
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
|
|
73
|
+
with:
|
|
74
|
+
subject-path: dist/*
|
|
75
|
+
|
|
76
|
+
github-release:
|
|
77
|
+
name: Create GitHub Release
|
|
78
|
+
needs: [publish, attestation]
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
permissions:
|
|
81
|
+
contents: write
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
84
|
+
- name: Download distributions
|
|
85
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
86
|
+
with:
|
|
87
|
+
name: dist
|
|
88
|
+
path: dist/
|
|
89
|
+
- name: Create GitHub Release
|
|
90
|
+
env:
|
|
91
|
+
GH_TOKEN: ${{ github.token }}
|
|
92
|
+
run: |
|
|
93
|
+
gh release create "$GITHUB_REF_NAME" dist/* \
|
|
94
|
+
--title "$GITHUB_REF_NAME" \
|
|
95
|
+
--generate-notes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: SBOM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
sbom:
|
|
14
|
+
name: Generate SBOM
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
20
|
+
|
|
21
|
+
- name: Generate SBOM
|
|
22
|
+
uses: anchore/sbom-action@e22c389904149dbc22b58101806040fa8d37a610 # v0
|
|
23
|
+
with:
|
|
24
|
+
format: spdx-json
|
|
25
|
+
output-file: sbom.spdx.json
|
|
26
|
+
|
|
27
|
+
- name: Upload SBOM as artifact
|
|
28
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
29
|
+
with:
|
|
30
|
+
name: sbom
|
|
31
|
+
path: sbom.spdx.json
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: OpenSSF Scorecard
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: "0 6 * * 1" # Every Monday at 06:00 UTC
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
analysis:
|
|
14
|
+
name: Scorecard analysis
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
security-events: write
|
|
18
|
+
id-token: write
|
|
19
|
+
contents: read
|
|
20
|
+
actions: read
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
|
|
26
|
+
- name: Run Scorecard
|
|
27
|
+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
|
28
|
+
with:
|
|
29
|
+
results_file: results.sarif
|
|
30
|
+
results_format: sarif
|
|
31
|
+
publish_results: true
|
|
32
|
+
|
|
33
|
+
- name: Upload SARIF results
|
|
34
|
+
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
|
|
35
|
+
with:
|
|
36
|
+
sarif_file: results.sarif
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# OpenAPI spec (reference only, not part of the SDK)
|
|
2
|
+
openapi.json
|
|
3
|
+
|
|
4
|
+
# Byte-compiled / optimized / DLL files
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[codz]
|
|
7
|
+
*$py.class
|
|
8
|
+
|
|
9
|
+
# C extensions
|
|
10
|
+
*.so
|
|
11
|
+
|
|
12
|
+
# Distribution / packaging
|
|
13
|
+
.Python
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py.cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
cover/
|
|
56
|
+
|
|
57
|
+
# Translations
|
|
58
|
+
*.mo
|
|
59
|
+
*.pot
|
|
60
|
+
|
|
61
|
+
# Django stuff:
|
|
62
|
+
*.log
|
|
63
|
+
local_settings.py
|
|
64
|
+
db.sqlite3
|
|
65
|
+
db.sqlite3-journal
|
|
66
|
+
|
|
67
|
+
# Flask stuff:
|
|
68
|
+
instance/
|
|
69
|
+
.webassets-cache
|
|
70
|
+
|
|
71
|
+
# Scrapy stuff:
|
|
72
|
+
.scrapy
|
|
73
|
+
|
|
74
|
+
# Sphinx documentation
|
|
75
|
+
docs/_build/
|
|
76
|
+
|
|
77
|
+
# PyBuilder
|
|
78
|
+
.pybuilder/
|
|
79
|
+
target/
|
|
80
|
+
|
|
81
|
+
# Jupyter Notebook
|
|
82
|
+
.ipynb_checkpoints
|
|
83
|
+
|
|
84
|
+
# IPython
|
|
85
|
+
profile_default/
|
|
86
|
+
ipython_config.py
|
|
87
|
+
|
|
88
|
+
# pyenv
|
|
89
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
90
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
91
|
+
# .python-version
|
|
92
|
+
|
|
93
|
+
# pipenv
|
|
94
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
95
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
96
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
97
|
+
# install all needed dependencies.
|
|
98
|
+
#Pipfile.lock
|
|
99
|
+
|
|
100
|
+
# UV
|
|
101
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
102
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
103
|
+
# commonly ignored for libraries.
|
|
104
|
+
#uv.lock
|
|
105
|
+
|
|
106
|
+
# poetry
|
|
107
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
108
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
109
|
+
# commonly ignored for libraries.
|
|
110
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
111
|
+
#poetry.lock
|
|
112
|
+
#poetry.toml
|
|
113
|
+
|
|
114
|
+
# pdm
|
|
115
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
116
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
117
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
118
|
+
#pdm.lock
|
|
119
|
+
#pdm.toml
|
|
120
|
+
.pdm-python
|
|
121
|
+
.pdm-build/
|
|
122
|
+
|
|
123
|
+
# pixi
|
|
124
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
125
|
+
#pixi.lock
|
|
126
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
127
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
128
|
+
.pixi
|
|
129
|
+
|
|
130
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
131
|
+
__pypackages__/
|
|
132
|
+
|
|
133
|
+
# Celery stuff
|
|
134
|
+
celerybeat-schedule
|
|
135
|
+
celerybeat.pid
|
|
136
|
+
|
|
137
|
+
# SageMath parsed files
|
|
138
|
+
*.sage.py
|
|
139
|
+
|
|
140
|
+
# Environments
|
|
141
|
+
.env
|
|
142
|
+
.envrc
|
|
143
|
+
.venv
|
|
144
|
+
env/
|
|
145
|
+
venv/
|
|
146
|
+
ENV/
|
|
147
|
+
env.bak/
|
|
148
|
+
venv.bak/
|
|
149
|
+
|
|
150
|
+
# Spyder project settings
|
|
151
|
+
.spyderproject
|
|
152
|
+
.spyproject
|
|
153
|
+
|
|
154
|
+
# Rope project settings
|
|
155
|
+
.ropeproject
|
|
156
|
+
|
|
157
|
+
# mkdocs documentation
|
|
158
|
+
/site
|
|
159
|
+
|
|
160
|
+
# mypy
|
|
161
|
+
.mypy_cache/
|
|
162
|
+
.dmypy.json
|
|
163
|
+
dmypy.json
|
|
164
|
+
|
|
165
|
+
# Pyre type checker
|
|
166
|
+
.pyre/
|
|
167
|
+
|
|
168
|
+
# pytype static type analyzer
|
|
169
|
+
.pytype/
|
|
170
|
+
|
|
171
|
+
# Cython debug symbols
|
|
172
|
+
cython_debug/
|
|
173
|
+
|
|
174
|
+
# PyCharm
|
|
175
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
176
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
177
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
178
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
179
|
+
#.idea/
|
|
180
|
+
|
|
181
|
+
# Abstra
|
|
182
|
+
# Abstra is an AI-powered process automation framework.
|
|
183
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
184
|
+
# Learn more at https://abstra.io/docs
|
|
185
|
+
.abstra/
|
|
186
|
+
|
|
187
|
+
# Visual Studio Code
|
|
188
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
189
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
190
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
191
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
192
|
+
# .vscode/
|
|
193
|
+
|
|
194
|
+
# Ruff stuff:
|
|
195
|
+
.ruff_cache/
|
|
196
|
+
|
|
197
|
+
# PyPI configuration file
|
|
198
|
+
.pypirc
|
|
199
|
+
|
|
200
|
+
# Cursor
|
|
201
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
202
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
203
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
204
|
+
.cursorignore
|
|
205
|
+
.cursorindexingignore
|
|
206
|
+
|
|
207
|
+
# Marimo
|
|
208
|
+
marimo/_static/
|
|
209
|
+
marimo/_lsp/
|
|
210
|
+
__marimo__/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
This project uses [Calendar Versioning](https://calver.org/) — `YYYY.MM.N` where `N` is the release number within that month.
|
|
6
|
+
|
|
7
|
+
## 2026.4.1 — 2026-04-13
|
|
8
|
+
|
|
9
|
+
Initial release. Full SDK for the Sitecore OrderCloud API, generated from the OpenAPI v3 spec (version 1.0.445).
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- **Full API coverage** — 632 operations across 60 resources, generated from the official OpenAPI spec
|
|
14
|
+
- **Async and sync clients** — `OrderCloudClient` (async, default) and `SyncOrderCloudClient` with identical API shapes
|
|
15
|
+
- **Pydantic v2 typed models** — 167 models and 17 enums with full type annotations
|
|
16
|
+
- **Typed extended properties (xp)** — `Product[MyXp]` pattern for type-safe custom fields, backward compatible with untyped `dict[str, Any]`
|
|
17
|
+
- **Auto-pagination** — `paginate()` and `paginate_sync()` async/sync generators for any list method
|
|
18
|
+
- **Retry with exponential backoff** — configurable `max_retries` and `retry_backoff`; retries 429/5xx, respects `Retry-After` headers
|
|
19
|
+
- **Structured logging** — `logging.getLogger("ordercloud")` with DEBUG request/response and WARNING retry logging
|
|
20
|
+
- **Middleware hooks** — `add_before_request()` / `add_after_response()` for request/response interception
|
|
21
|
+
- **OAuth2 client credentials** — automatic token acquisition, caching, and refresh
|
|
22
|
+
- **PEP 561 typed** — `py.typed` marker for downstream type checking
|
|
23
|
+
|
|
24
|
+
### Code Generation
|
|
25
|
+
|
|
26
|
+
Three-stage pipeline in `tools/codegen/`: OpenAPI JSON -> parser -> IR dataclasses -> transformer -> Jinja2 templates -> Python source -> ruff format. 10 source files, 5 templates. Generates 100 files (37 model modules, 60 resource modules, 2 init barrels, 1 client).
|
|
27
|
+
|
|
28
|
+
### Quality
|
|
29
|
+
|
|
30
|
+
- 759 unit tests, 97% overall coverage (100% on all hand-written infrastructure and all 37 model modules)
|
|
31
|
+
- CI: lint, format, type check (mypy strict), test matrix (Python 3.10-3.13), coverage upload
|
|
32
|
+
- CodeQL security scanning, OpenSSF Scorecard, SBOM generation, dependency review
|
|
33
|
+
- Dependabot for pip and GitHub Actions version management
|
|
34
|
+
- Branch protection with required status checks
|