{"id":28486511,"url":"https://github.com/techwithty/rent_cast","last_synced_at":"2026-05-01T03:34:37.224Z","repository":{"id":295686034,"uuid":"990911128","full_name":"TechWithTy/rent_cast","owner":"TechWithTy","description":"RentCast API client for Python/FastAPI. Production-ready integration for property data, market research, and valuation. Includes type-safe clients, retry logic, and comprehensive error handling.","archived":false,"fork":false,"pushed_at":"2025-11-12T03:13:48.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-01T03:34:13.989Z","etag":null,"topics":["api-client","async-io","fastapi","market-research","production-ready","property-data","property-valuation","python","real-estate","rental-listings","sale-listings","type-safe","valuation"],"latest_commit_sha":null,"homepage":"https://www.cybershoptech.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TechWithTy.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-26T20:47:11.000Z","updated_at":"2025-11-12T03:13:52.000Z","dependencies_parsed_at":"2025-05-26T21:38:24.104Z","dependency_job_id":null,"html_url":"https://github.com/TechWithTy/rent_cast","commit_stats":null,"previous_names":["techwithty/rent_cast"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TechWithTy/rent_cast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Frent_cast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Frent_cast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Frent_cast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Frent_cast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TechWithTy","download_url":"https://codeload.github.com/TechWithTy/rent_cast/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechWithTy%2Frent_cast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32484352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","async-io","fastapi","market-research","production-ready","property-data","property-valuation","python","real-estate","rental-listings","sale-listings","type-safe","valuation"],"created_at":"2025-06-08T01:35:09.310Z","updated_at":"2026-05-01T03:34:37.217Z","avatar_url":"https://github.com/TechWithTy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RentCast Python SDK\n\n[![Python Version](https://img.shields.io/pypi/pyversions/rentcast-sdk)](https://pypi.org/project/rentcast-sdk/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nA modern, async Python SDK for the [RentCast API](https://rentcast.io/), providing type-safe access to real estate and rental market data.\n\n## Features\n\n- **Fully Typed**: Built with Python type hints and Pydantic for robust data validation\n- **Async-First**: Leverages `asyncio` for high-performance concurrent requests\n- **Comprehensive Coverage**: Supports all major RentCast API endpoints:\n  - Property Data \u0026 Listings\n  - Rental Market Data\n  - Property Valuations\n  - Market Statistics\n- **Production Ready**: Includes retries, timeouts, and comprehensive error handling\n- **Well-Tested**: 100% test coverage with a comprehensive test suite\n\n## Installation\n\n```bash\npip install rentcast-sdk\n```\n\n## Quick Start\n\n```python\nimport asyncio\nfrom rentcast import RentCastClient\n\nasync def main():\n    # Initialize the client with your API key\n    async with RentCastClient(api_key=\"your_api_key_here\") as client:\n        # Get property data by ID\n        property_data = await client.property_data.get_by_id(\"12345\")\n        print(f\"Property: {property_data.address}\")\n        \n        # Search for rental listings\n        listings = await client.listings.rental_listings(\n            city=\"Austin\",\n            state=\"TX\",\n            limit=5\n        )\n        \n        for listing in listings.data:\n            print(f\"${listing.price:,.0f} - {listing.bedrooms}bd/{listing.bathrooms}ba\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n## API Reference\n\n### Client Initialization\n\n```python\nfrom rentcast import RentCastClient\n\n# Basic initialization\nclient = RentCastClient(api_key=\"your_api_key\")\n\n# With custom configuration\nclient = RentCastClient(\n    api_key=\"your_api_key\",\n    base_url=\"https://api.rentcast.io/v1\",  # Default\n    timeout=30.0,  # Request timeout in seconds\n    max_retries=3,  # Number of retries for failed requests\n)\n\n# Recommended: use as a context manager\nasync with RentCastClient(api_key=\"your_api_key\") as client:\n    # Your code here\n    pass\n```\n\n### Available Modules\n\n#### Property Data\n\n```python\n# Get property by ID\nproperty_data = await client.property_data.get_by_id(\"12345\")\n\n# Search properties\nsearch_results = await client.property_data.search(\n    address=\"123 Main St\",\n    city=\"Austin\",\n    state=\"TX\",\n    zip_code=\"78704\",\n    limit=10,\n    offset=0\n)\n\n# Get random property records\nrandom_properties = await client.property_data.random_records(limit=5)\n```\n\n#### Listings\n\n```python\n# Get rental listings\nrentals = await client.listings.rental_listings(\n    city=\"Austin\",\n    state=\"TX\",\n    min_price=1000,\n    max_price=3000,\n    bedrooms_min=2,\n    limit=10\n)\n\n# Get sale listings\nsales = await client.listings.sale_listings(\n    city=\"Austin\",\n    state=\"TX\",\n    min_price=200000,\n    max_price=500000,\n    property_type=\"Single Family\",\n    limit=10\n)\n\n# Get listing by ID\nlisting = await client.listings.rental_listing_by_id(\"listing_123\")\nsale = await client.listings.sale_listing_by_id(\"sale_456\")\n```\n\n#### Market Data\n\n```python\n# Get market statistics\nmarket_data = await client.market_data.get_statistics(\n    city=\"Austin\",\n    state=\"TX\",\n    metrics=[\"medianRent\", \"medianPrice\"],\n    interval=\"monthly\",\n    start_date=\"2023-01-01\",\n    end_date=\"2023-12-31\"\n)\n\n# Get price and rent trends\ntrends = await client.market_data.get_trends(\n    zip_code=\"78704\",\n    property_type=\"Single Family\"\n)\n```\n\n#### Property Valuation\n\n```python\n# Get property valuation\nvaluation = await client.valuation.get_valuation(\n    address=\"123 Main St\",\n    city=\"Austin\",\n    state=\"TX\",\n    zip_code=\"78704\",\n    bedrooms=3,\n    bathrooms=2,\n    square_feet=1800,\n    lot_size=6000,\n    year_built=2010,\n    property_type=\"Single Family\"\n)\n\n# Get rent estimate\nrent_estimate = await client.valuation.get_rent_estimate(\n    address=\"123 Main St\",\n    city=\"Austin\",\n    state=\"TX\",\n    zip_code=\"78704\",\n    bedrooms=3,\n    bathrooms=2,\n    square_feet=1800\n)\n```\n\n## Error Handling\n\nThe SDK provides specific exception types for different error scenarios:\n\n```python\nfrom rentcast.exceptions import (\n    RentCastError,\n    RentCastAPIError,\n    RentCastAuthenticationError,\n    RentCastRateLimitError,\n    RentCastValidationError,\n    RentCastNotFoundError\n)\n\ntry:\n    # Your API calls here\n    pass\nexcept RentCastAuthenticationError as e:\n    print(f\"Authentication failed: {e}\")\nexcept RentCastRateLimitError as e:\n    print(f\"Rate limit exceeded. Retry after: {e.retry_after} seconds\")\nexcept RentCastValidationError as e:\n    print(f\"Invalid request: {e}\")\nexcept RentCastAPIError as e:\n    print(f\"API error: {e.status_code} - {e.message}\")\n```\n\n## Configuration\n\n### Environment Variables\n\nYou can configure the client using environment variables:\n\n```bash\nexport RENTCAST_API_KEY=your_api_key_here\nexport RENTCAST_BASE_URL=https://api.rentcast.io/v1\nexport RENTCAST_TIMEOUT=30.0\nexport RENTCAST_MAX_RETRIES=3\n```\n\n### Logging\n\nThe SDK uses Python's built-in logging. To enable debug logging:\n\n```python\nimport logging\n\nlogging.basicConfig(level=logging.DEBUG)\n```\n\n## Testing\n\nRun the test suite:\n\n```bash\npytest tests/\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor support, please open an issue in the GitHub repository or contact support@rentcast.io.\n\n## Acknowledgements\n\n- [RentCast](https://rentcast.io/) for providing the API\n- [Pydantic](https://pydantic-docs.helpmanual.io/) for data validation\n- [httpx](https://www.python-httpx.org/) for async HTTP requests\n\n---\n\n*This SDK is not officially affiliated with RentCast. Use at your own risk.*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwithty%2Frent_cast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechwithty%2Frent_cast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechwithty%2Frent_cast/lists"}