Skip to main content

Ups0authCode Python SDK 1.0.0

Welcome to the Ups0authCode SDK documentation. This guide will help you get started with integrating and using the Ups0authCode SDK in your project.

Versions

  • API version: 1.0
  • SDK version: 1.0.0

About the API

The UPS OAuth Authorization Code API helps integrate UPS services into your business application for providing the service your application grants your customers. For example, you can create UPS shipping labels with shipping rates for merchants from within your application. Since your application will not have access to your customer's UPS login credentials, the OAuth authorization code flow is used to let your customer use their UPS credentials, within your application, in a simple and secure way. Key Business Values: - Enhanced Transaction Security: The OAuth Authorization Code flow is more secure and reliable since the access token and the refresh token are never exposed in the browser's URL, thus reducing the risk of leakage or theft. - Operational Efficiency: With the ability to obtain a refresh token when the token expires, your application can maintain a long-term and uninterrupted access to the protected resources, without requiring the user to re-authenticate or re-login. Overview of steps in OAuth Authorization Code flow: (1) When user selects Login, the client application redirects to the authorization server's /authorize endpoint. (2) The Authorization Server authenticates the user by asking for their login credentials, and after successful login, the authorization server responds back to the application with an authorization code contained within a redirection URI. (3) The application then sends the authorization code and the redirection URI to the authorization server's /oauth/token endpoint. (4) The authorization server's /token endpoint verifies the authorization code and the application's client ID contained in the redirect URI, and responds with a with an access token, as well as a refresh token. (5) The Client application uses the access token to request information from an UPS API. https://developer.ups.com/api/reference/oauth/authorization-code

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: Python >= 3.7

Installation

To get started with the SDK, we recommend installing using pip:

pip install ups-0auth-auth-code

Authentication

Basic Authentication

The Ups0authCode API uses Basic Authentication.

You need to provide your username and password when initializing the SDK.

Setting the Username and Password

When you initialize the SDK, you can set the username and password as follows:

Ups0authCode(
    username="YOUR_USERNAME",
    password="YOUR_PASSWORD"
)

If you need to set or update the username and password after initializing the SDK, you can use:

sdk.set_basic_auth("YOUR_USERNAME", "YOUR_PASSWORD")

Services

The SDK provides various services to interact with the API.

Below is a list of all available services with links to their detailed documentation:
Name
AuthorizeService
TokenService
RefreshService

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models with links to their detailed documentation:
Name Description
GenerateTokenRequest
GenerateTokenSuccessResponse
RefreshTokenRequest
RefreshTokenSuccessResponse

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.

Metadata

Release files for ups-0auth-auth-code 1.0.0

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

Source distribution (sdist)

Source distribution for ups-0auth-auth-code 1.0.0
File Size Uploaded Provenance Actions
ups-0auth-auth-code-1.0.0.tar.gz 18.6 kB Without provenance Details for ups-0auth-auth-code-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ups-0auth-auth-code 1.0.0
File Interpreter ABI Platform Actions
ups_0auth_auth_code-1.0.0-py3-none-any.whl Python 3 none any Details for ups_0auth_auth_code-1.0.0-py3-none-any.whl

Total release size: 51.3 kB

Release files / ups-0auth-auth-code-1.0.0.tar.gz

Download URL ups-0auth-auth-code-1.0.0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cb6c002d09a838097599a7987bef93cedc9e116001808e36805164ce78c34313
BLAKE2b-256 checksum
How to use checksums
6ca8389f08399e2538b732e3b69e5b80c5c7de0cdb0420eef6f46e91d8401a40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Release files / ups_0auth_auth_code-1.0.0-py3-none-any.whl

Download URL ups_0auth_auth_code-1.0.0-py3-none-any.whl
Size 32.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72812581edd558c4665c8e5ef1a1565f7c854c979f953a3d773aa497b631477b
BLAKE2b-256 checksum
How to use checksums
022ce081cebab954c163eb21b8e4e86714b5cf9903ffd3fe0894292f8dbf2b5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.17

Security for ups-0auth-auth-code 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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