Skip to main content

Python wrapper for The Real Brokerage ReZEN API - Transaction Builder, Transactions, Teams, Agents, and Directory management

Project description

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 higher
  • 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 dependencies
pip install -r requirements-dev.txt

# Install in development mode
pip install -e .

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

# Format code
black .

# Sort imports
isort .

# Type checking
mypy rezen/

# Linting
flake8 rezen/

Build Documentation

# Serve documentation locally
mkdocs serve

# Build documentation
mkdocs build

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rezen-2.2.4.tar.gz (140.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rezen-2.2.4-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file rezen-2.2.4.tar.gz.

File metadata

  • Download URL: rezen-2.2.4.tar.gz
  • Upload date:
  • Size: 140.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for rezen-2.2.4.tar.gz
Algorithm Hash digest
SHA256 512c1b67f4481227de4e8ac8fb13c6d11887f9f3b4b0c66668afdb85fbfeb2be
MD5 0e9d77e3cdc063657b1688f1aec2242c
BLAKE2b-256 63558294897ad9f86c2ee5bc6a0a9282a595b20c40314d75fe19cc2f3d8dddec

See more details on using hashes here.

File details

Details for the file rezen-2.2.4-py3-none-any.whl.

File metadata

  • Download URL: rezen-2.2.4-py3-none-any.whl
  • Upload date:
  • Size: 52.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for rezen-2.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 30f817319137a7a7a37f7f102ef5057598926a81092b3b9aa9199f4e4f79708a
MD5 3b13140dd690e97c73a21b3471070d2d
BLAKE2b-256 74a30f71cfa74b2e3eb0307e1eeb498218ca46b94f0184d431998d18b3e076d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page