<div align="center">
# Dummy Address Data (DAD) Python Library
Dummy Address Data (DAD) - Retrieve real addresses from all around the world. (Python Client Library)
[![Build Status](https://github.com/Justintime50/dad-python/workflows/build/badge.svg)](https://github.com/Justintime50/dad-python/actions)
[![Coverage Status](https://coveralls.io/repos/github/Justintime50/dad-python/badge.svg?branch=main)](https://coveralls.io/github/Justintime50/dad-python?branch=main)
[![PyPi](https://img.shields.io/pypi/v/dad_tool)](https://pypi.org/project/dad_tool)
[![Licence](https://img.shields.io/github/license/Justintime50/dad-python)](LICENSE)
<img src="https://raw.githubusercontent.com/justintime50/assets/main/src/dad/showcase.png" alt="Showcase">
</div>
The DAD Python library is the perfect companion to quickly bootstrap address data in your application. DAD provides real addresses from all over the world with a consistent data structure so you can spend less time looking up addresses and address rules and more time coding.
## Install
```bash
# Install tool
pip3 install dad_tool
# Install locally
make install
# Get Makefile help
make help
```
## Address Data
Address objects will look like the [sample below](#sample-address-object). The data type of each field on an address object is a `string`. A list of addresses is an `array` of `json` objects.
Attempts have been made to verify addresses and ensure that street1, city, state, and zip are present on all records. Some lists may be shorter than others to avoid complexity or because of a lack of accurate data.
The following files can be found in the `data` directory.
## Australia
| Locations | Tag |
| --------------- | ----- |
| Victoria Area | AU_VT |
## Canada
| Locations | Tag |
| --------------- | ----- |
| BC Area | CA_BC |
## China
| Locations | Tag |
| ------------------------- | ----- |
| Beijing Area | CN_BJ |
| Hong Kong - Wan Chai Area | CN_HK |
## Europe
| Locations | Tag |
| ----------------------------- | ----- |
| Germany - Wesel Area | EU_DE |
| Spain - Countrywide | EU_ES |
| United Kingdom - England Area | EU_UK |
## Mexico
| Locations | Tag |
| ----------------------------- | ----- |
| Mexico - Mexico City Area | MX_MX |
## United States
| Locations | Tag |
| ------------------------- | ----- |
| Arizona - Gilbert Area | US_AZ |
| California - Anaheim Area | US_CA |
| Idaho - Boise Area | US_ID |
| Kansas - Barton County | US_KS |
| Nevada - Lincoln Area | US_NV |
| New York - Rochester Area | US_NY |
| Oregon - Portland Area | US_OR |
| Texas - Austin Area | US_TX |
| Utah - Provo Area | US_UT |
| Washington - Spokane Area | US_WA |
## Usage
```python
import dad_tool
# Grab a random UT address
address = dad_tool.random_address('US_UT')
print(address)
# Alternatively, grab the entire UT list
addresses = dad_tool.list_addresses('US_UT')
print(addresses)
# Get the list of all ISO country codes
iso_data = dad_tool.list_iso_country_codes()
print(iso_data)
```
### Sample Address Object
A sample address object will look like the following:
```json
{
"street1": "231 N 1200 W",
"street2": "UNIT 104",
"city": "OREM",
"state": "UT",
"zip": "84057",
"country": "US"
}
```
### Sample ISO Country Object
```json
{
"country": "United States of America",
"alpha_2_code": "US",
"alpha_3_code": "USA"
}
```
## Development
```bash
# Lint the project
make lint
# Run tests
make test
# Run test coverage
make coverage
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
dad-tool-0.2.0.tar.gz (53个子文件)
dad-tool-0.2.0
PKG-INFO 4KB
dad_tool
__init__.py 103B
dad
src
addresses
united-states
or-addresses.min.json 10KB
nv-addresses.min.json 10KB
wa-addresses.json 14KB
ut-addresses.min.json 10KB
ut-addresses.json 14KB
ny-addresses.json 14KB
az-addresses.json 14KB
ks-addresses.json 14KB
id-addresses.json 14KB
id-addresses.min.json 10KB
ca-addresses.json 14KB
wa-addresses.min.json 10KB
ca-addresses.min.json 10KB
ks-addresses.min.json 10KB
nv-addresses.json 14KB
tx-addresses.min.json 10KB
ny-addresses.min.json 10KB
tx-addresses.json 14KB
or-addresses.json 15KB
az-addresses.min.json 10KB
europe
uk-addresses.min.json 512B
es-addresses.min.json 574B
es-addresses.json 784B
de-addresses.json 703B
de-addresses.min.json 493B
uk-addresses.json 722B
canada
bc-addresses.json 741B
bc-addresses.min.json 530B
mexico
mx-addresses.json 904B
mx-addresses.min.json 694B
australia
vt-addresses.json 756B
vt-addresses.min.json 545B
china
hk-addresses.min.json 530B
bj-addresses.min.json 540B
bj-addresses.json 750B
hk-addresses.json 740B
other
country-codes.min.json 16KB
country-codes.json 22KB
data_router.py 3KB
test
unit
test_data_router.py 585B
__init__.py 0B
__init__.py 0B
LICENSE 1KB
setup.cfg 38B
setup.py 1KB
README.md 4KB
dad_tool.egg-info
PKG-INFO 4KB
requires.txt 57B
SOURCES.txt 2KB
top_level.txt 14B
dependency_links.txt 1B
共 53 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功