Docs/Getting Started/Quickstart

Django

Connect to vacation rental data from Django using the Repull Python SDK.

1

Prerequisites

Python 3.8+ installed on your machine.

You also need a Repull API key. Get one from your dashboard.

2

Install

pip install repull-sdk
3

Set up environment variables

Add your credentials to a .env file in your project root:

REPULL_API_KEY=sk_test_YOUR_KEY
REPULL_WORKSPACE_ID=YOUR_WORKSPACE_ID

Start with sk_test_ keys for sandbox data. Switch to sk_live_ when you are ready for production.

4

Make your first API call

Set up the client with your API key, then call any endpoint. The example below lists properties and fetches reservations.

# views.py
import os
import requests

REPULL_API_KEY = os.environ['REPULL_API_KEY']
BASE = 'https://api.repull.dev'

def list_properties(request):
    r = requests.get(f'{BASE}/v1/properties', headers={
        'Authorization': f'Bearer {REPULL_API_KEY}',
    })
    return JsonResponse(r.json())

def airbnb_reservations(request):
    r = requests.get(f'{BASE}/v1/reservations', headers={
        'Authorization': f'Bearer {REPULL_API_KEY}',
    }, params={'platform': 'airbnb', 'status': 'confirmed'})
    return JsonResponse(r.json())
AI