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.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 aside-ads-client 0.1.0
File Size Uploaded Provenance Actions
aside_ads_client-0.1.0.tar.gz 5.6 kB With provenance Details for aside_ads_client-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.6 kB

Release files / aside_ads_client-0.1.0.tar.gz

Download URL aside_ads_client-0.1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5c16dd2aa4c831d02d0fddcd4cbd252e6f3cc56cc190928d67026ae5724981c7
BLAKE2b-256 checksum
How to use checksums
c4e7f25df6bd3fe70514dae083c66b46124c423cdcfb803a863935dd280bdfad
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 1, 2026.

Transparency log

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

Download URL aside_ads_client-0.1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b1a04669f9ab57a04102e611607b2418470df81c781d92ab31d70509c30a757
BLAKE2b-256 checksum
How to use checksums
2b97ddd31255e79c72b4ee8dc21e9cbae56e1b5f4424fbd5201dc11b2aab2ac4
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 1, 2026.

Transparency log

Security for aside-ads-client 0.1.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.1.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 1, 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