Python SDK and CLI tool for interacting with the CareDaily API platform.
CareDaily | Just Watch It Work | Getting Started | Explore the docs | Sign Up
The CareDaily Python SDK provides a comprehensive interface to the CareDaily cloud platform (powered by People Power Company). It offers both programmatic access through Python classes and a command-line interface for managing smart home devices, user accounts, locations, and AI-powered services.
This package enables developers to:
- Build applications that integrate with CareDaily services
- Manage user authentication and authorization
- Control and monitor IoT devices
- Access AI and machine learning capabilities
- Manage administrative tasks and analytics
# Install the package
pip install caredaily
# Initialize your configuration
caredaily configure init
# Test connectivity
caredaily pingInstall from PyPI (when published):
pip install caredailyOr install from source:
git clone https://github.com/peoplepower/python-core.git
cd python-core
pip install -e ".[dev]"Before using the SDK or CLI, you need to configure your credentials:
# Initialize configuration (creates ~/.caredaily/config and ~/.caredaily/credentials)
caredaily configure init
# Set up a profile interactively
caredaily configure interactive --profile myprofile
# Or use environment variable to specify profile
export CAREDAILY_PROFILE=myprofileYour configuration files will be stored in ~/.caredaily/:
config: Hostname, SSL settings, proxy configurationcredentials: API keys (kept separate for security)
# Check cloud connectivity
caredaily cloud-connectivity --check-availability
# Login with username and password
caredaily login --username myuser --password mypass
# Get cloud version
caredaily cloud-connectivity --version
# Use a specific profile
caredaily --profile production pingfrom caredaily import CareDaily, Authentication, CloudConnectivity
# Initialize with default profile
client = CareDaily()
# Or use a specific profile
client = CareDaily(profile="production")
# Check cloud connectivity
result = client.app_api(CloudConnectivity).check_availability()
print(result.data)
# Login with credentials
auth_result = client.app_api(Authentication).login_by_username(
username="myuser",
password="mypass"
)
print(auth_result.data)
# Access different API types
from caredaily import Locations, Devices
# Get user information
user_information = client.app_api(UserAccounts).get_user_information()
# Get devices
devices = client.app_api(Devices).get_devices()from caredaily import CareDaily, Locations
client = CareDaily()
locations_api = client.app_api(Locations)
# Get all locations for the user
result = locations_api.get_user_information()
for location in result.data.get('locations', []):
print(f"Location: {location['name']}")from caredaily import CareDaily, Devices
client = CareDaily()
devices_api = client.app_api(Devices)
# Get all devices
result = devices_api.get_devices()
for device in result.data.get('devices', []):
print(f"Device: {device['id']} - {device['type']}")from caredaily import CareDaily, Users, Organizations
client = CareDaily() # Must use admin API key
# Get organization users
users_api = client.admin_api(Users)
result = users_api.get_users(organizationId=123)
# Get organization details
orgs_api = client.admin_api(Organizations)
result = orgs_api.get_organization(organizationId=123)For development setup and testing:
# Install with development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run tests with coverage
pytest --cov=caredaily --cov-report=html
# Run linter
ruff check src/
# Format code
ruff format src/CareDaily provides several API documentation resources to help you build and integrate with the platform:
- Cloud API Docs Comprehensive reference for the main CareDaily cloud API, including endpoints for device management, user accounts, locations, and core platform services.
- Admin API Docs Documentation for administrative APIs, covering organization management, user administration, analytics, and advanced configuration options for enterprise use.
- Bots API Docs Details on the Bots API, which enables automation, custom bot creation, and integration with CareDaily's AI-powered services for smart home and IoT workflows.
-
Ask and answer questions on StackOverflow using the caredaily-python tag
-
Help find and fix issues by reporting bugs.
-
Have a new idea? Have a suggestion? Request a feature to get our attention.
Interested in contributing? Check out our CONTRIBUTING.md to find resources around contributing along with a detailed guide on how to set up a development environment.