Skip to main content

APIMatic Portal Artifacts API SDK

Built with APIMatic License: MIT Python 3.10+

The APIMatic Portal Artifacts API SDK for Python provides access to the APIMatic Portal Artifacts API REST APIs from Python applications.

Generate the artifacts an APIMatic API Portal needs (SDKs, code samples, getting started guides and, optionally, a context plugin) from a Portal Build Input, asynchronously.

The generation flow is:

  1. Upload your build directory as a zip file using Generate Portal Artifacts Async. You get back an id and links to check the status and download the artifacts.
  2. Poll Get Portal Artifacts Generation Status until generation completes, or pass the X-APIMatic-CallbackUrl header in step 1 to be notified instead.
  3. Download the generated artifacts using Download Generated Portal Artifacts.

Installation

To install the Python SDK from PyPI, with whichever package manager your project uses:

pip install automated-package-publishing-sdk
uv add automated-package-publishing-sdk
poetry add automated-package-publishing-sdk

To install from the SDK source instead, give the tool a path containing a slash — a bare folder name is looked up on PyPI, and resolves to whatever project holds that name there:

pip install <path-to-sdk>

Quick Start

Synchronous client

Construct ApiMaticPortalArtifactsApiClient with keyword arguments, and call close() when you are done. Every argument is optional; the full list is in the SDK map.

from api_matic_portal_artifacts_api import ApiMaticPortalArtifactsApiClient

client = ApiMaticPortalArtifactsApiClient(authorization="YOUR_API_KEY", environment="production")

# TODO: call endpoints here -- see api-reference.md

client.close()

Alternatively, scope it -- with ApiMaticPortalArtifactsApiClient(...) as client: closes the pool on exit; see Best Practices.

Client is exported as an alias of ApiMaticPortalArtifactsApiClient, so from api_matic_portal_artifacts_api import Client also works.

The SDK accepts every model-typed input in two interchangeable spellings, both type-checked: the typed model, or a plain dict with the same keys -- the OrDict and Model | ModelDict unions in the SDK map. Pick whichever suits the call site: the dict form needs no import, while the model form adds a keyword-checked constructor and editor completion.

Asynchronous client

AsyncApiMaticPortalArtifactsApiClient mirrors ApiMaticPortalArtifactsApiClient with identical method names, and every endpoint method is a coroutine. It takes the same arguments, with some differences -- for example, the transport argument is custom_async_http_client.

from asyncio import run

from api_matic_portal_artifacts_api import AsyncApiMaticPortalArtifactsApiClient


async def main() -> None:
    client = AsyncApiMaticPortalArtifactsApiClient(authorization="YOUR_API_KEY", environment="production")
    # TODO: call endpoints here, awaiting each -- see api-reference.md
    await client.aclose()


run(main())

Alternatively, scope it -- async with AsyncApiMaticPortalArtifactsApiClient(...) as client: closes the pool on exit. Only the async spelling is aclose, matching httpx; see Best Practices.

AsyncClient is the exported alias. Each client accepts only its own transport argument; passing the other's is a TypeError at runtime and an error under mypy.


Usage

Two generated references cover the SDK; each answers a different question:

Reference For
API Reference Usage guidance for a single parsed operation: client.<group>.<operation>(...) returns the typed payload and raises ApiError on any non-2xx, with .error the typed error body, or RawError for a status the operation does not document.
Raw API Reference The same for the raw variant: client.<group>.with_raw_response.<operation>(...) returns ApiResult[T, E] and never raises for an API error.

Both API references carry every one of the 8 operations, with a sync and an async sample and a parameter table each.

SDK map

This SDK ships a generated SDK map -- sdk-map.md -- a deterministic, lookup-oriented table of contents of the SDK's Python surface, generated by APIMatic alongside this SDK.

Consult the map before scanning or grepping the source: it answers call-level contract questions by lookup, and for anything it does not carry -- model shapes, enum values, an endpoint's route or behavioural prose -- it names the one source file to read. How to read the map itself, including the SDK-wide defaults its rows rely on, is stated at the top of sdk-map.md.

Best Practices

Match the disposal to the client's lifetime: an application-lifetime client is closed once at shutdown with close() / aclose(); where the lifetime fits a block, with ApiMaticPortalArtifactsApiClient() as client: / async with AsyncApiMaticPortalArtifactsApiClient() as client: releases it automatically. Both are idempotent, but a closed client is not reusable: the next call raises. The client closes whatever transport it holds, including one you supplied via custom_http_client / custom_async_http_client; if you intend to reuse your own transport across clients, don't hand its lifetime to a with block.

License

This SDK is distributed under the MIT License.


Support

Refer to the API reference for detailed information on available operations with code samples.

For further assistance, please contact support at contactus@apimatic.io.


Metadata

Release files for automated-package-publishing-sdk 7.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for automated-package-publishing-sdk 7.1.0
File Size Uploaded
automated_package_publishing_sdk-7.1.0.tar.gz 114.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for automated-package-publishing-sdk 7.1.0
File Interpreter ABI Platform
automated_package_publishing_sdk-7.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 272.8 kB

Release files / automated_package_publishing_sdk-7.1.0.tar.gz

Download URL automated_package_publishing_sdk-7.1.0.tar.gz
Size 114.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dc9292cb8ab9b845aab380ea97360ba102480669c83e5f0eede3cc47ecd69b07
BLAKE2b-256 checksum
How to use checksums
ebe2a7e028d5a1d16d11cae3f3e42e50e28a5d5a7fdcbfaf812e982a0e341309
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.15 Linux/6.1.158.2-microsoft-standard

Release files / automated_package_publishing_sdk-7.1.0-py3-none-any.whl

Download URL automated_package_publishing_sdk-7.1.0-py3-none-any.whl
Size 158.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe77ae3caf166a46c4bc94325ad8286d064bf40b6cb38cbe437268d995ef0824
BLAKE2b-256 checksum
How to use checksums
56a0a578ed7bd29f1cfcd24bcfa17fd555e60bf6ca0b3aab35b12eede1e101c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.15 Linux/6.1.158.2-microsoft-standard

Release history Release notifications | RSS feed

This release

7.1.0 This release

2 release files

2.0.4

2 release files

1.0.44

2 release files

1.0.42

2 release files

1.0.41

2 release files

1.0.40

2 release files

1.0.38

2 release files

1.0.37

2 release files

1.0.36

2 release files

1.0.34

2 release files

1.0.32

2 release files

1.0.31

2 release files

1.0.30

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.27

2 release files

1.0.23

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.7

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page