Package: matter-api-client
matter-api-clientTable of ContentsInstallationLicenseBackgroundThe 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.Installationpip install matter-api-clientAlso, make sure to set the following ENV variables:SERVER_LOG_LEVEL=debug or info or errorUsageSync API Calls:Get:frommatter_api_client.http_clientimportgetresult=get(url="some url")Post:frommatter_api_client.http_clientimportpostresult=post(url="some url",payload=payload,headers=headers)Put:frommatter_api_client.http_clientimportputresult=put(url="some url",payload=payload,headers=headers)Delete:frommatter_api_client.http_clientimportdeleteresult=delete(url="some url",payload=payload,headers=headers)Async API Calls:Get:frommatter_api_client.http_client_asyncimportgetresult=awaitget(url="some url")Post:frommatter_api_client.http_client_asyncimportpostresult=awaitpost(url="some url",payload=payload,headers=headers)Put:frommatter_api_client.http_client_asyncimportputresult=awaitput(url="some url",payload=payload,headers=headers)Delete:frommatter_api_client.http_client_asyncimportdeleteresult=awaitdelete(url="some url",payload=payload,headers=headers)ContributingMake sure you have all supported python versions installed in your machine:3.103.11Install hatch in your systemhttps://hatch.pypa.io/latest/install/Create the environmenthatch env createDo your changes...Run the testshatch run testThe 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 versionIn general, you just need to execute:hatch versionThis command will update the minor version. i.e.:
No breaking changes and new feature has been addedWe are usingsemantic version, if you are doing a bug fix:hatch version fixGithub workflowsIf you want to reuse fully the github actions defined by this template make sure yourworkflow permissions for Actionssettings is configured as followed: