A Python client library for interacting with AutoCare Association databases and services.
- OAuth2 authentication with automatic token refresh
- Database and table listing
- Record fetching with pagination support
- Comprehensive error handling and logging
- Type safety with dataclasses
- Context manager support
pip install autocaregit clone https://github.com/TranstarIndustries/autocare-python.git
cd autocare-python
uv sync --all-extrasfrom autocare.client import AutoCareAPI
# Initialize client
with AutoCareAPI(
client_id="your_client_id",
client_secret="your_client_secret",
username="your_username",
password="your_password"
) as client:
# List databases
databases = client.list_databases()
# List tables
tables = client.list_tables("VCdb")
# Fetch records
records = client.fetch_all_records("VCdb", "Make")
# Or iterate with pagination
for record in client.fetch_records("VCdb", "BaseVehicle", limit=1000):
print(record)list_databases()- List available databaseslist_tables(db_name)- List tables in a databasefetch_records(db_name, table_name, limit=None, page_size=None)- Fetch records with paginationfetch_all_records(db_name, table_name)- Fetch all records as a listvalidate_credentials()- Validate API credentials
DatabaseInfo- Database metadataTableInfo- Table metadataAPIResponse- API response wrapper
AuthenticationError- Authentication failuresAPIConnectionError- Connection issuesAPIResponseError- API error responsesDataValidationError- Data validation failures
# Install dev dependencies
just dev-sync
# Install pre-commit hooks
just install-hooksjust validate # Run all checks (format, lint, test)
just format # Format code
just lint # Run linting
just test # Run testsSet environment variables or use parameters:
AUTOCARE_CLIENT_ID=your_client_id
AUTOCARE_CLIENT_SECRET=your_client_secret
AUTOCARE_USERNAME=your_username
AUTOCARE_PASSWORD=your_password- Python 3.13+
- Valid AutoCare API credentials
MIT License