Bloomy - Python SDK for Bloom Growth API
A Python SDK for interacting with the Bloom Growth API, providing easy access to users, meetings, todos, goals, scorecards, issues, and headlines.
✨ New in v0.21.0: Improved internal architecture with reusable mixins and enhanced bulk operation performance!
Installation
pip install bloomy-python
Quick Start
Synchronous Client
from bloomy import Client
# Initialize the client with your API key
client = Client(api_key="your-api-key-here")
# Or use environment variable BG_API_KEY
client = Client()
# Or configure API key with username and password
from bloomy import Configuration
config = Configuration()
config.configure_api_key("username", "password", store_key=True)
client = Client()
Asynchronous Client
import asyncio
from bloomy import AsyncClient
async def main():
# Use async client for better performance
async with AsyncClient(api_key="your-api-key-here") as client:
user = await client.user.details()
meetings = await client.meeting.list()
print(f"Hello {user.name}, you have {len(meetings)} meetings")
asyncio.run(main())
Features
Users
# Get current user details
user = client.user.details()
# Get user with direct reports and positions
user = client.user.details(user_id=123, include_all=True)
# Search users
results = client.user.search("john")
# List all users
users = client.user.list()
Meetings
# List meetings
meetings = client.meeting.list()
# Get meeting details
meeting = client.meeting.details(meeting_id=123)
# Create a meeting
new_meeting = client.meeting.create(
title="Weekly Team Meeting",
attendees=[456, 789]
)
# Delete a meeting
client.meeting.delete(meeting_id=123)
# Get multiple meetings by ID (batch read)
result = client.meeting.get_many([123, 456, 789])
for meeting in result.successful:
print(f"{meeting.name} - {meeting.meeting_date}")
# Handle any failed retrievals
for error in result.failed:
print(f"Failed to get meeting: {error.error}")
Todos
# List todos for current user
todos = client.todo.list()
# Create a todo
new_todo = client.todo.create(
title="Complete project proposal",
meeting_id=123,
due_date="2024-12-31"
)
# Complete a todo
client.todo.complete(todo_id=456)
# Update a todo
client.todo.update(
todo_id=456,
title="Updated title",
due_date="2024-12-25"
)
Goals (Rocks)
# List goals
goals = client.goal.list()
# Create a goal
new_goal = client.goal.create(
title="Increase sales by 20%",
meeting_id=123,
user_id=456
)
# Update goal status
client.goal.update(goal_id=789, status="on") # on, off, or complete
# Archive a goal
client.goal.archive(goal_id=789)
Scorecard
# Get current week
week = client.scorecard.current_week()
# List scorecard items
scorecards = client.scorecard.list(meeting_id=123)
# Update a score
client.scorecard.score(measurable_id=456, score=95.5)
Issues
# List issues
issues = client.issue.list()
# Create an issue
new_issue = client.issue.create(
meeting_id=123,
title="Server performance degradation"
)
# Solve an issue
client.issue.solve(issue_id=456)
Headlines
# List headlines
headlines = client.headline.list(meeting_id=123)
# Create a headline
new_headline = client.headline.create(
meeting_id=123,
title="Product launch successful",
notes="Exceeded targets by 15%"
)
# Update a headline
client.headline.update(headline_id=456, title="Updated headline")
# Delete a headline
client.headline.delete(headline_id=456)
Configuration
The SDK supports multiple ways to provide your API key:
- Direct initialization: Pass the API key when creating the client
- Environment variable: Set
BG_API_KEYin your environment - Configuration file: Store the API key in
~/.bloomy/config.yaml - Dynamic configuration: Use username/password to fetch and store the API key
# Using configuration file
config = Configuration()
config.configure_api_key("username", "password", store_key=True)
Error Handling
The SDK raises specific exceptions for different error scenarios:
from bloomy.exceptions import BloomyError, ConfigurationError, AuthenticationError, APIError
try:
client.user.details()
except AuthenticationError:
print("Invalid API key")
except APIError as e:
print(f"API error: {e.message}, Status: {e.status_code}")
except BloomyError as e:
print(f"General error: {e}")
Development
This SDK uses:
- uv for package management
- ruff for formatting and linting
- pyright for type checking
- pytest for testing
To set up the development environment:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync --all-extras
# Run tests
uv run pytest
# Format code
uv run ruff format .
# Run linting
uv run ruff check . --fix
# Type checking
uv run pyright
Requirements
- Python 3.12+
- httpx
- pyyaml
- pydantic
Metadata
Release files for bloomy-python 0.22.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bloomy_python-0.22.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / bloomy_python-0.22.0-py3-none-any.whl
| Download URL | bloomy_python-0.22.0-py3-none-any.whl |
|---|---|
| Size | 54.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab3dc47d91b49ef8135096e85fc31e9e75b3669f6e5d5d32054720b9c2ed3006
|
|
BLAKE2b-256 checksum How to use checksums |
4f9d7c57b47f83af28ababeeb028677170c28505df9f46bd868bbabe8726b973
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.0
|
Security for bloomy-python 0.22.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.