Metadata-Version: 2.4
Name: rightprice
Version: 0.2.0
Summary: What is the right price for your property of interest?
Author: David Zhang
License: MIT License
        
        Copyright (c) 2025, David Zhang
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: beautifulsoup4==4.14.3
Requires-Dist: click==8.3.1
Requires-Dist: pandas==2.3.3
Requires-Dist: polars==1.36.1
Requires-Dist: pydantic==2.12.5
Requires-Dist: requests==2.32.5
Provides-Extra: build
Requires-Dist: build==1.3.0; extra == 'build'
Provides-Extra: dev
Requires-Dist: pre-commit==4.3.0; extra == 'dev'
Requires-Dist: pytest-cov==6.0.0; extra == 'dev'
Requires-Dist: pytest==8.4.1; extra == 'dev'
Requires-Dist: responses==0.25.3; extra == 'dev'
Description-Content-Type: text/markdown

# rightprice

[![test_deploy](https://github.com/dzhang32/rightprice/actions/workflows/test_deploy.yml/badge.svg)](https://github.com/dzhang32/autogroceries/actions/rightprice/test_deploy.yml)
[![codecov](https://codecov.io/gh/dzhang32/rightprice/branch/main/graph/badge.svg)](https://codecov.io/gh/dzhang32/rightprice)
[![pypi](https://img.shields.io/pypi/v/rightprice.svg)](https://pypi.org/project/rightprice/)

`rightprice` helps you decide whether the property you want to buy is worth the price by retrieving the prices of sold houses.

## Installation

I recommend using [uv](https://docs.astral.sh/uv/) to manage the Python version, virtual environment and `rightprice` installation:

```bash
uv venv --python 3.13
source .venv/bin/activate
uv pip install rightprice
```

## Usage

`rightprice` retrieves sold property prices for a given UK postcode. `rightprice` is designed to be used as a CLI tool, with a single command:

```bash
> rightprice retrieve-sold-prices --help
Usage: rightprice retrieve-sold-prices [OPTIONS]

  Retrieve sold property prices for a given postcode.

Options:
  -p, --postcode TEXT    UK postcode to search for sold prices.  [required]
  --radius FLOAT         Search radius in miles. Valid values: 0.25, 0.5, 1,
                         3, 5, 10.
  --years INTEGER        Number of years back to search. Valid values: 2, 3,
                         5, 10, 15, 20.
  -o, --output-dir PATH  Output directory. Defaults to current directory.
  --help                 Show this message and exit.
```

### Output Format

The output `.csv` will be named based on the input parameters (e.g., `se3-0aa_radius-0.5_years-5.csv`) and contain the following columns:

| address | property_type | n_bedrooms | date | price |
|---------|---------------|------------|------|-------|
| 123 Main Street, London | Semi-Detached | 3 | 15 Jan 2024 | 575000 |
| 45 Park Road, London | Terraced | 2 | 03 Dec 2023 | 425000 |
| 78 High Street, London | Detached | 4 | 22 Nov 2023 | 750000 |

## Disclaimer

️`rightprice` is developed for **educational use only**. Users are responsible for:

- Following website's `robots.txt` and Terms of Service.
- Using appropriate delays and respecting rate limits.
- Complying with applicable laws.
