Skip to content

Commit 7ad444d

Browse files
committed
add new creators api module
1 parent 20de236 commit 7ad444d

117 files changed

Lines changed: 14738 additions & 21 deletions

File tree

Some content is hidden

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

.env.template

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1+
# Product Advertising API
12
API_KEY=
23
API_SECRET=
4+
5+
# Creators API
6+
CREDENTIAL_ID=
7+
CREDENTIAL_SECRET=
8+
API_VERSION=
9+
MARKETPLACE=
10+
11+
# Common
312
AFFILIATE_TAG=
413
COUNTRY_CODE=

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
strategy:
7575
fail-fast: false
7676
matrix:
77-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
77+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
7878

7979
steps:
8080
- uses: actions/checkout@v5

.pre-commit-config.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ repos:
1515
rev: v6.0.0
1616
hooks:
1717
- id: trailing-whitespace
18+
exclude: ^creatorsapi_python_sdk/
1819
- id: end-of-file-fixer
20+
exclude: ^creatorsapi_python_sdk/
1921
- id: mixed-line-ending
2022
- id: check-yaml
2123
- id: check-added-large-files
@@ -38,18 +40,19 @@ repos:
3840
hooks:
3941
- id: gitleaks
4042

41-
- repo: https://github.com/pre-commit/mirrors-mypy
42-
rev: "v1.19.1"
43+
- repo: local
4344
hooks:
4445
- id: mypy
45-
exclude: sdk/
46+
name: checking types with mypy
47+
entry: uv run mypy .
48+
language: system
49+
types: [python]
50+
pass_filenames: false
4651

47-
- repo: local
48-
hooks:
4952
- id: test
5053
name: Running tests
5154
language: system
52-
entry: "bash -c 'set -a && source .env 2>/dev/null; set +a && uv run pytest -rs --cov=amazon_paapi'"
55+
entry: "bash -c 'set -a && source .env 2>/dev/null; set +a && uv run pytest -rs --cov=amazon_paapi --cov=amazon_creatorsapi'"
5356
types_or: [python]
5457
pass_filenames: false
5558

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export UID:=$(shell id -u)
22
export GID:=$(shell id -g)
33

4-
export PYTHON_TAGS = 3.9 3.10 3.11 3.12 3.13 3.14 3.15
4+
export PYTHON_TAGS = 3.9 3.10 3.11 3.12 3.13 3.14
55

66
setup:
77
@uv run pre-commit install
@@ -11,7 +11,7 @@ test:
1111
@uv run --env-file .env pytest -rs
1212

1313
coverage:
14-
@uv run pytest -rs --cov=amazon_paapi --cov-report=html --cov-report=term --cov-report=xml
14+
@uv run pytest -rs --cov=amazon_paapi --cov=amazon_creatorsapi --cov-report=html --cov-report=term --cov-report=xml
1515

1616
test-all-python-tags:
1717
@touch .env
@@ -22,6 +22,9 @@ test-all-python-tags:
2222
lint:
2323
@uv run ruff check --fix .
2424

25+
format:
26+
@uv run ruff format .
27+
2528
mypy:
2629
@uv run mypy .
2730

amazon_creatorsapi/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""Amazon Creators API wrapper for Python.
2+
3+
A Python wrapper for the Amazon Creators API.
4+
"""
5+
6+
__author__ = "Sergio Abad"
7+
__all__ = ["AmazonCreatorsApi"]
8+
9+
from .api import AmazonCreatorsApi

0 commit comments

Comments
 (0)