Skip to main content

No project description provided

Project description

OAMP-APIBASE

Build Status PyPI version License

These are abstract API Clients to be used to contact external API Services

There are Three Clients supported:

  • HTTPClient

The HTTPClient is a simple client that can be used to make HTTP requests to an API. It uses the httpx library to make the requests, and so returns a rich object as the response. This object can be used to access the response data, headers, and status code.

  • HTTPProxyClient

The HTTPProxyClient is a client that can be used to make HTTP requests to an API through a proxy. It supports both HTTP (not reccommended) and HTTPS proxies, and can be used to make requests to APIs that require a proxy to be used. If the proxy requires authentication, the client can be configured to use a username and password.

  • HttpProxyTokenClient

The HttpProxyTokenClient is a client that can be used to make HTTP requests to an API through a proxy, and that requires a token to be passed in the headers.

Installation

pip install oamp-apibase

Usage

The Response Object

The response object returned by the clients is an instance of the httpx.Response class.

This object has the following attributes:

  • status_code: The status code of the response
  • reason_phrase: The reason phrase of the response
  • headers: A dictionary of the response headers

Testing

License

This project is licensed under the MIT License - see the LICENSE file for details

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Copyright

This project is Copyright (c) 2025 by Mike Simkins, All Rights Reserved

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oamp_apibase-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oamp_apibase-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file oamp_apibase-0.1.0.tar.gz.

File metadata

  • Download URL: oamp_apibase-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for oamp_apibase-0.1.0.tar.gz
Algorithm Hash digest
SHA256 346ad2363710a2ce9231a57e4c7551a40cf6c2503e3bd15a5471c349e88eab3e
MD5 7d9c605bb97e5bdd640b569052c06356
BLAKE2b-256 e187fd8e63cac7ae0382dc0405035f9cb77cc00f5f547d2be783a9c3b58dc2dd

See more details on using hashes here.

File details

Details for the file oamp_apibase-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: oamp_apibase-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for oamp_apibase-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49b29695ed52181748f89c62ac6968e43cccf2764148c7934f852389553bccf0
MD5 65f64123fc496e83bff7b46b92b617d3
BLAKE2b-256 1a999a72c90e362e58f854f5187b4a03d36cde333d59a5183c0e7db43c46955c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page