Skip to content

Latest commit

Β 

History

159 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ReZEN Python Client

PyPI version Python support License Coverage Documentation

The official Python client for the ReZEN Real Estate API

Build powerful real estate applications with comprehensive transaction management, agent networking, and team operations. Type-safe, production-ready, and extensively documented.

πŸš€ Quick Start

Install:

pip install rezen

Use:

from rezen import RezenClient

# Initialize client (reads REZEN_API_KEY from environment)
client = RezenClient()

# Search for active teams
teams = client.teams.search_teams(status="ACTIVE")

# Create a transaction
response = client.transaction_builder.create_transaction_builder()
transaction_id = response['id']

# Add property details
client.transaction_builder.update_location_info(transaction_id, {
    "address": "123 Main Street",
    "city": "San Francisco",
    "state": "CA",
    "zipCode": "94102"
})

πŸ“– Full Documentation | πŸš€ Quick Start Guide


✨ Key Features

Feature Description
🏠 Transaction Management Complete transaction lifecycle from creation to closing
πŸ‘₯ Agent & Team Operations Comprehensive search, network analysis, and team management
πŸ”’ Type-Safe & Robust Full type hints, comprehensive error handling, 100% test coverage
πŸ“š Well Documented Extensive docs with real-world examples and troubleshooting
⚑ Production Ready Battle-tested with retry logic, rate limiting, and connection pooling

🎯 Use Cases

Real Estate Transaction Processing

  • Property listings and transaction creation
  • Participant management (buyers, sellers, agents, service providers)
  • Financial operations (commissions, payments, escrow)
  • Document management and reporting

Agent Network Management

  • Agent discovery and search capabilities
  • Network analysis with sponsor trees and downlines
  • Team management and assignments
  • Performance tracking and analytics

System Integration

  • CRM integrations for customer management
  • Accounting systems for financial tracking
  • Workflow automation for process optimization

πŸ“Š API Coverage

API Section Endpoints Status
Transaction Builder 52 endpoints βœ… Complete
Transactions 49 endpoints βœ… Complete
Agents 36 endpoints βœ… Complete
Teams 2 endpoints βœ… Complete
Directory 16 endpoints βœ… Complete
Total 155 endpoints βœ… Complete

πŸ› οΈ Installation & Setup

Prerequisites

  • Python 3.8 or newer (CI-tested on Python 3.8 through 3.12)
  • ReZEN API key

Install the Package

With pip:

pip install rezen

With poetry:

poetry add rezen

Configure Authentication

Option 1: Environment Variable (Recommended)

export REZEN_API_KEY="your_api_key_here"

Option 2: Direct in Code

client = RezenClient(api_key="your_api_key_here")

Option 3: .env File

# .env
REZEN_API_KEY=your_api_key_here

πŸ’‘ Examples

Complete Transaction Workflow

from datetime import datetime, timedelta
from rezen import RezenClient

client = RezenClient()

# Create transaction
response = client.transaction_builder.create_transaction_builder()
transaction_id = response['id']

# Add property details
client.transaction_builder.update_location_info(transaction_id, {
    "address": "1234 Elm Street",
    "city": "San Francisco",
    "state": "CA",
    "zipCode": "94102"
})

# Set pricing and timeline
closing_date = (datetime.now() + timedelta(days=45)).strftime("%Y-%m-%d")
client.transaction_builder.update_price_and_date_info(transaction_id, {
    "purchase_price": 850000,
    "closing_date": closing_date
})

# Add participants
client.transaction_builder.add_buyer(transaction_id, {
    "first_name": "Alice",
    "last_name": "Johnson",
    "email": "alice@email.com"
})

# Submit for processing
client.transaction_builder.submit_transaction(transaction_id)

Agent Network Analysis

from rezen import RezenClient

client = RezenClient()

# Find agents in California
agents = client.agents.search_active_agents(
    state_or_province=["CALIFORNIA"],
    page_size=50
)

# Analyze agent networks
for agent in agents[:5]:
    agent_id = agent['id']

    # Get network statistics
    network_stats = client.agents.get_network_size_by_tier(agent_id)
    front_line = client.agents.get_front_line_agents_info(agent_id)

    print(f"Agent {agent['first_name']} {agent['last_name']}:")
    print(f"  Network tiers: {len(network_stats)}")
    print(f"  Front line agents: {len(front_line)}")

Directory Management

from rezen import RezenClient

client = RezenClient()

# Search for vendors
vendors = client.directory.search_vendors(
    page_number=0,
    page_size=20,
    roles=["TITLE_ESCROW", "LENDER"]
)

# Create and link contacts
person_data = {
    "firstName": "Jane",
    "lastName": "Smith",
    "emailAddress": "jane@example.com",
    "phoneNumber": "555-0123"
}

person = client.directory.create_person(person_data)
client.directory.link_person(person['id'], {"vendorId": "vendor-123"})

πŸ“š More Examples β†’

πŸ“– Documentation

Resource Description
πŸ“– Full Documentation Complete documentation site
πŸš€ Quick Start 5-minute setup guide
πŸ“‹ API Reference Complete API documentation
πŸ’‘ Examples Real-world usage patterns
πŸ”§ Troubleshooting Common issues and solutions

πŸ—οΈ Architecture

The ReZEN Python client follows modern Python best practices:

RezenClient
β”œβ”€β”€ TransactionBuilderClient  (52 endpoints)
β”œβ”€β”€ TransactionsClient        (49 endpoints)
β”œβ”€β”€ TeamsClient              (2 endpoints)
β”œβ”€β”€ AgentsClient             (36 endpoints)
└── DirectoryClient          (16 endpoints)

Design Principles:

  • 🎯 Simple Interface: Intuitive method names and clear parameters
  • πŸ”’ Type Safety: Complete type hints for excellent IDE support
  • ⚑ Performance: Efficient session management and connection pooling
  • πŸ›‘οΈ Reliability: Comprehensive error handling and retry mechanisms
  • πŸ“š Extensible: Clean architecture for easy customization

πŸ§ͺ Development

Setup Development Environment

# Clone the repository
git clone https://github.com/theperrygroup/rezen.git
cd rezen

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/macOS
# or venv\Scripts\activate  # Windows

# Install development dependencies
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

# Install docs dependencies if you plan to build the site locally
python -m pip install -r docs/requirements.txt

Run Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=rezen --cov-report=html

# Run specific test file
pytest tests/test_teams.py -v

Code Quality

# Match the default CI checks
black --check --diff --line-length=88 .
isort --check-only --diff --profile=black --line-length=88 .
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
mypy rezen/ --strict --ignore-missing-imports

Build Documentation

# Serve documentation locally
mkdocs serve

# Build documentation with the same strictness used for contributor checks
mkdocs build --strict

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for workflow details and the repository STYLE_GUIDE.md for code conventions.

Quick Contribution Steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with tests
  4. Run the test suite (pytest)
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

Get Help

Status & Monitoring


Ready to build powerful real estate applications? Get Started β†’

Built with ❀️ by The Perry Group

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages