vertodigital
Official Python client for VertoDigital's public agent API. Every endpoint is anonymous, so there's no API key to set up. No runtime dependencies, just the Python standard library.
Install
pip install vertodigital
Usage
from vertodigital import Client
client = Client()
client.health()
# {'status': 'ok', 'service': 'vertodigital-agent-api', ...}
# One page of case studies
page = client.case_studies(limit=10)
for cs in page["items"]:
print(f'{cs["name"]}: {cs["stat"]}')
# Or every case study, paginated for you
urls = [cs["url"] for cs in client.iter_case_studies()]
# Any page on vertodigital.com as markdown
print(client.page("about"))
print(client.llms_txt())
# The OpenAPI 3.1 spec
list(client.openapi()["paths"])
# Submit a contact enquiry on behalf of a user
client.contact(
from_name="Ada Lovelace",
from_email="ada@example.com",
organization="Analytical Engines Ltd",
topic="services", # assessment, services, partnership, press, careers, general
message="We'd like to discuss a marketing analytics engagement.",
)
contact sends an Idempotency-Key automatically. If you retry after a timeout, pass the same idempotency_key= again so the enquiry is only recorded once.
Requests go to the pinned /agent/v1/* paths by default. Pass api_version=None to use the unversioned /agent/* paths.
Errors
vertodigital.APIErrorfor any non-2xx response. It carriesstatusandbody.vertodigital.RateLimitError(a subclass) on 429. It addsretry_afterin seconds.vertodigital.ValidationErrorwhen input fails validation before a request is sent.
All three inherit from vertodigital.VertoDigitalError. Rate limits and the full API reference are at vertodigital.com/developers.
Changelog
- 0.1.0 - First release:
health,case_studies/iter_case_studies,contact,openapi,llms_txt,page.
Publishing (maintainers)
From this directory:
python3 -m pip install --upgrade build twine
python3 -m build
python3 -m twine upload dist/*
Bump __version__ in src/vertodigital/_version.py and add a changelog entry on every release. Upload with a PyPI API token (username __token__).
Metadata
Release files for vertodigital 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vertodigital-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / vertodigital-0.1.0-py3-none-any.whl
| Download URL | vertodigital-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85c16f5e67abfa7a5e1fb0f302b66623a39ebcfa6f01201a621e2e94770c3bdd
|
|
BLAKE2b-256 checksum How to use checksums |
f5c32c1437da53fab16dd53f2ebc5c42dfa2434505a4747c523383c3e07d30a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|