meraki-client 0.1.0__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.
- meraki_client-0.1.0/.github/workflows/ci.yml +37 -0
- meraki_client-0.1.0/.github/workflows/publish.yml +36 -0
- meraki_client-0.1.0/.gitignore +12 -0
- meraki_client-0.1.0/.python-version +1 -0
- meraki_client-0.1.0/.readthedocs.yml +18 -0
- meraki_client-0.1.0/CHANGELOG.md +12 -0
- meraki_client-0.1.0/CONTRIBUTING.md +104 -0
- meraki_client-0.1.0/LICENSE +22 -0
- meraki_client-0.1.0/Makefile +62 -0
- meraki_client-0.1.0/PKG-INFO +123 -0
- meraki_client-0.1.0/README.md +100 -0
- meraki_client-0.1.0/bruno/Get Administered Licensing Subscription Entitlements.bru +16 -0
- meraki_client-0.1.0/bruno/Get Network Clients.bru +16 -0
- meraki_client-0.1.0/bruno/Get Network Firmware Upgrades.bru +16 -0
- meraki_client-0.1.0/bruno/Get Organization Appliance Dns Local Profiles.bru +16 -0
- meraki_client-0.1.0/bruno/Get Organization Devices.bru +16 -0
- meraki_client-0.1.0/bruno/Get Organization Early Access Features Opt Ins.bru +16 -0
- meraki_client-0.1.0/bruno/Get Organization Networks.bru +16 -0
- meraki_client-0.1.0/bruno/Get Organization Wireless Ssids Open Roaming By Network.bru +16 -0
- meraki_client-0.1.0/bruno/Get Organizations.bru +16 -0
- meraki_client-0.1.0/bruno/bruno.json +9 -0
- meraki_client-0.1.0/bruno/collection.bru +7 -0
- meraki_client-0.1.0/bruno/environments/Default.bru +9 -0
- meraki_client-0.1.0/codegen/__init__.py +1 -0
- meraki_client-0.1.0/codegen/constants.py +59 -0
- meraki_client-0.1.0/codegen/log_config.py +31 -0
- meraki_client-0.1.0/codegen/main.py +1053 -0
- meraki_client-0.1.0/codegen/schema_gen.py +977 -0
- meraki_client-0.1.0/codegen/schemas.py +12 -0
- meraki_client-0.1.0/codegen/spec_overrides.toml +65 -0
- meraki_client-0.1.0/codegen/static/_api/__init__.py +1 -0
- meraki_client-0.1.0/codegen/static/_common.py +79 -0
- meraki_client-0.1.0/codegen/static/aio/_api/__init__.py +1 -0
- meraki_client-0.1.0/codegen/static/exceptions.py +159 -0
- meraki_client-0.1.0/codegen/static/py.typed +0 -0
- meraki_client-0.1.0/codegen/templates/api_reference_template.md.jinja2 +8 -0
- meraki_client-0.1.0/codegen/templates/batch_class_template.py.jinja2 +23 -0
- meraki_client-0.1.0/codegen/templates/batch_function_template.py.jinja2 +57 -0
- meraki_client-0.1.0/codegen/templates/batch_init_template.py.jinja2 +18 -0
- meraki_client-0.1.0/codegen/templates/class_template.py.jinja2 +30 -0
- meraki_client-0.1.0/codegen/templates/function_template.py.jinja2 +87 -0
- meraki_client-0.1.0/codegen/templates/init_template.py.jinja2 +129 -0
- meraki_client-0.1.0/codegen/templates/schema_base_template.py.jinja2 +15 -0
- meraki_client-0.1.0/codegen/templates/schema_init_template.py.jinja2 +22 -0
- meraki_client-0.1.0/codegen/templates/schema_module_template.py.jinja2 +18 -0
- meraki_client-0.1.0/codegen/templates/session_template.py.jinja2 +520 -0
- meraki_client-0.1.0/codegen/templates/test_conftest_template.py.jinja2 +83 -0
- meraki_client-0.1.0/codegen/templates/test_module_template.py.jinja2 +24 -0
- meraki_client-0.1.0/codegen/test_gen.py +247 -0
- meraki_client-0.1.0/codegen/utils.py +70 -0
- meraki_client-0.1.0/docs/api_reference/administered.md +8 -0
- meraki_client-0.1.0/docs/api_reference/appliance.md +8 -0
- meraki_client-0.1.0/docs/api_reference/camera.md +8 -0
- meraki_client-0.1.0/docs/api_reference/campus_gateway.md +8 -0
- meraki_client-0.1.0/docs/api_reference/cellular_gateway.md +8 -0
- meraki_client-0.1.0/docs/api_reference/devices.md +8 -0
- meraki_client-0.1.0/docs/api_reference/exceptions.md +8 -0
- meraki_client-0.1.0/docs/api_reference/index.md +15 -0
- meraki_client-0.1.0/docs/api_reference/insight.md +8 -0
- meraki_client-0.1.0/docs/api_reference/licensing.md +8 -0
- meraki_client-0.1.0/docs/api_reference/nac.md +8 -0
- meraki_client-0.1.0/docs/api_reference/networks.md +8 -0
- meraki_client-0.1.0/docs/api_reference/organizations.md +8 -0
- meraki_client-0.1.0/docs/api_reference/sensor.md +8 -0
- meraki_client-0.1.0/docs/api_reference/sm.md +8 -0
- meraki_client-0.1.0/docs/api_reference/spaces.md +8 -0
- meraki_client-0.1.0/docs/api_reference/switch.md +8 -0
- meraki_client-0.1.0/docs/api_reference/wireless.md +8 -0
- meraki_client-0.1.0/docs/api_reference/wireless_controller.md +8 -0
- meraki_client-0.1.0/docs/assets/extra.css +39 -0
- meraki_client-0.1.0/docs/changelog.md +1 -0
- meraki_client-0.1.0/docs/contributing.md +1 -0
- meraki_client-0.1.0/docs/index.md +10 -0
- meraki_client-0.1.0/docs/user_guide/batch_endpoints.md +96 -0
- meraki_client-0.1.0/docs/user_guide/getting_started.md +68 -0
- meraki_client-0.1.0/docs/user_guide/pagination.md +97 -0
- meraki_client-0.1.0/meraki_client/__init__.py +123 -0
- meraki_client-0.1.0/meraki_client/_api/__init__.py +1 -0
- meraki_client-0.1.0/meraki_client/_api/administered.py +144 -0
- meraki_client-0.1.0/meraki_client/_api/appliance.py +8279 -0
- meraki_client-0.1.0/meraki_client/_api/batch/__init__.py +40 -0
- meraki_client-0.1.0/meraki_client/_api/batch/appliance.py +1948 -0
- meraki_client-0.1.0/meraki_client/_api/batch/camera.py +239 -0
- meraki_client-0.1.0/meraki_client/_api/batch/campus_gateway.py +154 -0
- meraki_client-0.1.0/meraki_client/_api/batch/cellular_gateway.py +400 -0
- meraki_client-0.1.0/meraki_client/_api/batch/devices.py +180 -0
- meraki_client-0.1.0/meraki_client/_api/batch/insight.py +117 -0
- meraki_client-0.1.0/meraki_client/_api/batch/nac.py +50 -0
- meraki_client-0.1.0/meraki_client/_api/batch/networks.py +1442 -0
- meraki_client-0.1.0/meraki_client/_api/batch/organizations.py +1989 -0
- meraki_client-0.1.0/meraki_client/_api/batch/sensor.py +252 -0
- meraki_client-0.1.0/meraki_client/_api/batch/sm.py +177 -0
- meraki_client-0.1.0/meraki_client/_api/batch/spaces.py +38 -0
- meraki_client-0.1.0/meraki_client/_api/batch/switch.py +2605 -0
- meraki_client-0.1.0/meraki_client/_api/batch/wireless.py +2478 -0
- meraki_client-0.1.0/meraki_client/_api/camera.py +2351 -0
- meraki_client-0.1.0/meraki_client/_api/campus_gateway.py +592 -0
- meraki_client-0.1.0/meraki_client/_api/cellular_gateway.py +1326 -0
- meraki_client-0.1.0/meraki_client/_api/devices.py +1748 -0
- meraki_client-0.1.0/meraki_client/_api/insight.py +348 -0
- meraki_client-0.1.0/meraki_client/_api/licensing.py +705 -0
- meraki_client-0.1.0/meraki_client/_api/nac.py +79 -0
- meraki_client-0.1.0/meraki_client/_api/networks.py +8557 -0
- meraki_client-0.1.0/meraki_client/_api/organizations.py +12756 -0
- meraki_client-0.1.0/meraki_client/_api/sensor.py +1642 -0
- meraki_client-0.1.0/meraki_client/_api/sm.py +2683 -0
- meraki_client-0.1.0/meraki_client/_api/spaces.py +98 -0
- meraki_client-0.1.0/meraki_client/_api/switch.py +7738 -0
- meraki_client-0.1.0/meraki_client/_api/wireless.py +11333 -0
- meraki_client-0.1.0/meraki_client/_api/wireless_controller.py +1706 -0
- meraki_client-0.1.0/meraki_client/_common.py +79 -0
- meraki_client-0.1.0/meraki_client/_session.py +444 -0
- meraki_client-0.1.0/meraki_client/aio/__init__.py +139 -0
- meraki_client-0.1.0/meraki_client/aio/_api/__init__.py +1 -0
- meraki_client-0.1.0/meraki_client/aio/_api/administered.py +144 -0
- meraki_client-0.1.0/meraki_client/aio/_api/appliance.py +8285 -0
- meraki_client-0.1.0/meraki_client/aio/_api/camera.py +2355 -0
- meraki_client-0.1.0/meraki_client/aio/_api/campus_gateway.py +592 -0
- meraki_client-0.1.0/meraki_client/aio/_api/cellular_gateway.py +1328 -0
- meraki_client-0.1.0/meraki_client/aio/_api/devices.py +1748 -0
- meraki_client-0.1.0/meraki_client/aio/_api/insight.py +348 -0
- meraki_client-0.1.0/meraki_client/aio/_api/licensing.py +705 -0
- meraki_client-0.1.0/meraki_client/aio/_api/nac.py +79 -0
- meraki_client-0.1.0/meraki_client/aio/_api/networks.py +8573 -0
- meraki_client-0.1.0/meraki_client/aio/_api/organizations.py +12770 -0
- meraki_client-0.1.0/meraki_client/aio/_api/sensor.py +1642 -0
- meraki_client-0.1.0/meraki_client/aio/_api/sm.py +2687 -0
- meraki_client-0.1.0/meraki_client/aio/_api/spaces.py +98 -0
- meraki_client-0.1.0/meraki_client/aio/_api/switch.py +7748 -0
- meraki_client-0.1.0/meraki_client/aio/_api/wireless.py +11349 -0
- meraki_client-0.1.0/meraki_client/aio/_api/wireless_controller.py +1706 -0
- meraki_client-0.1.0/meraki_client/aio/_session.py +451 -0
- meraki_client-0.1.0/meraki_client/exceptions.py +159 -0
- meraki_client-0.1.0/meraki_client/py.typed +0 -0
- meraki_client-0.1.0/meraki_client/schemas/__init__.py +4479 -0
- meraki_client-0.1.0/meraki_client/schemas/_administered.py +68 -0
- meraki_client-0.1.0/meraki_client/schemas/_appliance.py +2711 -0
- meraki_client-0.1.0/meraki_client/schemas/_base.py +13 -0
- meraki_client-0.1.0/meraki_client/schemas/_camera.py +886 -0
- meraki_client-0.1.0/meraki_client/schemas/_campus_gateway.py +350 -0
- meraki_client-0.1.0/meraki_client/schemas/_cellular_gateway.py +514 -0
- meraki_client-0.1.0/meraki_client/schemas/_devices.py +747 -0
- meraki_client-0.1.0/meraki_client/schemas/_insight.py +115 -0
- meraki_client-0.1.0/meraki_client/schemas/_licensing.py +303 -0
- meraki_client-0.1.0/meraki_client/schemas/_nac.py +30 -0
- meraki_client-0.1.0/meraki_client/schemas/_networks.py +2935 -0
- meraki_client-0.1.0/meraki_client/schemas/_organizations.py +4133 -0
- meraki_client-0.1.0/meraki_client/schemas/_sensor.py +694 -0
- meraki_client-0.1.0/meraki_client/schemas/_sm.py +720 -0
- meraki_client-0.1.0/meraki_client/schemas/_spaces.py +28 -0
- meraki_client-0.1.0/meraki_client/schemas/_switch.py +2804 -0
- meraki_client-0.1.0/meraki_client/schemas/_wireless.py +3426 -0
- meraki_client-0.1.0/meraki_client/schemas/_wireless_controller.py +575 -0
- meraki_client-0.1.0/mkdocs.yml +86 -0
- meraki_client-0.1.0/pyproject.toml +141 -0
- meraki_client-0.1.0/tests/__init__.py +1 -0
- meraki_client-0.1.0/tests/conftest.py +83 -0
- meraki_client-0.1.0/tests/generated/__init__.py +1 -0
- meraki_client-0.1.0/tests/generated/api/__init__.py +1 -0
- meraki_client-0.1.0/tests/generated/api/test_administered.py +21 -0
- meraki_client-0.1.0/tests/generated/api/test_appliance.py +488 -0
- meraki_client-0.1.0/tests/generated/api/test_camera.py +147 -0
- meraki_client-0.1.0/tests/generated/api/test_campus_gateway.py +31 -0
- meraki_client-0.1.0/tests/generated/api/test_cellular_gateway.py +94 -0
- meraki_client-0.1.0/tests/generated/api/test_devices.py +39 -0
- meraki_client-0.1.0/tests/generated/api/test_insight.py +25 -0
- meraki_client-0.1.0/tests/generated/api/test_licensing.py +26 -0
- meraki_client-0.1.0/tests/generated/api/test_networks.py +222 -0
- meraki_client-0.1.0/tests/generated/api/test_organizations.py +664 -0
- meraki_client-0.1.0/tests/generated/api/test_sensor.py +89 -0
- meraki_client-0.1.0/tests/generated/api/test_sm.py +80 -0
- meraki_client-0.1.0/tests/generated/api/test_spaces.py +17 -0
- meraki_client-0.1.0/tests/generated/api/test_switch.py +253 -0
- meraki_client-0.1.0/tests/generated/api/test_wireless.py +424 -0
- meraki_client-0.1.0/tests/generated/api/test_wireless_controller.py +174 -0
- meraki_client-0.1.0/tests/generated/conftest.py +87 -0
- meraki_client-0.1.0/tests/test_networks.py +50 -0
- meraki_client-0.1.0/uv.lock +1120 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Lint and format
|
|
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
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v7
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
run: uv python install
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: uv sync
|
|
26
|
+
|
|
27
|
+
- name: Check formatting
|
|
28
|
+
run: make format
|
|
29
|
+
|
|
30
|
+
- name: Run linter
|
|
31
|
+
run: make linter
|
|
32
|
+
|
|
33
|
+
- name: Run type checker
|
|
34
|
+
run: make typecheck
|
|
35
|
+
|
|
36
|
+
- name: Test building docs
|
|
37
|
+
run: make docs
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
id-token: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout code
|
|
15
|
+
uses: actions/checkout@v6
|
|
16
|
+
|
|
17
|
+
- name: Install uv
|
|
18
|
+
uses: astral-sh/setup-uv@v7
|
|
19
|
+
|
|
20
|
+
- name: Verify version matches tag
|
|
21
|
+
run: |
|
|
22
|
+
UV_VERSION=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
|
|
23
|
+
RELEASE_TAG=${{ github.event.release.tag_name }}
|
|
24
|
+
CLEAN_TAG=${RELEASE_TAG#v}
|
|
25
|
+
if [ "$UV_VERSION" != "$CLEAN_TAG" ]; then
|
|
26
|
+
echo "Version mismatch!"
|
|
27
|
+
echo "pyproject.toml version: $UV_VERSION"
|
|
28
|
+
echo "Release tag: $RELEASE_TAG"
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
- name: Build package
|
|
33
|
+
run: uv build
|
|
34
|
+
|
|
35
|
+
- name: Publish to PyPI
|
|
36
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
mkdocs:
|
|
4
|
+
configuration: mkdocs.yml
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
os: ubuntu-24.04
|
|
8
|
+
tools:
|
|
9
|
+
python: "3.11"
|
|
10
|
+
jobs:
|
|
11
|
+
pre_create_environment:
|
|
12
|
+
- asdf plugin add uv
|
|
13
|
+
- asdf install uv latest
|
|
14
|
+
- asdf global uv latest
|
|
15
|
+
create_environment:
|
|
16
|
+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
|
|
17
|
+
install:
|
|
18
|
+
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group dev
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## Unreleased
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial release of meraki-client
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Development Setup
|
|
4
|
+
|
|
5
|
+
This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
# Install dependencies
|
|
9
|
+
uv sync
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Code Generation
|
|
13
|
+
|
|
14
|
+
The SDK is auto-generated from Meraki's [OpenAPI specification](https://github.com/meraki/openapi). To regenerate the client code:
|
|
15
|
+
|
|
16
|
+
```shell
|
|
17
|
+
make generate VERSION=1.66.0
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This command:
|
|
21
|
+
|
|
22
|
+
1. Downloads the OpenAPI spec for the specified version
|
|
23
|
+
2. Generates the `meraki_client` package with sync and async clients
|
|
24
|
+
3. Generates Pydantic response schemas
|
|
25
|
+
4. Generates integration tests in `tests/generated/`
|
|
26
|
+
5. Formats all generated code
|
|
27
|
+
|
|
28
|
+
See [meraki/openapi releases](https://github.com/meraki/openapi/tags) for available API versions.
|
|
29
|
+
|
|
30
|
+
### Project Structure
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
meraki_client/ # Generated client library
|
|
34
|
+
codegen/ # Code generation
|
|
35
|
+
tests/
|
|
36
|
+
├── test_*.py # Manual tests
|
|
37
|
+
└── generated/ # Auto-generated tests
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Spec Overrides
|
|
41
|
+
|
|
42
|
+
Some endpoints have bugs in the OpenAPI spec. Workarounds are configured in `codegen/spec_overrides.toml`. The generator validates that overrides reference existing operations and logs warnings when the spec appears fixed.
|
|
43
|
+
|
|
44
|
+
## Testing
|
|
45
|
+
|
|
46
|
+
Tests require a Meraki API key with access to an organization:
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
export MERAKI_DASHBOARD_API_KEY_TESTS=your_api_key
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Optionally, specify test resources to avoid auto-discovery:
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
export ORGANIZATION_ID_TESTS=your_org_id
|
|
56
|
+
export NETWORK_ID_TESTS=your_network_id
|
|
57
|
+
export DEVICE_ID_TESTS=your_device_serial
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Running Tests
|
|
61
|
+
|
|
62
|
+
```shell
|
|
63
|
+
# Run read-only tests (safe)
|
|
64
|
+
make test
|
|
65
|
+
|
|
66
|
+
# Run mutating tests (creates/updates/deletes resources)
|
|
67
|
+
make test-mutating
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Writing Manual Tests
|
|
71
|
+
|
|
72
|
+
Manual tests for mutating operations should use the `mutating` marker:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import pytest
|
|
76
|
+
|
|
77
|
+
pytestmark = pytest.mark.mutating
|
|
78
|
+
|
|
79
|
+
def test_create_network() -> None:
|
|
80
|
+
# Test implementation
|
|
81
|
+
...
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Linting
|
|
85
|
+
|
|
86
|
+
```shell
|
|
87
|
+
# Run all checks (format, lint, typecheck, docs)
|
|
88
|
+
make lint
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
To auto-fix formatting issues:
|
|
92
|
+
|
|
93
|
+
```shell
|
|
94
|
+
uv run ruff format meraki_client codegen tests
|
|
95
|
+
uv run ruff check --fix meraki_client codegen tests
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Pull Requests
|
|
99
|
+
|
|
100
|
+
1. Fork the repository
|
|
101
|
+
2. Create a feature branch
|
|
102
|
+
3. Make your changes
|
|
103
|
+
4. Run `make lint` and `make test` (if possible)
|
|
104
|
+
5. Submit a pull request
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Cisco Systems, Inc. and/or its affiliates
|
|
4
|
+
Copyright (c) 2026 Olli Paakkunainen
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
color := $(shell tput setaf 2)
|
|
2
|
+
off := $(shell tput sgr0)
|
|
3
|
+
TARGETS = meraki_client codegen tests
|
|
4
|
+
|
|
5
|
+
.PHONY: lint
|
|
6
|
+
lint: format linter typecheck docs
|
|
7
|
+
|
|
8
|
+
.PHONY: test
|
|
9
|
+
test:
|
|
10
|
+
@printf '\n\n*****************\n'
|
|
11
|
+
@printf '$(color)Running tests$(off)\n'
|
|
12
|
+
@printf '*****************\n'
|
|
13
|
+
uv run pytest
|
|
14
|
+
|
|
15
|
+
.PHONY: test-mutating
|
|
16
|
+
test-mutating:
|
|
17
|
+
@printf '\n\n*****************\n'
|
|
18
|
+
@printf '$(color)Running mutating tests$(off)\n'
|
|
19
|
+
@printf '*****************\n'
|
|
20
|
+
uv run pytest -m mutating
|
|
21
|
+
|
|
22
|
+
.PHONY: typecheck
|
|
23
|
+
typecheck:
|
|
24
|
+
@printf '\n\n*****************\n'
|
|
25
|
+
@printf '$(color)Running type checker$(off)\n'
|
|
26
|
+
@printf '*****************\n'
|
|
27
|
+
uv run ty check ${TARGETS}
|
|
28
|
+
|
|
29
|
+
.PHONY: format
|
|
30
|
+
format:
|
|
31
|
+
@printf '\n\n*****************\n'
|
|
32
|
+
@printf '$(color)Running format$(off)\n'
|
|
33
|
+
@printf '*****************\n'
|
|
34
|
+
uv run ruff format --check ${TARGETS}
|
|
35
|
+
|
|
36
|
+
.PHONY: linter
|
|
37
|
+
linter:
|
|
38
|
+
@printf '\n\n*****************\n'
|
|
39
|
+
@printf '$(color)Running linter$(off)\n'
|
|
40
|
+
@printf '*****************\n'
|
|
41
|
+
uv run ruff check ${TARGETS}
|
|
42
|
+
|
|
43
|
+
.PHONY: generate
|
|
44
|
+
generate:
|
|
45
|
+
ifndef VERSION
|
|
46
|
+
$(error VERSION is required. Usage: make generate VERSION=1.66.0)
|
|
47
|
+
endif
|
|
48
|
+
@printf '\n\n*****************\n'
|
|
49
|
+
@printf '$(color)Generating SDK$(off)\n'
|
|
50
|
+
@printf '*****************\n'
|
|
51
|
+
@uv run python codegen/main.py -v $(VERSION)
|
|
52
|
+
|
|
53
|
+
.PHONY: docs
|
|
54
|
+
docs:
|
|
55
|
+
@printf '\n\n*****************\n'
|
|
56
|
+
@printf '$(color)Test building docs$(off)\n'
|
|
57
|
+
@printf '*****************\n'
|
|
58
|
+
uv run mkdocs build --strict
|
|
59
|
+
|
|
60
|
+
.PHONY: serve
|
|
61
|
+
serve:
|
|
62
|
+
uv run mkdocs serve --open --livereload
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: meraki-client
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python client for Meraki Dashboard API
|
|
5
|
+
Project-URL: homepage, https://github.com/ollipa/meraki-client-python
|
|
6
|
+
Project-URL: repository, https://github.com/ollipa/meraki-client-python
|
|
7
|
+
Author-email: Olli Paakkunainen <olli@paakkunainen.fi>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: cisco,dashboard,meraki
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: httpx<0.29.0,>=0.28.1
|
|
21
|
+
Requires-Dist: pydantic<3.0.0,>=2.12.5
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
<p align="center"><strong>Meraki Client</strong> <em>- Python client for Meraki Dashboard API.</em></p>
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://pypi.org/project/meraki-client/">
|
|
28
|
+
<img src="https://img.shields.io/pypi/v/meraki-client" alt="pypi">
|
|
29
|
+
</a>
|
|
30
|
+
<a href="https://github.com/ollipa/meraki-client-python/actions/workflows/ci.yml">
|
|
31
|
+
<img src="https://github.com/ollipa/meraki-client-python/actions/workflows/ci.yml/badge.svg" alt="ci">
|
|
32
|
+
</a>
|
|
33
|
+
<a href="https://meraki-client.readthedocs.io/">
|
|
34
|
+
<img src="https://img.shields.io/readthedocs/meraki-client" alt="documentation">
|
|
35
|
+
</a>
|
|
36
|
+
<a href="./LICENSE">
|
|
37
|
+
<img src="https://img.shields.io/pypi/l/meraki-client" alt="license">
|
|
38
|
+
</a>
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<hr>
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<a href="https://meraki-client.readthedocs.io/">
|
|
45
|
+
<b>Documentation</b>
|
|
46
|
+
</a>
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
<hr>
|
|
50
|
+
|
|
51
|
+
Python client for the [Meraki Dashboard API](https://developer.cisco.com/meraki/api-v1/). Auto-generated from the OpenAPI spec to stay current with the latest releases.
|
|
52
|
+
|
|
53
|
+
**Installation:**
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
pip install meraki-client
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Features
|
|
60
|
+
|
|
61
|
+
- Modern Python 3.11+ with full type annotations
|
|
62
|
+
- Sync and async clients built on httpx
|
|
63
|
+
- Pydantic models for requests and responses
|
|
64
|
+
- Automatic retries and pagination
|
|
65
|
+
- Full API coverage ([auto-generated from OpenAPI](https://github.com/meraki/openapi))
|
|
66
|
+
|
|
67
|
+
## Setup
|
|
68
|
+
|
|
69
|
+
1. Enable API access in your Meraki dashboard organization and [obtain an API key](https://documentation.meraki.com/Platform_Management/Dashboard_Administration/Operate_and_Maintain/How-Tos/Cisco_Meraki_Dashboard_API)
|
|
70
|
+
|
|
71
|
+
2. Pass the API key to the client, or set it as an environment variable:
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
client = MerakiClient(api_key="YOUR_KEY_HERE")
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```shell
|
|
78
|
+
export MERAKI_DASHBOARD_API_KEY=YOUR_KEY_HERE
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Application identification
|
|
82
|
+
|
|
83
|
+
Cisco Meraki recommends that ecosystem partners and application developers identify their application with API requests. See [User agents guide](https://developer.cisco.com/meraki/api-v1/user-agents-overview/#user-agents) for formatting details.
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
client = MerakiClient(caller="ApplicationName/1.0 VendorName")
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Or via environment variable:
|
|
90
|
+
|
|
91
|
+
```shell
|
|
92
|
+
export MERAKI_PYTHON_SDK_CALLER="ApplicationName/1.0 VendorName"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Usage
|
|
96
|
+
|
|
97
|
+
API calls follow the pattern `client.<scope>.<operation>()`, where scope maps to the OpenAPI tags (e.g., `organizations`, `networks`, `devices`).
|
|
98
|
+
|
|
99
|
+
### Synchronous
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from meraki_client import MerakiClient
|
|
103
|
+
|
|
104
|
+
client = MerakiClient()
|
|
105
|
+
org = client.organizations.get_organization(org_id)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Asynchronous
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from meraki_client.aio import AsyncMerakiClient
|
|
112
|
+
|
|
113
|
+
async with AsyncMerakiClient() as client:
|
|
114
|
+
orgs = await client.organizations.get_organization(org_id)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Contributing
|
|
118
|
+
|
|
119
|
+
Contributions are welcome! See [CONTRIBUTING.md](https://github.com/ollipa/meraki-client-python/blob/main/CONTRIBUTING.md) for development setup, testing, and code generation instructions.
|
|
120
|
+
|
|
121
|
+
## Disclaimer
|
|
122
|
+
|
|
123
|
+
This is an unofficial community project, not affiliated with or endorsed by Cisco. For the official Meraki Python SDK, see [meraki/dashboard-api-python](https://github.com/meraki/dashboard-api-python). This project was forked from the official Meraki Python SDK.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<p align="center"><strong>Meraki Client</strong> <em>- Python client for Meraki Dashboard API.</em></p>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://pypi.org/project/meraki-client/">
|
|
5
|
+
<img src="https://img.shields.io/pypi/v/meraki-client" alt="pypi">
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://github.com/ollipa/meraki-client-python/actions/workflows/ci.yml">
|
|
8
|
+
<img src="https://github.com/ollipa/meraki-client-python/actions/workflows/ci.yml/badge.svg" alt="ci">
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://meraki-client.readthedocs.io/">
|
|
11
|
+
<img src="https://img.shields.io/readthedocs/meraki-client" alt="documentation">
|
|
12
|
+
</a>
|
|
13
|
+
<a href="./LICENSE">
|
|
14
|
+
<img src="https://img.shields.io/pypi/l/meraki-client" alt="license">
|
|
15
|
+
</a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<hr>
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="https://meraki-client.readthedocs.io/">
|
|
22
|
+
<b>Documentation</b>
|
|
23
|
+
</a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<hr>
|
|
27
|
+
|
|
28
|
+
Python client for the [Meraki Dashboard API](https://developer.cisco.com/meraki/api-v1/). Auto-generated from the OpenAPI spec to stay current with the latest releases.
|
|
29
|
+
|
|
30
|
+
**Installation:**
|
|
31
|
+
|
|
32
|
+
```shell
|
|
33
|
+
pip install meraki-client
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Features
|
|
37
|
+
|
|
38
|
+
- Modern Python 3.11+ with full type annotations
|
|
39
|
+
- Sync and async clients built on httpx
|
|
40
|
+
- Pydantic models for requests and responses
|
|
41
|
+
- Automatic retries and pagination
|
|
42
|
+
- Full API coverage ([auto-generated from OpenAPI](https://github.com/meraki/openapi))
|
|
43
|
+
|
|
44
|
+
## Setup
|
|
45
|
+
|
|
46
|
+
1. Enable API access in your Meraki dashboard organization and [obtain an API key](https://documentation.meraki.com/Platform_Management/Dashboard_Administration/Operate_and_Maintain/How-Tos/Cisco_Meraki_Dashboard_API)
|
|
47
|
+
|
|
48
|
+
2. Pass the API key to the client, or set it as an environment variable:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
client = MerakiClient(api_key="YOUR_KEY_HERE")
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
export MERAKI_DASHBOARD_API_KEY=YOUR_KEY_HERE
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Application identification
|
|
59
|
+
|
|
60
|
+
Cisco Meraki recommends that ecosystem partners and application developers identify their application with API requests. See [User agents guide](https://developer.cisco.com/meraki/api-v1/user-agents-overview/#user-agents) for formatting details.
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
client = MerakiClient(caller="ApplicationName/1.0 VendorName")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or via environment variable:
|
|
67
|
+
|
|
68
|
+
```shell
|
|
69
|
+
export MERAKI_PYTHON_SDK_CALLER="ApplicationName/1.0 VendorName"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Usage
|
|
73
|
+
|
|
74
|
+
API calls follow the pattern `client.<scope>.<operation>()`, where scope maps to the OpenAPI tags (e.g., `organizations`, `networks`, `devices`).
|
|
75
|
+
|
|
76
|
+
### Synchronous
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from meraki_client import MerakiClient
|
|
80
|
+
|
|
81
|
+
client = MerakiClient()
|
|
82
|
+
org = client.organizations.get_organization(org_id)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Asynchronous
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from meraki_client.aio import AsyncMerakiClient
|
|
89
|
+
|
|
90
|
+
async with AsyncMerakiClient() as client:
|
|
91
|
+
orgs = await client.organizations.get_organization(org_id)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Contributing
|
|
95
|
+
|
|
96
|
+
Contributions are welcome! See [CONTRIBUTING.md](https://github.com/ollipa/meraki-client-python/blob/main/CONTRIBUTING.md) for development setup, testing, and code generation instructions.
|
|
97
|
+
|
|
98
|
+
## Disclaimer
|
|
99
|
+
|
|
100
|
+
This is an unofficial community project, not affiliated with or endorsed by Cisco. For the official Meraki Python SDK, see [meraki/dashboard-api-python](https://github.com/meraki/dashboard-api-python). This project was forked from the official Meraki Python SDK.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
meta {
|
|
2
|
+
name: Get Administered Licensing Subscription Entitlements
|
|
3
|
+
type: http
|
|
4
|
+
seq: 3
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
get {
|
|
8
|
+
url: {{baseUrl}}/administered/licensing/subscription/entitlements
|
|
9
|
+
body: none
|
|
10
|
+
auth: inherit
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
settings {
|
|
14
|
+
encodeUrl: true
|
|
15
|
+
timeout: 0
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
meta {
|
|
2
|
+
name: Get Organization Appliance Dns Local Profiles
|
|
3
|
+
type: http
|
|
4
|
+
seq: 1
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
get {
|
|
8
|
+
url: {{baseUrl}}/organizations/{{orgId}}/appliance/dns/local/profiles
|
|
9
|
+
body: none
|
|
10
|
+
auth: inherit
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
settings {
|
|
14
|
+
encodeUrl: true
|
|
15
|
+
timeout: 0
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
meta {
|
|
2
|
+
name: Get Organization Early Access Features Opt Ins
|
|
3
|
+
type: http
|
|
4
|
+
seq: 6
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
get {
|
|
8
|
+
url: {{baseUrl}}/organizations/{{orgId}}/earlyAccess/features/optIns
|
|
9
|
+
body: none
|
|
10
|
+
auth: inherit
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
settings {
|
|
14
|
+
encodeUrl: true
|
|
15
|
+
timeout: 0
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
meta {
|
|
2
|
+
name: Get Organization Wireless Ssids Open Roaming By Network
|
|
3
|
+
type: http
|
|
4
|
+
seq: 7
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
get {
|
|
8
|
+
url: {{baseUrl}}/organizations/{{orgId}}/wireless/ssids/openRoaming/byNetwork
|
|
9
|
+
body: none
|
|
10
|
+
auth: inherit
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
settings {
|
|
14
|
+
encodeUrl: true
|
|
15
|
+
timeout: 0
|
|
16
|
+
}
|