{"id":24504,"library":"random-address","title":"random-address","description":"A Python library for generating real random addresses that geocode successfully. It scrapes addresses from online sources and validates them via geocoding. Version 1.3.0 (last released) supports Python >=3.6.","status":"active","version":"1.3.0","language":"python","source_language":"en","source_url":"https://github.com/neosergio/random-address","tags":["address","random","geocode","generator"],"install":[{"cmd":"pip install random-address","lang":"bash","label":"default"}],"dependencies":[{"reason":"HTTP requests to fetch addresses","package":"requests","optional":false}],"imports":[{"note":"Importing the module directly doesn't give access to RandomAddress class.","wrong":"import random_address","symbol":"RandomAddress","correct":"from random_address import RandomAddress"}],"quickstart":{"code":"from random_address import RandomAddress\nra = RandomAddress()\naddress = ra.random_address()\nprint(address)","lang":"python","description":"Generate a random address."},"warnings":[{"fix":"Use with caution; consider caching results or maintaining a fallback.","message":"The library relies on scraping a third-party website. If the site changes its HTML structure or blocks requests, the library may break without warning.","severity":"gotcha","affected_versions":"all"},{"fix":"Wrap calls in try/except to handle failures gracefully.","message":"The random_address() method may raise an exception if the scraping fails or no valid address is found. Not all calls succeed.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin Python version to <=3.11 if issues arise, or consider alternative libraries.","message":"The library has not been updated since 2021. It may have compatibility issues with newer Python versions beyond 3.11.","severity":"deprecated","affected_versions":">=1.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from random_address import RandomAddress","cause":"The package is installed but imported incorrectly (e.g., `import random_address` instead of `from random_address import RandomAddress`).","error":"ModuleNotFoundError: No module named 'random_address'"},{"fix":"Correct import: from random_address import RandomAddress","cause":"Importing the module without the correct submodule or class.","error":"AttributeError: module 'random_address' has no attribute 'RandomAddress'"},{"fix":"Check internet connection; the source may be temporarily unavailable.","cause":"The library fails to fetch data from the source website due to network issues or site changes.","error":"requests.exceptions.ConnectionError: HTTPSConnectionPool ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}