Skip to main content

Python Client for the Transend Automotive Tech APIs

Project description

transend-python

Python Tests PyPI Version PyPI Downloads

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:

  1. Update the version number in setup.py
  2. 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"
  3. 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:

  1. Create an API token in your PyPI account settings
  2. Add the token as a repository secret named PYPI_API_TOKEN in your GitHub repository settings

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

transend-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distributions

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

transend-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

transend-0.1.0-py2.py3-none-any.whl (3.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file transend-0.1.0.tar.gz.

File metadata

  • Download URL: transend-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for transend-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55dcf5b4eb0c152774d208d24bbf854729c3e451c2c6001b3d44bf4fee5b176b
MD5 6aa8cb2c5076195927e201fb94b1bc83
BLAKE2b-256 bcf5b131d48ee5259c6a10125bbf72ef28c06e267241f2515541c1481760ec81

See more details on using hashes here.

File details

Details for the file transend-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: transend-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for transend-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 035b5e8e40689f80999e39468efdb16fc2ba07ec837e04a3adb82adf9c6315ae
MD5 bf107238f0142f0d69ef6e70c35ebb84
BLAKE2b-256 d141b0589756e802f3d76027b16a6cd22b8fd3b3b1068740a78c18dce11e8987

See more details on using hashes here.

File details

Details for the file transend-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: transend-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for transend-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 63d7ae5a7b59be1206c83a589c39d258833d240a5b8c316d04591e47dd4b77df
MD5 b8844801983be39758e3f5d02750272b
BLAKE2b-256 85b124ddd63af129cf49dcbbb52bfb11583453c035dc569e1cfa54fd9b6eb2ef

See more details on using hashes here.

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