Skip to main content

ServiceAPI, a base class for APIs which talk to a service, typically a web service via HTTP.

Latest release 20230703: Retry logic for requests.

An instance of a ServiceAPI embodies some basic features that feel common to web based services:

  • a notion of a login
  • local state, an SQLTags for data about entities of the service
  • downloads, if that is a thing, with FSTags for file annotations

Class HTTPServiceAPI(ServiceAPI, cs.resources.MultiOpenMixin, cs.context.ContextManagerMixin)

HTTPServiceAPI base class for other APIs talking to HTTP services.

Subclasses must define:

  • API_BASE: the base URL of API calls. For example, the PlayOnAPI defines this as f'https://{API_HOSTNAME}/v3/'.

Class RequestsNoAuth(requests.auth.AuthBase)

This is a special purpose subclass of requests.auth.AuthBase to apply no authorisation at all. This is for services with their own special purpose authorisation and avoids things like automatic netrc based auth.

Class ServiceAPI(cs.resources.MultiOpenMixin, cs.context.ContextManagerMixin)

SewrviceAPI base class for other APIs talking to services.

Release Log

Release 20230703: Retry logic for requests.

Release 20230217: Initial release.

Release files for cs-service-api 20230703

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

Source distribution (sdist)

Source distribution for cs-service-api 20230703
File Size Uploaded
cs.service_api-20230703.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cs-service-api 20230703
File Interpreter ABI Platform
cs.service_api-20230703-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / cs.service_api-20230703.tar.gz

Download URL cs.service_api-20230703.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
87c5adb73d73b758a73a5a478974e2b18f5e18c058f2c316ac99fbb4c9c21e7e
BLAKE2b-256 checksum
How to use checksums
eed1da238ec11f814af0ce2183f00b0875406eec70c39ffa6a3267acb6c6aec5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / cs.service_api-20230703-py3-none-any.whl

Download URL cs.service_api-20230703-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85bac8a742dd2449339bd1ccf7d571149d204daa7f59a19d12f1d6db2708d89d
BLAKE2b-256 checksum
How to use checksums
471f9a1fbc333dbdb5b45c72d620593cac7182bb4e820c416fc2f81424e82d1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

20230703 This release

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