Metadata-Version: 2.4
Name: renta
Version: 0.1.0
Summary: Real Estate Network and Trend Analyzer - A Python library for real estate investment analysis in Buenos Aires
Author-email: RENTA Development Team <contact@renta.dev>
Maintainer-email: RENTA Development Team <contact@renta.dev>
License-Expression: MIT
Project-URL: Homepage, https://github.com/machinelearnear/RENTA
Project-URL: Documentation, https://github.com/machinelearnear/RENTA#readme
Project-URL: Repository, https://github.com/machinelearnear/RENTA
Project-URL: Bug Tracker, https://github.com/machinelearnear/RENTA/issues
Project-URL: Changelog, https://github.com/machinelearnear/RENTA/blob/main/CHANGELOG.md
Keywords: real-estate,airbnb,investment-analysis,buenos-aires,property-analysis,rental-market,ai-analysis
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas==2.2.3
Requires-Dist: numpy==1.26.4
Requires-Dist: requests==2.31.0
Requires-Dist: beautifulsoup4==4.12.3
Requires-Dist: lxml==5.3.0
Requires-Dist: scikit-learn==1.5.2
Requires-Dist: pyyaml==6.0.2
Requires-Dist: jsonschema==4.23.0
Requires-Dist: boto3==1.35.70
Requires-Dist: botocore==1.35.70
Requires-Dist: jinja2==3.1.4
Requires-Dist: structlog==24.4.0
Requires-Dist: tqdm==4.67.1
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: mkdocs>=1.4.0; extra == "dev"
Requires-Dist: mkdocs-material>=9.0.0; extra == "dev"
Requires-Dist: mkdocstrings[python]>=0.20.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Provides-Extra: scraping
Requires-Dist: playwright>=1.40.0; extra == "scraping"
Requires-Dist: cloudscraper>=1.2.71; extra == "scraping"
Requires-Dist: python-dotenv>=1.0.0; extra == "scraping"
Provides-Extra: security
Requires-Dist: pip-audit>=2.0.0; extra == "security"
Requires-Dist: safety>=3.0.0; extra == "security"
Requires-Dist: bandit>=1.7.0; extra == "security"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.4.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.20.0; extra == "docs"
Dynamic: license-file

# RENTA – Real Estate Network and Trend Analyzer

[![PyPI version](https://badge.fury.io/py/renta.svg)](https://badge.fury.io/py/renta)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://renta.readthedocs.io)

RENTA is a Python library for real estate investment analysis in Buenos Aires. It combines Airbnb market data, Zonaprop listings, geospatial enrichment, and AWS Bedrock summaries to deliver investment-ready datasets.

## Features

- Download and normalize Airbnb datasets from InsideAirbnb with freshness caching.
- Scrape or ingest Zonaprop listings, capturing pricing, engagement, and location data.
- Match properties to nearby Airbnb listings with configurable spatial filters.
- Generate Claude Sonnet 4.5 summaries in Argentine Spanish through AWS Bedrock.
- Export enriched results to pandas, CSV, or JSON with consistent schemas.

## Installation

```bash
pip install renta
```

## Quick Start

```python
from renta import RealEstateAnalyzer

analyzer = RealEstateAnalyzer()

airbnb = analyzer.download_airbnb_data(force=True)
properties = analyzer.scrape_zonaprop(
    "https://www.zonaprop.com.ar/inmuebles-venta-palermo-2-dormitorios-50000-130000-dolar.html"
)
enriched = analyzer.enrich_with_airbnb(properties)
summaries = analyzer.generate_summaries(enriched)

analyzer.export(enriched, format="csv", path="investment_analysis.csv")
```

## AWS Bedrock Requirements

Claude Sonnet 4.5 access is required for AI summaries.

```bash
export AWS_ACCESS_KEY_ID="YOUR_KEY"
export AWS_SECRET_ACCESS_KEY="YOUR_SECRET"
export AWS_REGION="us-east-1"
```

Or configure `~/.aws/credentials` or an IAM role. In AWS Console → Amazon Bedrock → Model access, request `us.anthropic.claude-sonnet-4-5-20250929-v1:0`.

## Configuration

Create `config.yaml` to override defaults in `renta/data/default_config.yaml`.

```yaml
data:
  cache_dir: "~/.renta/cache"
  freshness_threshold_hours: 24
airbnb:
  matching:
    radius_km: 0.3
    min_nights_threshold: 7
aws:
  region: "us-east-1"
logging:
  level: "INFO"
```

Load with `RealEstateAnalyzer(config_path="config.yaml")` or set `RENTA_CONFIG=/path/config.yaml`. Configuration is validated against `renta/schemas/config_schema.json`.

## Troubleshooting

- Download issues: call `analyzer.download_airbnb_data(force=True)`.
- Zonaprop blocked: use `html_path="saved_results.html"` with previously saved HTML.
- Bedrock errors: verify credentials with `aws sts get-caller-identity` and confirm model access.
- Schema validation failures: run `RealEstateAnalyzer(config_path="config.yaml")` to surface detailed errors.

## Security and Compliance

Logs scrub PII when enabled in config, credentials are never persisted, and scraping obeys configurable rate limits. Review `renta/data/legal_notice.md` and `LEGAL_COMPLIANCE.md` for jurisdiction-specific guidance. Users are responsible for complying with local laws, Zonaprop terms, and AWS policies.

## Documentation and Examples

- API reference and guides: <https://renta.readthedocs.io>
- Example scripts and notebooks: `examples/`
- Default prompts and configuration templates ship with the package.

## Contributing

We welcome pull requests. Install development tooling with:

```bash
pip install -e ".[dev]"
pytest
black . && isort . && flake8
```

See `CONTRIBUTING.md` for workflow details.

## License

MIT License – see `LICENSE`.

---

RENTA supports research and exploratory investment analysis. Always verify property data independently and consult legal counsel when deploying scraping or AI-driven workflows in production.
