Skip to main content

A set of tools for connecting and processing data for Annex Brands, featuring API pack and ship quoting.

Project description

ABConnect

Documentation Status PyPI version Python Support

ABConnect is a Python package that provides a collection of tools for connecting and processing data for Annex Brands. It includes modules for quoting, building, and loading data from various file formats (CSV, JSON, XLSX), with a focus on handling unsupported characters and encoding issues seamlessly.

Table of Contents

Features

New in v0.1.8

  • Generic Endpoint System: Automatic access to all 223+ API endpoints without manual implementation
  • Fluent Query Builder: Build complex API queries with method chaining
  • Pydantic Models: Type-safe response models with automatic validation

Core Features

  • API Request Builder: Assemble dynamic API requests using static JSON templates and runtime updates.
  • Quoter Module: Retrieve and parse quotes from the ABC API in both Quick Quote (qq) and Quote Request (qr) modes.
  • Robust Data Loading: Supports CSV, JSON, and XLSX files with built-in encoding and character handling.
  • Full API Client: Comprehensive API client with authentication and endpoint-specific methods.

Installation

You can install ABConnect using pip:

pip install ABConnect

For more detailed installation instructions and documentation, visit https://abconnecttools.readthedocs.io/

Configuration

Environment Variables

ABConnect requires the following environment variables for authentication:

# Create a .env file with your credentials
ABCONNECT_USERNAME=your_username
ABCONNECT_PASSWORD=your_password
ABC_CLIENT_ID=your_client_id
ABC_CLIENT_SECRET=your_client_secret

# Optional: Set environment (defaults to production)
ABC_ENVIRONMENT=staging  # or 'production'

Using Different Environments

ABConnect supports both staging and production environments:

from ABConnect.api import ABConnectAPI

# Use staging environment
api = ABConnectAPI(env='staging')

# Use production environment (default)
api = ABConnectAPI()

# Environment can also be set via ABC_ENVIRONMENT variable

Testing Configuration

For testing, create a .env.staging file with staging credentials:

cp ABConnect/dotenv.sample .env.staging
# Edit .env.staging with your staging credentials

Tests will automatically use .env.staging when running with pytest.

Documentation

Full documentation is available at https://abconnecttools.readthedocs.io/

Development

To contribute to ABConnect, clone the repository and install in development mode:

git clone https://github.com/AnnexBrands/ABConnectTools.git
cd ABConnectTools
pip install -e .[dev]

Run tests with:

pytest

License

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

Links

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

abconnect-0.1.8.tar.gz (137.8 kB view details)

Uploaded Source

Built Distribution

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

abconnect-0.1.8-py3-none-any.whl (168.8 kB view details)

Uploaded Python 3

File details

Details for the file abconnect-0.1.8.tar.gz.

File metadata

  • Download URL: abconnect-0.1.8.tar.gz
  • Upload date:
  • Size: 137.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for abconnect-0.1.8.tar.gz
Algorithm Hash digest
SHA256 10a4f2767f9700859219371318796e09740fc30b3d5f1339e3a7b5d3259b9470
MD5 bd39558be4824d131a144489b7690b28
BLAKE2b-256 9f380217dadf3023ef99bc4495712c9c57f37beafdb1c4a610140a6ac6f55dce

See more details on using hashes here.

Provenance

The following attestation bundles were made for abconnect-0.1.8.tar.gz:

Publisher: workflow.yml on AnnexBrands/ABConnectTools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file abconnect-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: abconnect-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 168.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for abconnect-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 30632270ee5ba5b4c75f9fbccba992ac576439b34b94f6c0da416d5fd09ed658
MD5 565e09d4b3bd3c4aba5ccb89c0ead4ba
BLAKE2b-256 b275472973932278ffef05dad51c274a6c5b8eac01b139b4a0f96f34f523872a

See more details on using hashes here.

Provenance

The following attestation bundles were made for abconnect-0.1.8-py3-none-any.whl:

Publisher: workflow.yml on AnnexBrands/ABConnectTools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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