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
Nonewhen there is no relevant ad, the context is sensitive, or anything fails (timeout default 0.8 s). Passraise_errors=Trueto get exceptions instead. aside.last_reasonholds the server's reason for the last empty result (debugging only).AsyncAsideClienthas the same methods as coroutines (runs the stdlib client in a thread).
Metadata
Release files for aside-ads-client 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aside_ads_client-0.2.0.tar.gz | 5.6 kB | With provenance | Details for aside_ads_client-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aside_ads_client-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for aside_ads_client-0.2.0-py3-none-any.whl |
Total release size: 10.6 kB
Release files / aside_ads_client-0.2.0.tar.gz
| Download URL | aside_ads_client-0.2.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07e2eaccac0141b4709198daeeb8923e0c58ca349ad88497fe25cbfaea0d3a04
|
|
BLAKE2b-256 checksum How to use checksums |
7558cfe6e395554b7f1602db08acb6a446c1a464d726850537a4b184e4b8f32c
|
| 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 3, 2026.
Transparency logRelease files / aside_ads_client-0.2.0-py3-none-any.whl
| Download URL | aside_ads_client-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3806f69500a5a0d33f69220edd9001e75527c74e137d2b93e676f1182ae54e77
|
|
BLAKE2b-256 checksum How to use checksums |
2d45a364d060853ba3c7e73e8b777d94892dd7088261e46c46508eaf264c8d93
|
| 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 3, 2026.
Transparency logSecurity for aside-ads-client 0.2.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.
Attestation for aside_ads_client-0.2.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 3, 2026.
Transparency logA 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.