Skip to content

This project contains core logic and the utilities for the APIMatic's Python SDK

License

Notifications You must be signed in to change notification settings

apimatic/core-lib-python

Repository files navigation

apimatic-core

PyPI Tests Test Coverage Licence

Introduction

The APIMatic Core libraries provide a stable runtime that powers all the functionality of SDKs. This includes functionality like the ability to create HTTP requests, handle responses, apply authentication schemes, convert API responses back to object instances, and validate user and server data.

Installation

You will need Python 3.7-3.11 to support this package.

Simply run the command below to install the core library in your SDK. The core library will be added as a dependency your SDK.

pip install apimatic-core

API Call Classes

Name Description
RequestBuilder A builder class used to build an API Request
APICall A class used to create an API Call object
ResponseHandler Used to handle the response returned by the server

Authentication

Name Description
HeaderAuth A class supports HTTP authentication through HTTP Headers
QueryAuth A class supports HTTP authentication through query parameters
AuthGroup A helper class to support multiple authentication operation
And A helper class to support AND operation between multiple authentication types
Or A helper class to support OR operation between multiple authentication types
Single A helper class to support single authentication

Configurations

Name Description
EndpointConfiguration A class which hold the possible configurations for an endpoint
GlobalConfiguration A class which hold the global configuration properties to make a successful Api Call

Decorators

Name Description
LazyProperty A decorator class for lazy instantiation

Exceptions

Name Description
OneOfValidationException An exception class for the failed validation of oneOf (union-type) cases
AnyOfValidationException An exception class for the failed validation of anyOf (union-type) cases
AuthValidationException An exception class for the failed validation of authentication schemes

Factories

Name Description
HttpResponseFactory A factory class to create an HTTP Response

HTTP

Name Description
HttpCallBack A factory class to create an HTTP Response
HttpClientConfiguration A class used for configuring the SDK by a user
HttpRequest A class which contains information about the HTTP Response
ApiResponse A wrapper class for Api Response
HttpResponse A class which contains information about the HTTP Response

Logging Configuration

Name Description
ApiLoggingConfiguration Holds overall logging configuration for logging an API call
ApiRequestLoggingConfiguration Holds logging configuration for API request
ApiResponseLoggingConfiguration Holds logging configuration for API response

Logger

Name Description
SdkLogger Responsible for logging the request and response of an API call, it represents the default implementation of ApiLogger when there exist any logging configuration
NoneSdkLogger Represents the default implementation for ApiLogger when no logging configuration is provided
ConsoleLogger Represents the default implementation for Logger when no custom implementation is provided
LoggerFactory Responsible for providing the ApiLogger implementation (SdkLogger | NoneSdkLogger) based on the logging configuration

Types

Name Description
SerializationFormats An Enumeration of Array serialization formats
DateTimeFormat An Enumeration of Date Time formats
ErrorCase A class to represent Exception types
FileWrapper A wrapper to allow passing in content type for file uploads
Parameter A class to represent information about a Parameter passed in an endpoint
XmlAttributes A class to represent information about a XML Parameter passed in an endpoint
OneOf A class to represent information about OneOf union types
AnyOf A class to represent information about AnyOf union types
LeafType A class to represent the case information in an OneOf or AnyOf union type

Utilities

Name Description
ApiHelper A Helper Class with various functions associated with making an API Call
AuthHelper A Helper Class with various functions associated with authentication in API Calls
ComparisonHelper A Helper Class used for the comparison of expected and actual API response
FileHelper A Helper Class for files
XmlHelper A Helper class that holds utility methods for xml serialization and deserialization.
DateTimeHelper A Helper class that holds utility methods for validation of different datetime formats.
UnionTypeHelper A Helper class that holds utility methods for deserialization and validation of OneOf/AnyOf union types.

Links

About

This project contains core logic and the utilities for the APIMatic's Python SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages