
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
opentable-rest-client
Advanced tools
A Python client library for the OpenTable REST API - search, book, and manage restaurant reservations
A Python client library for the OpenTable REST API. Search restaurants, check availability, book reservations, and manage your dining experiences programmatically.
pip install opentable-rest-client
from opentable_client.client import Client
from opentable_client.models import UserCreate, SearchRequest
from opentable_client.api.production import register_user_production_auth_register_post
from opentable_client.api.default import search_restaurants_search_post
# Initialize client
client = Client(base_url="https://apparel-scraper--opentable-rest-api-fastapi-app.modal.run")
# Register a test user
user_data = UserCreate(
first_name="John",
last_name="Doe",
phone_number="5551234567"
)
user_response = register_user_production_auth_register_post.sync_detailed(
client=client,
body=user_data,
x_org_key="your-org-key"
)
user = user_response.parsed
print(f"Registered: {user.email}")
# Create authenticated client
auth_client = Client(
base_url="https://apparel-scraper--opentable-rest-api-fastapi-app.modal.run",
headers={
"Authorization": f"Bearer {user.api_token}",
"X-Org-Key": "your-org-key"
}
)
# Search for restaurants
search_request = SearchRequest(
location="New York, NY",
restaurant_name="italian",
party_size=2
)
restaurants = search_restaurants_search_post.sync(
client=auth_client,
body=search_request,
x_org_key="your-org-key"
)
print(f"Found {len(restaurants)} restaurants")
import asyncio
from opentable_client.api.default import search_restaurants_search_post
async def search_async():
restaurants = await search_restaurants_search_post.asyncio(
client=auth_client,
body=search_request,
x_org_key="your-org-key"
)
return restaurants
restaurants = asyncio.run(search_async())
This client provides access to all OpenTable REST API endpoints:
The client requires:
# Basic client (for registration only)
client = Client(base_url="https://your-api-endpoint.com")
# Authenticated client (for all operations)
auth_client = Client(
base_url="https://your-api-endpoint.com",
headers={
"Authorization": f"Bearer {api_token}",
"X-Org-Key": "your-org-key"
}
)
See example_usage.py for a complete workflow that demonstrates:
The client provides detailed error responses:
response = search_restaurants_search_post.sync_detailed(
client=auth_client,
body=search_request,
x_org_key="your-org-key"
)
if response.status_code == 200:
restaurants = response.parsed
print(f"Success: {len(restaurants)} restaurants found")
else:
print(f"Error {response.status_code}: {response.content}")
This client is auto-generated from the OpenTable API OpenAPI specification. To update:
openapi-python-client
MIT License - see LICENSE file for details.
For API-related issues, refer to the OpenTable API documentation. For client library issues, please open a GitHub issue.
FAQs
A Python client library for the OpenTable REST API - search, book, and manage restaurant reservations
We found that opentable-rest-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.