A set of tools for connecting and processing data for Annex Brands, featuring API pack and ship quoting.
Project description
ABConnect
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
- Documentation: https://abconnecttools.readthedocs.io/
- Repository: https://github.com/AnnexBrands/ABConnectTools
- Issue Tracker: https://github.com/AnnexBrands/ABConnectTools/issues
- PyPI: https://pypi.org/project/ABConnect/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abconnect-0.1.9.tar.gz.
File metadata
- Download URL: abconnect-0.1.9.tar.gz
- Upload date:
- Size: 152.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b7335e9731d59313c4b7be6c52de0d479a2dac7869f34d16906a238a32699ca
|
|
| MD5 |
ebd66a7c4cc78a79238db15baaa09534
|
|
| BLAKE2b-256 |
1a00c4d9772040b5c888a8d1e1d01c0bf7abe5d7acc476ed6f84ff00dea17313
|
Provenance
The following attestation bundles were made for abconnect-0.1.9.tar.gz:
Publisher:
workflow.yml on AnnexBrands/ABConnectTools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abconnect-0.1.9.tar.gz -
Subject digest:
5b7335e9731d59313c4b7be6c52de0d479a2dac7869f34d16906a238a32699ca - Sigstore transparency entry: 232352577
- Sigstore integration time:
-
Permalink:
AnnexBrands/ABConnectTools@b8912f5b7ffdb7a4a54a2b2ca0649b81b502c135 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/AnnexBrands
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@b8912f5b7ffdb7a4a54a2b2ca0649b81b502c135 -
Trigger Event:
push
-
Statement type:
File details
Details for the file abconnect-0.1.9-py3-none-any.whl.
File metadata
- Download URL: abconnect-0.1.9-py3-none-any.whl
- Upload date:
- Size: 193.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0bd872a95176d28a7e4985b2ff7ae37b92ab0e449fec11d3f1bc1b657a3d02d
|
|
| MD5 |
f14886f229861d624c3ed96a41f0631a
|
|
| BLAKE2b-256 |
ef78b826ab3e105ac51be7a304f35b65957912922eda578dc43eeaa96c4ab0ff
|
Provenance
The following attestation bundles were made for abconnect-0.1.9-py3-none-any.whl:
Publisher:
workflow.yml on AnnexBrands/ABConnectTools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abconnect-0.1.9-py3-none-any.whl -
Subject digest:
d0bd872a95176d28a7e4985b2ff7ae37b92ab0e449fec11d3f1bc1b657a3d02d - Sigstore transparency entry: 232352578
- Sigstore integration time:
-
Permalink:
AnnexBrands/ABConnectTools@b8912f5b7ffdb7a4a54a2b2ca0649b81b502c135 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/AnnexBrands
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@b8912f5b7ffdb7a4a54a2b2ca0649b81b502c135 -
Trigger Event:
push
-
Statement type: