{"id":22538190,"url":"https://github.com/cfpb/owning-a-home-api","last_synced_at":"2025-04-09T20:15:31.573Z","repository":{"id":19121866,"uuid":"22351113","full_name":"cfpb/owning-a-home-api","owner":"cfpb","description":"The API that drives the Owning A Home project. ","archived":false,"fork":false,"pushed_at":"2024-12-18T17:33:23.000Z","size":2350,"stargazers_count":14,"open_issues_count":0,"forks_count":35,"subscribers_count":37,"default_branch":"main","last_synced_at":"2025-04-09T20:15:24.020Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfpb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING.txt","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}},"created_at":"2014-07-28T17:19:09.000Z","updated_at":"2024-12-18T17:33:28.000Z","dependencies_parsed_at":"2024-12-16T18:36:35.408Z","dependency_job_id":"995cbe02-79e4-4513-a7a4-718b9252f1fb","html_url":"https://github.com/cfpb/owning-a-home-api","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fowning-a-home-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fowning-a-home-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fowning-a-home-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fowning-a-home-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfpb","download_url":"https://codeload.github.com/cfpb/owning-a-home-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-07T11:10:44.029Z","updated_at":"2025-04-09T20:15:31.529Z","avatar_url":"https://github.com/cfpb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/cfpb/owning-a-home-api/workflows/test/badge.svg)[![Coverage Status](https://coveralls.io/repos/cfpb/owning-a-home-api/badge.svg?branch=master)](https://coveralls.io/r/cfpb/owning-a-home-api?branch=master)\n\n# Owning a Home API\n\nThis project feeds detailed mortgage market data to the Consumer Financial Protection Bureau's [Owning a Home suite of tools](http://www.consumerfinance.gov/owning-a-home/). Unfortunately, the main data set it uses is not available publicly and is not in this repository.\n\nWhat is included is the API code and some basic geographical data. If you want to give it a spin, here's how:\n\n## Installing it locally\n\nThe tool is intended to be a module that runs inside a Django project, but it can be tested as a stand-alone app.\n\nThese instructions are for installation on a Mac with OS X Yosemite (version 10.10.x), but they could be adapted for other environments.\n\n**Dependencies**\n* [Python 3.8](https://www.python.org/)\n* [pip](https://pypi.python.org/pypi/pip)\n* [virtualenv](https://virtualenv.pypa.io/en/latest/)\n* [Django](https://docs.djangoproject.com/en/stable/)\n* [Django Rest Framework](http://www.django-rest-framework.org)\n* [Django localflavor](https://github.com/django/django-localflavor)\n* [django-cors-headers](https://github.com/ottoyiu/django-cors-headers)\n\n**Optional**\n* [Homebrew](http://brew.sh)\n\n#### Steps for firing up Django\n- It's useful to create a [virtualenv](https://virtualenv.pypa.io/en/latest/) virtual environment to keep Python dependencies sandboxed:\n\n```shell\nmkvirtualenv oah\n```\n\n- Create a folder for your Django project in a workspace or other location you like (`~/workspace` in this case), clone the project (or your fork of it) into your directory and install requirements:\n\n```\ncd ~/workspace\ngit clone https://github.com/cfpb/owning-a-home-api.git\ncd owning-a-home-api/\nsetvirtualenvproject\npip install -e '.[testing]'\n```\n\n- Initialize your database, load some basic data and launch a development server:\n\n```shell\n./manage.py migrate --noinput\n./manage.py loaddata countylimits/fixtures/countylimit_data.json\n./manage.py load_daily_data ratechecker/data/sample.zip\n./manage.py runserver\n```\n\nYou should be able to view these API pages locally:\n- http://127.0.0.1:8000/oah-api/county/\n- http://127.0.0.1:8000/oah-api/county/?state=FL\n- http://127.0.0.1:8000/oah-api/rates/rate-checker\n\n#### Embedding the API module\n\nYou can install the API and its sister project, https://github.com/cfpb/owning-a-home, inside the public project that powers consumerfinance.gov -- https://github.com/cfpb/cfgov-refresh\n\nThe cfgov-refresh [documentation](https://cfpb.github.io/cfgov-refresh/) describes how to install sub-modules such as the owning-a-home API inside cfgov-refresh.\n\n#### Data\nThis repo contains limited data, but you can explore mortgage interest rates in detail at the CFPB's [Interest-rate checker tool](http://www.consumerfinance.gov/owning-a-home/explore-rates/).\n\n## Deeper dive\n\nYou can find [additional documentation for the `ratechecker` app](ratechecker).\n\n\n##  Running Tests\n\nIf you have [Tox](https://tox.readthedocs.io/en/latest/) installed (recommended),\nyou can run the specs for this project with the `tox` command.\n\nIf not, this command will run the specs on the python version your local\nenvironment has installed: `./manage.py test`.\n\nIf you run the tests via Tox, it will automatically display spec coverage information.\nTo get test coverage information outside of Tox, install [Coverage.py](https://coverage.readthedocs.io/en/coverage-4.5.1a/)\nand run these commands:\n\n```\ncoverage erase\ncoverage run manage.py test\ncoverage report\n```\n\n\n## API Docs\n\n[Documentation](https://cfpb.github.io/owning-a-home-api/) for this repository is rendered via GitHub pages. They can be edited in the `docs/` directory, but to view or deploy them, you'll need to install the dependencies listed in the `docs_extras` section of `setup.py`:\n\n```\npip install -e '.[docs]'\n```\n\nYou can then preview your changes locally by running `mkdocs serve` and then reviewing \u003chttp://127.0.0.1:8000/\u003e\n\nWhen your changes are ready, you can submit them as a normal pull request. After that, you can use this command to publish them:\n\n```\nmkdocs gh-deploy --clean\n```\n\nThat pushes the necessary files to the `gh-pages` branch.\n\n## Contributions\n\nWe welcome contributions with the understanding that you are contributing to a project that is in the public domain, and anything you contribute to this project will also be released into the public domain. See our CONTRIBUTING file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Fowning-a-home-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfpb%2Fowning-a-home-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Fowning-a-home-api/lists"}