matter-api-client
Table of Contents
Background
The Matter API Client Library in Python is a comprehensive tool for making HTTP/HTTPS API calls to other web services. It is designed to simplify the process of making API calls and handling the responses. The library supports both synchronous and asynchronous operations, allowing developers to choose the best approach for their use case.
One of the key features of the library is its ability to send JSON payloads, making it easy to work with APIs that require JSON data. It also automatically parses JSON responses, saving developers time and effort.
The library is designed with reliability in mind. It includes built-in error handling to catch client connection errors and throw exceptions when necessary. This ensures that developers can quickly identify and fix issues that may arise during API calls.
To further improve reliability, the library includes auto-retry functionality. This means that if an API call fails due to a network issue or other transient error, the library will automatically retry the call. This helps to ensure that the application can continue to function even in the face of occasional network disruptions.
Overall, the Python API Client Library is a powerful and flexible tool that can help developers to quickly and easily integrate with a wide range of APIs. With support for JSON payloads, automatic parsing of responses, error handling, and auto-retries, it is a reliable and robust solution for any project that requires API integration.
Installation
pip install matter-api-client
Also, make sure to set the following ENV variables:
SERVER_LOG_LEVEL=debug or info or error
Usage
Sync API Calls:
Get:
from matter_api_client.http_client import get
result = get(url="some url")
Post:
from matter_api_client.http_client import post
result = post(url="some url", payload=payload, headers=headers)
Put:
from matter_api_client.http_client import put
result = put(url="some url", payload=payload, headers=headers)
Delete:
from matter_api_client.http_client import delete
result = delete(url="some url", payload=payload, headers=headers)
Async API Calls:
Get:
from matter_api_client.http_client_async import get
result = await get(url="some url")
Post:
from matter_api_client.http_client_async import post
result = await post(url="some url", payload=payload, headers=headers)
Put:
from matter_api_client.http_client_async import put
result = await put(url="some url", payload=payload, headers=headers)
Delete:
from matter_api_client.http_client_async import delete
result = await delete(url="some url", payload=payload, headers=headers)
Contributing
Make sure you have all supported python versions installed in your machine:
- 3.10
- 3.11
Install hatch in your system
https://hatch.pypa.io/latest/install/
Create the environment
hatch env create
Do your changes...
Run the tests
hatch run test
The command above will run the tests against all supported python versions installed in your machine. For testing in other operating system you may use the configured CI in github.
Bump a new version
In general, you just need to execute:
hatch version
This command will update the minor version. i.e.: No breaking changes and new feature has been added
We are using semantic version, if you are doing a bug fix:
hatch version fix
Github workflows
If you want to reuse fully the github actions defined by this template make sure your workflow permissions for Actions settings is configured as followed:
Metadata
Release files for matter-api-client 1.2.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 | Actions Reset |
|---|---|---|---|---|
| matter_api_client-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for matter_api_client-1.2.0-py3-none-any.whl |
Release files / matter_api_client-1.2.0-py3-none-any.whl
| Download URL | matter_api_client-1.2.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c771bddae4278c61d47752b671644925955ae98e087a395083f55d0600ef499f
|
|
BLAKE2b-256 checksum How to use checksums |
26079da23424e9c33b0819987923f8601c9316176ffe7f4d309cf627e6b2a18d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for matter-api-client 1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.