🐍 PyBob SDK
📦 Installation
# Using uv
uv add pybob-sdk
# Using pip
pip install pybob-sdk
🚀 Quick Start
1. Set up credentials
export BOB_SERVICE_ACCOUNT_ID="your_service_account_id"
export BOB_SERVICE_ACCOUNT_TOKEN="your_service_account_token"
Or create a .env file:
BOB_SERVICE_ACCOUNT_ID=your_id
BOB_SERVICE_ACCOUNT_TOKEN=your_token
2. Use the SDK
import asyncio
from pybob_sdk import Bob
async def main():
async with Bob() as bob:
# Search for employees
results = await bob.people.search(
fields=["root.id", "root.fullName", "root.email"],
filters=[{
"fieldPath": "root.email",
"operator": "equals",
"values": ["anakin.skywalker@company.com"]
}]
)
for employee in results.employees:
print(f"{employee.full_name} - {employee.email}")
asyncio.run(main())
🔐 Authentication
The SDK supports multiple authentication methods:
Credentials are automatically loaded from environment variables or .env files:
from pybob_sdk import Bob
async with Bob() as bob:
...
Alternatively explicit credentials:
bob = Bob(
service_account_id="YOUR_ID",
service_account_token="YOUR_TOKEN",
)
📚 API Reference
👥 People API
# Search employees
results = await bob.people.search(
fields=["root.id", "root.fullName", "root.email"],
filters=[{
"fieldPath": "root.department",
"operator": "equals",
"values": ["Engineering"]
}]
)
# Get public profiles
profiles = await bob.people.get_public_profiles()
# Get employee by ID
employee = await bob.people.get("123456789")
📊 Employee Tables API
# Get employment history
history = await bob.employee_tables.get_employment_history("123456789")
for entry in history:
if entry.working_pattern and entry.working_pattern.days:
days = entry.working_pattern.days
print(f"Monday: {days.monday} hours")
# Get work history
work_history = await bob.employee_tables.get_work_history("123456789")
🏖️ Time Off API
# Get who's out today
out_today = await bob.time_off.get_whos_out_today()
for person in out_today:
print(f"{person.name} - {person.policy_type}")
# Get policy types
policy_types = await bob.time_off.get_policy_types()
✅ Tasks API
# Get all open tasks
tasks = await bob.tasks.get_open_tasks()
# Get employee tasks
employee_tasks = await bob.tasks.get_employee_tasks("123456789")
# Complete a task
await bob.tasks.complete_task("task_123")
📈 Reports API
# Get all reports
reports = await bob.reports.get_reports()
# Download a report
data = await bob.reports.download_report_by_id("report_123")
🎯 Onboarding API
# Get onboarding wizards
wizards = await bob.onboarding.get_wizards()
for wizard in wizards:
print(f"{wizard.name} (ID: {wizard.id})")
📋 Metadata API
# Get employee fields
fields = await bob.metadata.get_fields()
# Get company lists
lists = await bob.metadata.get_lists()
# Get specific list
departments = await bob.metadata.get_list("department")
💼 Job Catalog API
# Get job roles
roles = await bob.job_catalog.get_roles()
# Get job families
families = await bob.job_catalog.get_families()
# Search job profiles
profiles = await bob.job_catalog.search_profiles()
🛠️ Development
Setup
git clone https://github.com/kurtismassey/pybob.git
cd pybob
uv sync --all-extras
Code Quality
# Linting
ruff check .
# Formatting
ruff format .
# Type checking
mypy pybob_sdk
Release files for pybob-sdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybob_sdk-1.0.0.tar.gz | 49.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybob_sdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 92.3 kB
Release files / pybob_sdk-1.0.0.tar.gz
| Download URL | pybob_sdk-1.0.0.tar.gz |
|---|---|
| Size | 49.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f313f4be9f3f461983634dd69ed6921908cc092cf056f47350c429ad5198d84f
|
|
BLAKE2b-256 checksum How to use checksums |
0ae28e0283660583b7d5b0c84762531258538e675c8ccf1de28b158e4dd343f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pybob_sdk-1.0.0-py3-none-any.whl
| Download URL | pybob_sdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 43.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad0e37ae7dd1b3f2b849ff78bf31ae45d9eb8f7e5c227286caa4ed119de3d68f
|
|
BLAKE2b-256 checksum How to use checksums |
6cb6af6b02c409a5973d017107eb684f8ca0c79b5bd4a11da93cee907c9f3d97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|