transend-python
Python Client for the Transend APIs
Installation
From PyPI (Recommended)
pip install transend
From Source
# Clone the repository
git clone https://github.com/TranstarIndustries/transend-python.git
cd transend-python
# Install dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .
Usage
from src.client import TransendAPIClient
# Initialize with your API credentials
api_key = "your_api_key_here"
api_token = "your_api_token_here"
client = TransendAPIClient(api_key, api_token)
# Example calls
sort_types = client.product.get_all_sort_types()
branches = client.branch.get_all_branches()
dtcs = client.vehicle.get_all_dtcs()
print(sort_types, branches, dtcs)
# Vehicle lookup
vhid = client.vehicle.get_year_make_model_vhid(2010, "Toyota", "Camry")
vehicle = client.vehicle.get_vehicle_by_vhid(vhid["vhid"])
print(vehicle)
Available APIs
- ProductAPI: Access product information, sorting options, and tags
- BranchAPI: Get branch details and listings
- VehicleAPI: Look up vehicles by VIN, year/make/model, and access vehicle details
- AccountAPI: Manage customer accounts, bank accounts, and credit cards
- ContentAPI: Retrieve articles and resources
- CoreAPI: Access core information
- CustomerAPI: Get user information
Running Tests
We use pytest for testing. To run the tests:
# Run all tests
python -m pytest
# Run with verbose output
python -m pytest -v
# Run a specific test file
python -m pytest tests/test_vehicle_api.py
# Run with coverage report
python -m pytest --cov=src --cov-report=term
Continuous Integration
This project uses GitHub Actions to automatically run tests on every push and pull request. The workflow runs tests on multiple Python versions (3.8, 3.9, 3.10, 3.11) to ensure compatibility.
You can view the test results in the "Actions" tab of the GitHub repository.
Release Process
This package uses GitHub Actions to automatically publish to PyPI when a new release is created:
- Update the version number in
setup.py - Create a new release on GitHub:
- Go to the repository's "Releases" section
- Click "Draft a new release"
- Choose or create a tag in the format
v{version}(e.g.,v0.1.0) - Add a title and release notes
- Click "Publish release"
- The GitHub Actions workflow will automatically:
- Build the package
- Verify the package contents
- Upload the package to PyPI
Setting up PyPI publishing
For the PyPI publishing to work, a PyPI API token needs to be added to the repository secrets:
- Create an API token in your PyPI account settings
- Add the token as a repository secret named
PYPI_API_TOKENin your GitHub repository settings
Metadata
Release files for transend 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| transend-0.1.1.tar.gz | 11.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| transend-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / transend-0.1.1.tar.gz
| Download URL | transend-0.1.1.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e728de2cc7e8b252caaa616ccfe5e82504fd68a921e6f16e1669ca075c008c4
|
|
BLAKE2b-256 checksum How to use checksums |
c008f1103c4e7bdfc8e3f5669d3b2aaf36256124b347d9edc454315f54355a71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.11
|
Release files / transend-0.1.1-py3-none-any.whl
| Download URL | transend-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e267f80271ff73eb3ffb93be730a85419db05f382c45629cf9d6c33d82038bc
|
|
BLAKE2b-256 checksum How to use checksums |
517fb2be60952eddfa3d9d43b8042569d60269cffbcb2d41e2e2abddc29064ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.11
|
Security for transend 0.1.1
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.