Ready-to-Run Examples
Complete, runnable examples from the SDK repository.
The SDK includes a collection of ready-to-run examples in the /examples directory.
Task Management
Basic Operations
create_task.py- Basic task creationedit_task.py- Update existing tasksget_tasks.py- Query and filter tasksget_task.py- Get single task by ID
Tasks with Files
create_task_with_files.py- Tasks with file attachmentscreate_task_with_file.py- Single file attachmentcreate_task_with_external_file.py- Attach files from URLsedit_task_with_files.py- Update task filescreate_task_with_description_and_files.py- Description + files
Documents
Basic Operations
get_documents.py- List documents by scope (Space/Member/Project)create_document.py- Create new documentsedit_document.py- Edit document metadata (e.g., title)get_document.py- Get single documentreplace_document.py- Replace document content with plain textreplace_json_document.py- Replace document content with rich JSON (document structure format)replace_json_document_complex.py- Complex document with nested lists, inline code, links, and morereplace_json_document_with_helpers.py- Type-safe content creation using document structure helper functionsreplace_json_document_with_table.py- Creating documents with tables for status reports and metricsappend_json_document.py- Appending content to existing documents (incremental updates)
Advanced Workflows
document_hierarchy.py- Build nested document structuresdocument_content_management.py- Work with document contentadvanced_document_workflows.py- Complex document scenariosmention_blocks.py- Create documents with user, task, document, and milestone mentionsadvanced_mention_usage.py- Advanced usage of mentions in tables, lists, and complex documentsdocument_navigation_blocks.py- TOC, Anchors, and Siblings navigation blocksdocument_with_code_blocks.py- Code blocks with syntax highlightingembed_blocks_example.py- Embed external content (YouTube, Figma, CodeSandbox, etc.)
Custom Fields
create_board_custom_field.py- Add custom fields to boardsedit_board_custom_field.py- Modify custom fieldscustom_field_helpers_usage.py- Using helper functionsadvanced_custom_field_management.py- Complex custom field workflowscreate_task_with_multi_select_custom_field.py- Multi-select fields
Files & Comments
File Upload
upload_file.py- Upload files from diskupload_file_from_url.py- Download and upload from URL
Comments
post_comment.py- Add comments to documentscomment_files.py- Comments with file attachments
Milestones & Projects
Milestones
create_milestone.py- Create milestonesedit_milestone.py- Update milestonesget_milestone.py- Get single milestoneget_milestones.py- List all milestonestoggle_milestone.py- Attach/detach milestones to tasks
Projects
get_project.py- Get single projectget_projects.py- List all projects
Boards
get_board.py- Get single boardget_boards.py- List all boardscreate_board_type.py- Create board types (Bug, Feature, etc.)edit_board_type.py- Modify board typescreate_board_group.py- Create board groups (columns)edit_board_group.py- Modify board groups
Other
get_profile.py- Get current user profileget_space.py- Get space informationget_space_members.py- Get all space membersget_history.py- Get change historytest_helpers.py- Test helper functionstest_caching_simple.py- Test caching behaviortest_auth_error.py- Test authentication errors
Running the Examples
1. Clone the repository:
git clone https://github.com/vaizcom/vaiz-python-sdk.git
cd vaiz-python-sdk
2. Install dependencies:
pip install -e .
pip install python-dotenv
3. Configure environment:
cp example.env .env
# Edit .env with your credentials
4. Run an example:
cd examples
python create_task.py
Example Configuration
All examples use config.py for shared configuration:
# examples/config.py
import os
from dotenv import load_dotenv
from vaiz import VaizClient
load_dotenv()
client = VaizClient(
api_key=os.getenv("VAIZ_API_KEY"),
space_id=os.getenv("VAIZ_SPACE_ID")
)
# Fetch dynamic IDs
profile = client.get_profile()
projects = client.get_projects()
boards = client.get_boards()
member_id = profile.profile.member_id
project_id = projects.projects[0].id if projects.projects else None
board_id = boards.boards[0].id if boards.boards else None
See Also
- Environment Setup - Configure your environment
- Common Patterns - Essential patterns
- Real-World Scenarios - Complete use cases