Skip to main content

aside-ads-client (Python)

Client for Aside, the self-hosted ad server for AI chat apps. Standard library only, Python 3.9+. MIT licensed.

pip install aside-ads-client        # or: pip install ./sdks/python
from aside_ads_client import AsideClient

aside = AsideClient("http://127.0.0.1:8000", api_key="aside_pub_...")

ad = aside.get_sponsored(
    context=[{"role": "user", "content": "my postgres queries are slow"}],
    user_id=session_id,  # optional, hashed by the server, used for frequency caps
    placement="chat-sidebar",
)
if ad:
    # Render BESIDE the model's answer, never inside it:
    # ad.label ("Sponsored"), ad.headline, ad.body, ad.cta, link to ad.url (signed click URL)
    aside.track_impression(ad)  # server-side; or let the browser fetch ad.impression_url

Behaviour:

  • Returns None when there is no relevant ad, the context is sensitive, or anything fails (timeout default 0.8 s). Pass raise_errors=True to get exceptions instead.
  • aside.last_reason holds the server's reason for the last empty result (debugging only).
  • AsyncAsideClient has the same methods as coroutines (runs the stdlib client in a thread).

Metadata

Release files for aside-ads-client 0.3.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 aside-ads-client 0.3.0
File Size Uploaded Provenance Actions
aside_ads_client-0.3.0.tar.gz 5.7 kB With provenance Details for aside_ads_client-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aside-ads-client 0.3.0
File Interpreter ABI Platform Actions
aside_ads_client-0.3.0-py3-none-any.whl Python 3 none any Details for aside_ads_client-0.3.0-py3-none-any.whl

Total release size: 10.6 kB

Release files / aside_ads_client-0.3.0.tar.gz

Download URL aside_ads_client-0.3.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7ad5bd1c904a2a026bf07687550aa5778a043df672db76eb593e04a7a558f3de
BLAKE2b-256 checksum
How to use checksums
f2f6eb8d9850b2c15734fc288ced556c2e322c86cd6bc6ca213e791e58c15419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / aside_ads_client-0.3.0-py3-none-any.whl

Download URL aside_ads_client-0.3.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
476696169967bf39b3e3f1104422539be262c3498b31e50da5c216b31447fdfa
BLAKE2b-256 checksum
How to use checksums
5f91249ff65339f394d507688b303927b1a824132d5028d34f1b504bc13b869a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for aside-ads-client 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aside_ads_client-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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