NumberGenerate


NameNumberGenerate JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/FourTwooo/NumberGenerate
SummaryCN-NumberGenerate
upload_time2024-11-22 08:38:04
maintainerNone
docs_urlNone
author42
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NumberGenerate
虚拟信息生成器,提供身份证号码、电话号码、姓名等数据的生成和保存功能。支持多种自定义参数设置,以适应不同的使用场景。
```cmd
pip install NumberGenerate
```
## 开发环境
- python 3.8.0

- windows11

- 第三方库详见 [requirements.txt](./requirements.txt)<!-- @IGNORE PREVIOUS: link -->


---
# 免责声明

本工具生成的数据均为虚构,仅供测试和学习使用。用户不得将上述内容用于商业或非法用途。使用本工具生成的数据,用户需自行承担相关风险和责任。通过使用本项目代码,用户同意遵守此使用条款,并理解由此带来的任何风险与本人或开发者无关。

---
### NumberGenerate.IDCardGenerate

使用的区域代码数据库: [db/area_code.db - city_data](./db/area_code.db)<!-- @IGNORE PREVIOUS: link -->

**类属性**

| 属性           | 类型     | 默认值  | 说明            |
|:--------------|:-------  |:----|:--------------|
| db_function   | Function | from NumberGenerate.db import get_area_codes   | 本地数据库查询函数        |
| START_YEAR    | Int   | 1900   | 生成起始年份|
| END_YEAR      | Int   | datetime.now().year + 1   | 生成终止年份 |
| CONSTELLATIONS| String   | ...   | 星座表     |

**示例代码**

```python
import NumberGenerate

IDCard = NumberGenerate.IDCardGenerate()

# 自定义查询接口(可选参数)
# 参数说明:
# address: 地区,格式为 "省|市|区"
# 返回值: [区域代码...]
IDCard.db_function = lambda address: ["320505"]

# 设定起始年份
IDCard.START_YEAR = 1900

# 设定终止年份
IDCard.END_YEAR = 2000

```

#### NumberGenerate.IDCardGenerate().get_id_card
> 身份证号码生成

| 属性            | 类型     | 默认值 | 是否必填 | 说明            |
|:--------------|:-------|:----|:-----|:--------------|
| id_card       | String | 无   | 是    | 模糊身份证号        |
| address       | String | "\|\|"   | 否    | 地区,格式为 "省\|市\|区"     |
| gender        | String |  None  | 否    | 性别,可选为"男"或"女" |
| constellation | String | "未知星座"   | 否    | 星座,如"狮子座"     |
| zodiac        | String | "未知生肖"   | 否    | 生肖,如"龙"       |
| lunar_birthday        | String |  None  | 否    | 农历的公历生日 |

**示例代码**
```python
import NumberGenerate

IDCard = NumberGenerate.IDCardGenerate()

result = IDCard.get_id_card(
    id_card="44****2000******28",
    address="广东|揭阳|",
    gender="女",
    constellation="狮子座",
    zodiac="龙"
)
```
**示例输出**
```python
# 调用方法后,返回结果
result = ['445201200007230328', '445201200007231128', '445201200007233828', '445201200007234628', ...]
```

#### NumberGenerate.IDCardGenerate().generator_date
> 年份日期生成

| 属性            | 类型     | 默认值 | 是否必填 | 说明            |
|:--------------|:-------|:----|:-----|:--------------|
| date_str       | String | 无   | 是    | 模糊年份日期 - "****\[年\]\*\*\[月\]\*\*\[日\]"  |
| constellation  | String | "未知星座"   | 否    | 星座     |
| zodiac        | String |  "未知生肖"  | 否    | 生肖 |
| lunar_birthday        | String |  None  | 否    | 农历的公历生日 |

**示例代码**
```python
import NumberGenerate

IDCard = NumberGenerate.IDCardGenerate()

result = IDCard.generator_date(
    '20******', 
    lunar_birthday="20240513", 
    constellation="金牛座", 
    zodiac="马"
)
```
**示例输出**
```python
# 调用方法后,返回结果
result = ['20020517', '20140504']
```


### NumberGenerate.PhoneGenerate()
使用的号段数据库 [db/area_code.db - phone_data](./db/area_code.db)<!-- @IGNORE PREVIOUS: link -->

号段在线查询使用第三方平台 **[[查号吧](https://www.chahaoba.com), [手机号段网](https://telphone.cn)]**

**类属性**

| 属性           | 类型     | 默认值  | 说明            |
|:--------------|:-------  |:----|:--------------|
| api_function   | Function | from NumberGenerate import api   | 在线API查询|
| db_function    | Function   | from NumberGenerate import db   | 本地数据库查询函数|
| is_db      | Bool   | True  | 是否开启数据库查询,默认开启.关闭才会使用在线查询|

**示例代码**

```python
import NumberGenerate

Phone = NumberGenerate.PhoneGenerate()
# 关闭离线(本地数据库)查询
Phone.is_db = False

# 更改自定义查询接口
'''
[必选]:param incomplete_phone:        模糊手机号
[可选]:param city_name:               市
:return:                        [号段...]
'''
Phone.api_function = lambda incomplete_phone, city_name: ["1588854"]

from NumberGenerate import api

# 运营商号段更换
# {"移动": ["134", "135", ...],"联通": ["130", "131", ...], "电信": ["133", "149", ...]}
api.PHONE_ISP_CODES["移动"].append("188")
# 更换 查号吧
Phone.api_function = api.cha_hao_ba
# 更换 手机号段网 [默认是此手机号段网]
Phone.api_function = api.tel_phone
```

#### NumberGenerate.PhoneGenerate().get_phone
> 手机号码生成

| 属性            | 类型     | 默认值 | 是否必填 | 说明            |
|:--------------|:-------|:----|:-----|:--------------|
| incomplete_phone| String | 无   | 是    | 模糊手机号        |
| city_name       | String | None   | 否    | 地区名,格式为 省或市名     |
| isp       | String | None   | 否    | 运营商     |

**示例代码**

```python
import NumberGenerate

Phone = NumberGenerate.PhoneGenerate()

result = Phone.get_phone(
    city_name="毕节",
    incomplete_phone="13*****3434",
    isp="联通"
)
```
**示例输出**
```python
# 调用方法后,返回结果
result = [13017063434, 13035543434, 13048543434, 13048553434, ...]
```

#### NumberGenerate.PhoneGenerate().generate_phone_area
> 手机号段生成

| 属性             | 类型   | 默认值 |是否必填| 说明             |
|:--------------  |:-------|:---- |:----- |:--------------|
| incomplete_phone| String | 无   | 是     | 模糊手机号      |
| city_name       | String | None | 否    | 地区名,格式为 省或市名|
| isp             | String | None | 否    | 运营商          |

**示例代码**

```python
import NumberGenerate

Phone = NumberGenerate.PhoneGenerate()

result = Phone.generate_phone_area(
    city_name="北京",
    incomplete_phone="1*******434",
    isp="虚拟"
)
```
**示例输出**
```python
# 调用方法后,返回结果
result = ['1621002', '1621003', '1621004', '1621001']
```


### NumberGenerate.NameGenerate()
生成姓名,支持未知,拼音,缩写,中文多种传参方式

**类属性**

| 属性           | 类型     | 默认值  | 说明            |
|:--------------|:-------  |:----|:--------------|
| CommonlyUsedSurname   | List | Name.CommonlyUsedSurname  | 百家姓|

**实例化传参**

| 属性            | 类型     | 默认值 | 是否必填 | 说明            |
|:--------------|:-------|:----|:-----|:--------------|
| rare_word       | Bool | False   | 否    | 生僻字        |
| common_words       | Bool | True   | 否    | 常用字|
| secondary_common_words | Bool | True   | 否    | 次要常用字|
| all_words | Bool | False   | 否    | 所有汉字 |

**示例代码**
```python
import NumberGenerate

Name = NumberGenerate.NameGenerate(
    rare_word=False,
    common_words=True,
    secondary_common_words=True,
    all_words=False
)
```


#### NumberGenerate.NameGenerate().add_words
> 添加未知汉字

| 属性            | 类型     | 默认值 | 是否必填 | 说明            |
|:--------------|:-------|:----|:-----|:--------------|
| words       | List | 无   | 是    | 传入的汉字列表. 如果内置的汉字并没有包含你需要的 |

**示例代码**

```python
import NumberGenerate

Name = NumberGenerate.NameGenerate()

Name.add_words(["汉", "字"])
```


#### NumberGenerate.NameGenerate().get_names
> 姓名生成

| 属性            | 类型     | 默认值 | 是否必填 | 说明            |
|:--------------|:-------|:----|:-----|:--------------|
| name       | List | 无   | 是    | 姓名列表|

**示例代码**

```python
import NumberGenerate

Name = NumberGenerate.NameGenerate()

result = Name.get_names(['ou', '阳', 'na', '*'])
```
**示例输出**
```python
# 调用方法后,返回结果
result = ['殴阳捺蘸', '殴阳捺镶', '殴阳捺瓤', '殴阳捺矗', ...]
```



### NumberGenerate.SaveFile()
数据储存

**类属性**

| 属性           | 类型     | 默认值  | 说明            |
|:--------------|:-------  |:----|:--------------|
| current_dir_path   | String | os.getcwd()  | 文件储存默认路径|

**示例代码**

```python
import NumberGenerate

saveFile = NumberGenerate.SaveFile()
# 更改储存路径
saveFile.current_dir_path = 'C:/'
```

#### Generate.NameGenerate().generate_vcf
> vcf文件生成

| 属性            | 类型     | 默认值 | 是否必填 | 说明            |
|:--------------|:-------|:----|:-----|:--------------|
| numbers       | List | 无   | 是    | 储存号码|
| output_file       | String | "data.txt"   | 否    | 储存路径|

**示例代码**
```python
import NumberGenerate

saveFile = NumberGenerate.SaveFile()

saveFile.generate_vcf(['13812344321', '13812344322', ...])
```


#### Generate.NameGenerate().generate_txt
> txt文件生成

| 属性            | 类型     | 默认值 | 是否必填 | 说明            |
|:--------------|:-------|:----|:-----|:--------------|
| numbers       | List | 无   | 是    | 储存号码|
| output_file       | String | "contacts.vcf"   | 否    | 储存路径|

**示例代码**
```python
import NumberGenerate

saveFile = NumberGenerate.SaveFile()

saveFile.generate_txt(['data1', 'data2'])
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/FourTwooo/NumberGenerate",
    "name": "NumberGenerate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "42",
    "author_email": "1666671111@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/16/6b/9fa31d93e50399689c48adee310b11c028db7451fe12f4468b3783d55a98/NumberGenerate-0.1.3.tar.gz",
    "platform": null,
    "description": "# NumberGenerate\r\n\u865a\u62df\u4fe1\u606f\u751f\u6210\u5668\uff0c\u63d0\u4f9b\u8eab\u4efd\u8bc1\u53f7\u7801\u3001\u7535\u8bdd\u53f7\u7801\u3001\u59d3\u540d\u7b49\u6570\u636e\u7684\u751f\u6210\u548c\u4fdd\u5b58\u529f\u80fd\u3002\u652f\u6301\u591a\u79cd\u81ea\u5b9a\u4e49\u53c2\u6570\u8bbe\u7f6e\uff0c\u4ee5\u9002\u5e94\u4e0d\u540c\u7684\u4f7f\u7528\u573a\u666f\u3002\r\n```cmd\r\npip install NumberGenerate\r\n```\r\n## \u5f00\u53d1\u73af\u5883\r\n- python 3.8.0\r\n\r\n- windows11\r\n\r\n- \u7b2c\u4e09\u65b9\u5e93\u8be6\u89c1 [requirements.txt](./requirements.txt)<!-- @IGNORE PREVIOUS: link -->\r\n\r\n\r\n---\r\n# \u514d\u8d23\u58f0\u660e\r\n\r\n\u672c\u5de5\u5177\u751f\u6210\u7684\u6570\u636e\u5747\u4e3a\u865a\u6784\uff0c\u4ec5\u4f9b\u6d4b\u8bd5\u548c\u5b66\u4e60\u4f7f\u7528\u3002\u7528\u6237\u4e0d\u5f97\u5c06\u4e0a\u8ff0\u5185\u5bb9\u7528\u4e8e\u5546\u4e1a\u6216\u975e\u6cd5\u7528\u9014\u3002\u4f7f\u7528\u672c\u5de5\u5177\u751f\u6210\u7684\u6570\u636e\uff0c\u7528\u6237\u9700\u81ea\u884c\u627f\u62c5\u76f8\u5173\u98ce\u9669\u548c\u8d23\u4efb\u3002\u901a\u8fc7\u4f7f\u7528\u672c\u9879\u76ee\u4ee3\u7801\uff0c\u7528\u6237\u540c\u610f\u9075\u5b88\u6b64\u4f7f\u7528\u6761\u6b3e\uff0c\u5e76\u7406\u89e3\u7531\u6b64\u5e26\u6765\u7684\u4efb\u4f55\u98ce\u9669\u4e0e\u672c\u4eba\u6216\u5f00\u53d1\u8005\u65e0\u5173\u3002\r\n\r\n---\r\n### NumberGenerate.IDCardGenerate\r\n\r\n\u4f7f\u7528\u7684\u533a\u57df\u4ee3\u7801\u6570\u636e\u5e93\uff1a [db/area_code.db - city_data](./db/area_code.db)<!-- @IGNORE PREVIOUS: link -->\r\n\r\n**\u7c7b\u5c5e\u6027**\r\n\r\n| \u5c5e\u6027           | \u7c7b\u578b     | \u9ed8\u8ba4\u503c  | \u8bf4\u660e            |\r\n|:--------------|:-------  |:----|:--------------|\r\n| db_function   | Function | from NumberGenerate.db import get_area_codes   | \u672c\u5730\u6570\u636e\u5e93\u67e5\u8be2\u51fd\u6570        |\r\n| START_YEAR    | Int   | 1900   | \u751f\u6210\u8d77\u59cb\u5e74\u4efd|\r\n| END_YEAR      | Int   | datetime.now().year + 1   | \u751f\u6210\u7ec8\u6b62\u5e74\u4efd |\r\n| CONSTELLATIONS| String   | ...   | \u661f\u5ea7\u8868     |\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n\r\n```python\r\nimport NumberGenerate\r\n\r\nIDCard = NumberGenerate.IDCardGenerate()\r\n\r\n# \u81ea\u5b9a\u4e49\u67e5\u8be2\u63a5\u53e3\uff08\u53ef\u9009\u53c2\u6570\uff09\r\n# \u53c2\u6570\u8bf4\u660e:\r\n# address: \u5730\u533a\uff0c\u683c\u5f0f\u4e3a \"\u7701|\u5e02|\u533a\"\r\n# \u8fd4\u56de\u503c: [\u533a\u57df\u4ee3\u7801...]\r\nIDCard.db_function = lambda address: [\"320505\"]\r\n\r\n# \u8bbe\u5b9a\u8d77\u59cb\u5e74\u4efd\r\nIDCard.START_YEAR = 1900\r\n\r\n# \u8bbe\u5b9a\u7ec8\u6b62\u5e74\u4efd\r\nIDCard.END_YEAR = 2000\r\n\r\n```\r\n\r\n#### NumberGenerate.IDCardGenerate().get_id_card\r\n> \u8eab\u4efd\u8bc1\u53f7\u7801\u751f\u6210\r\n\r\n| \u5c5e\u6027            | \u7c7b\u578b     | \u9ed8\u8ba4\u503c | \u662f\u5426\u5fc5\u586b | \u8bf4\u660e            |\r\n|:--------------|:-------|:----|:-----|:--------------|\r\n| id_card       | String | \u65e0   | \u662f    | \u6a21\u7cca\u8eab\u4efd\u8bc1\u53f7        |\r\n| address       | String | \"\\|\\|\"   | \u5426    | \u5730\u533a\uff0c\u683c\u5f0f\u4e3a \"\u7701\\|\u5e02\\|\u533a\"     |\r\n| gender        | String |  None  | \u5426    | \u6027\u522b\uff0c\u53ef\u9009\u4e3a\"\u7537\"\u6216\"\u5973\" |\r\n| constellation | String | \"\u672a\u77e5\u661f\u5ea7\"   | \u5426    | \u661f\u5ea7\uff0c\u5982\"\u72ee\u5b50\u5ea7\"     |\r\n| zodiac        | String | \"\u672a\u77e5\u751f\u8096\"   | \u5426    | \u751f\u8096\uff0c\u5982\"\u9f99\"       |\r\n| lunar_birthday        | String |  None  | \u5426    | \u519c\u5386\u7684\u516c\u5386\u751f\u65e5 |\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n```python\r\nimport NumberGenerate\r\n\r\nIDCard = NumberGenerate.IDCardGenerate()\r\n\r\nresult = IDCard.get_id_card(\r\n    id_card=\"44****2000******28\",\r\n    address=\"\u5e7f\u4e1c|\u63ed\u9633|\",\r\n    gender=\"\u5973\",\r\n    constellation=\"\u72ee\u5b50\u5ea7\",\r\n    zodiac=\"\u9f99\"\r\n)\r\n```\r\n**\u793a\u4f8b\u8f93\u51fa**\r\n```python\r\n# \u8c03\u7528\u65b9\u6cd5\u540e\uff0c\u8fd4\u56de\u7ed3\u679c\r\nresult = ['445201200007230328', '445201200007231128', '445201200007233828', '445201200007234628', ...]\r\n```\r\n\r\n#### NumberGenerate.IDCardGenerate().generator_date\r\n> \u5e74\u4efd\u65e5\u671f\u751f\u6210\r\n\r\n| \u5c5e\u6027            | \u7c7b\u578b     | \u9ed8\u8ba4\u503c | \u662f\u5426\u5fc5\u586b | \u8bf4\u660e            |\r\n|:--------------|:-------|:----|:-----|:--------------|\r\n| date_str       | String | \u65e0   | \u662f    | \u6a21\u7cca\u5e74\u4efd\u65e5\u671f - \"****\\[\u5e74\\]\\*\\*\\[\u6708\\]\\*\\*\\[\u65e5\\]\"  |\r\n| constellation  | String | \"\u672a\u77e5\u661f\u5ea7\"   | \u5426    | \u661f\u5ea7     |\r\n| zodiac        | String |  \"\u672a\u77e5\u751f\u8096\"  | \u5426    | \u751f\u8096 |\r\n| lunar_birthday        | String |  None  | \u5426    | \u519c\u5386\u7684\u516c\u5386\u751f\u65e5 |\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n```python\r\nimport NumberGenerate\r\n\r\nIDCard = NumberGenerate.IDCardGenerate()\r\n\r\nresult = IDCard.generator_date(\r\n    '20******', \r\n    lunar_birthday=\"20240513\", \r\n    constellation=\"\u91d1\u725b\u5ea7\", \r\n    zodiac=\"\u9a6c\"\r\n)\r\n```\r\n**\u793a\u4f8b\u8f93\u51fa**\r\n```python\r\n# \u8c03\u7528\u65b9\u6cd5\u540e\uff0c\u8fd4\u56de\u7ed3\u679c\r\nresult = ['20020517', '20140504']\r\n```\r\n\r\n\r\n### NumberGenerate.PhoneGenerate()\r\n\u4f7f\u7528\u7684\u53f7\u6bb5\u6570\u636e\u5e93 [db/area_code.db - phone_data](./db/area_code.db)<!-- @IGNORE PREVIOUS: link -->\r\n\r\n\u53f7\u6bb5\u5728\u7ebf\u67e5\u8be2\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e73\u53f0 **[[\u67e5\u53f7\u5427](https://www.chahaoba.com), [\u624b\u673a\u53f7\u6bb5\u7f51](https://telphone.cn)]**\r\n\r\n**\u7c7b\u5c5e\u6027**\r\n\r\n| \u5c5e\u6027           | \u7c7b\u578b     | \u9ed8\u8ba4\u503c  | \u8bf4\u660e            |\r\n|:--------------|:-------  |:----|:--------------|\r\n| api_function   | Function | from NumberGenerate import api   | \u5728\u7ebfAPI\u67e5\u8be2|\r\n| db_function    | Function   | from NumberGenerate import db   | \u672c\u5730\u6570\u636e\u5e93\u67e5\u8be2\u51fd\u6570|\r\n| is_db      | Bool   | True  | \u662f\u5426\u5f00\u542f\u6570\u636e\u5e93\u67e5\u8be2,\u9ed8\u8ba4\u5f00\u542f.\u5173\u95ed\u624d\u4f1a\u4f7f\u7528\u5728\u7ebf\u67e5\u8be2|\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n\r\n```python\r\nimport NumberGenerate\r\n\r\nPhone = NumberGenerate.PhoneGenerate()\r\n# \u5173\u95ed\u79bb\u7ebf(\u672c\u5730\u6570\u636e\u5e93)\u67e5\u8be2\r\nPhone.is_db = False\r\n\r\n# \u66f4\u6539\u81ea\u5b9a\u4e49\u67e5\u8be2\u63a5\u53e3\r\n'''\r\n[\u5fc5\u9009]:param incomplete_phone:        \u6a21\u7cca\u624b\u673a\u53f7\r\n[\u53ef\u9009]:param city_name:               \u5e02\r\n:return:                        [\u53f7\u6bb5...]\r\n'''\r\nPhone.api_function = lambda incomplete_phone, city_name: [\"1588854\"]\r\n\r\nfrom NumberGenerate import api\r\n\r\n# \u8fd0\u8425\u5546\u53f7\u6bb5\u66f4\u6362\r\n# {\"\u79fb\u52a8\": [\"134\", \"135\", ...],\"\u8054\u901a\": [\"130\", \"131\", ...], \"\u7535\u4fe1\": [\"133\", \"149\", ...]}\r\napi.PHONE_ISP_CODES[\"\u79fb\u52a8\"].append(\"188\")\r\n# \u66f4\u6362 \u67e5\u53f7\u5427\r\nPhone.api_function = api.cha_hao_ba\r\n# \u66f4\u6362 \u624b\u673a\u53f7\u6bb5\u7f51 [\u9ed8\u8ba4\u662f\u6b64\u624b\u673a\u53f7\u6bb5\u7f51]\r\nPhone.api_function = api.tel_phone\r\n```\r\n\r\n#### NumberGenerate.PhoneGenerate().get_phone\r\n> \u624b\u673a\u53f7\u7801\u751f\u6210\r\n\r\n| \u5c5e\u6027            | \u7c7b\u578b     | \u9ed8\u8ba4\u503c | \u662f\u5426\u5fc5\u586b | \u8bf4\u660e            |\r\n|:--------------|:-------|:----|:-----|:--------------|\r\n| incomplete_phone| String | \u65e0   | \u662f    | \u6a21\u7cca\u624b\u673a\u53f7        |\r\n| city_name       | String | None   | \u5426    | \u5730\u533a\u540d\uff0c\u683c\u5f0f\u4e3a \u7701\u6216\u5e02\u540d     |\r\n| isp       | String | None   | \u5426    | \u8fd0\u8425\u5546     |\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n\r\n```python\r\nimport NumberGenerate\r\n\r\nPhone = NumberGenerate.PhoneGenerate()\r\n\r\nresult = Phone.get_phone(\r\n    city_name=\"\u6bd5\u8282\",\r\n    incomplete_phone=\"13*****3434\",\r\n    isp=\"\u8054\u901a\"\r\n)\r\n```\r\n**\u793a\u4f8b\u8f93\u51fa**\r\n```python\r\n# \u8c03\u7528\u65b9\u6cd5\u540e\uff0c\u8fd4\u56de\u7ed3\u679c\r\nresult = [13017063434, 13035543434, 13048543434, 13048553434, ...]\r\n```\r\n\r\n#### NumberGenerate.PhoneGenerate().generate_phone_area\r\n> \u624b\u673a\u53f7\u6bb5\u751f\u6210\r\n\r\n| \u5c5e\u6027             | \u7c7b\u578b   | \u9ed8\u8ba4\u503c |\u662f\u5426\u5fc5\u586b| \u8bf4\u660e             |\r\n|:--------------  |:-------|:---- |:----- |:--------------|\r\n| incomplete_phone| String | \u65e0   | \u662f     | \u6a21\u7cca\u624b\u673a\u53f7      |\r\n| city_name       | String | None | \u5426    | \u5730\u533a\u540d\uff0c\u683c\u5f0f\u4e3a \u7701\u6216\u5e02\u540d|\r\n| isp             | String | None | \u5426    | \u8fd0\u8425\u5546          |\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n\r\n```python\r\nimport NumberGenerate\r\n\r\nPhone = NumberGenerate.PhoneGenerate()\r\n\r\nresult = Phone.generate_phone_area(\r\n    city_name=\"\u5317\u4eac\",\r\n    incomplete_phone=\"1*******434\",\r\n    isp=\"\u865a\u62df\"\r\n)\r\n```\r\n**\u793a\u4f8b\u8f93\u51fa**\r\n```python\r\n# \u8c03\u7528\u65b9\u6cd5\u540e\uff0c\u8fd4\u56de\u7ed3\u679c\r\nresult = ['1621002', '1621003', '1621004', '1621001']\r\n```\r\n\r\n\r\n### NumberGenerate.NameGenerate()\r\n\u751f\u6210\u59d3\u540d,\u652f\u6301\u672a\u77e5,\u62fc\u97f3,\u7f29\u5199,\u4e2d\u6587\u591a\u79cd\u4f20\u53c2\u65b9\u5f0f\r\n\r\n**\u7c7b\u5c5e\u6027**\r\n\r\n| \u5c5e\u6027           | \u7c7b\u578b     | \u9ed8\u8ba4\u503c  | \u8bf4\u660e            |\r\n|:--------------|:-------  |:----|:--------------|\r\n| CommonlyUsedSurname   | List | Name.CommonlyUsedSurname  | \u767e\u5bb6\u59d3|\r\n\r\n**\u5b9e\u4f8b\u5316\u4f20\u53c2**\r\n\r\n| \u5c5e\u6027            | \u7c7b\u578b     | \u9ed8\u8ba4\u503c | \u662f\u5426\u5fc5\u586b | \u8bf4\u660e            |\r\n|:--------------|:-------|:----|:-----|:--------------|\r\n| rare_word       | Bool | False   | \u5426    | \u751f\u50fb\u5b57        |\r\n| common_words       | Bool | True   | \u5426    | \u5e38\u7528\u5b57|\r\n| secondary_common_words | Bool | True   | \u5426    | \u6b21\u8981\u5e38\u7528\u5b57|\r\n| all_words | Bool | False   | \u5426    | \u6240\u6709\u6c49\u5b57 |\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n```python\r\nimport NumberGenerate\r\n\r\nName = NumberGenerate.NameGenerate(\r\n    rare_word=False,\r\n    common_words=True,\r\n    secondary_common_words=True,\r\n    all_words=False\r\n)\r\n```\r\n\r\n\r\n#### NumberGenerate.NameGenerate().add_words\r\n> \u6dfb\u52a0\u672a\u77e5\u6c49\u5b57\r\n\r\n| \u5c5e\u6027            | \u7c7b\u578b     | \u9ed8\u8ba4\u503c | \u662f\u5426\u5fc5\u586b | \u8bf4\u660e            |\r\n|:--------------|:-------|:----|:-----|:--------------|\r\n| words       | List | \u65e0   | \u662f    | \u4f20\u5165\u7684\u6c49\u5b57\u5217\u8868. \u5982\u679c\u5185\u7f6e\u7684\u6c49\u5b57\u5e76\u6ca1\u6709\u5305\u542b\u4f60\u9700\u8981\u7684 |\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n\r\n```python\r\nimport NumberGenerate\r\n\r\nName = NumberGenerate.NameGenerate()\r\n\r\nName.add_words([\"\u6c49\", \"\u5b57\"])\r\n```\r\n\r\n\r\n#### NumberGenerate.NameGenerate().get_names\r\n> \u59d3\u540d\u751f\u6210\r\n\r\n| \u5c5e\u6027            | \u7c7b\u578b     | \u9ed8\u8ba4\u503c | \u662f\u5426\u5fc5\u586b | \u8bf4\u660e            |\r\n|:--------------|:-------|:----|:-----|:--------------|\r\n| name       | List | \u65e0   | \u662f    | \u59d3\u540d\u5217\u8868|\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n\r\n```python\r\nimport NumberGenerate\r\n\r\nName = NumberGenerate.NameGenerate()\r\n\r\nresult = Name.get_names(['ou', '\u9633', 'na', '*'])\r\n```\r\n**\u793a\u4f8b\u8f93\u51fa**\r\n```python\r\n# \u8c03\u7528\u65b9\u6cd5\u540e\uff0c\u8fd4\u56de\u7ed3\u679c\r\nresult = ['\u6bb4\u9633\u637a\u8638', '\u6bb4\u9633\u637a\u9576', '\u6bb4\u9633\u637a\u74e4', '\u6bb4\u9633\u637a\u77d7', ...]\r\n```\r\n\r\n\r\n\r\n### NumberGenerate.SaveFile()\r\n\u6570\u636e\u50a8\u5b58\r\n\r\n**\u7c7b\u5c5e\u6027**\r\n\r\n| \u5c5e\u6027           | \u7c7b\u578b     | \u9ed8\u8ba4\u503c  | \u8bf4\u660e            |\r\n|:--------------|:-------  |:----|:--------------|\r\n| current_dir_path   | String | os.getcwd()  | \u6587\u4ef6\u50a8\u5b58\u9ed8\u8ba4\u8def\u5f84|\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n\r\n```python\r\nimport NumberGenerate\r\n\r\nsaveFile = NumberGenerate.SaveFile()\r\n# \u66f4\u6539\u50a8\u5b58\u8def\u5f84\r\nsaveFile.current_dir_path = 'C:/'\r\n```\r\n\r\n#### Generate.NameGenerate().generate_vcf\r\n> vcf\u6587\u4ef6\u751f\u6210\r\n\r\n| \u5c5e\u6027            | \u7c7b\u578b     | \u9ed8\u8ba4\u503c | \u662f\u5426\u5fc5\u586b | \u8bf4\u660e            |\r\n|:--------------|:-------|:----|:-----|:--------------|\r\n| numbers       | List | \u65e0   | \u662f    | \u50a8\u5b58\u53f7\u7801|\r\n| output_file       | String | \"data.txt\"   | \u5426    | \u50a8\u5b58\u8def\u5f84|\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n```python\r\nimport NumberGenerate\r\n\r\nsaveFile = NumberGenerate.SaveFile()\r\n\r\nsaveFile.generate_vcf(['13812344321', '13812344322', ...])\r\n```\r\n\r\n\r\n#### Generate.NameGenerate().generate_txt\r\n> txt\u6587\u4ef6\u751f\u6210\r\n\r\n| \u5c5e\u6027            | \u7c7b\u578b     | \u9ed8\u8ba4\u503c | \u662f\u5426\u5fc5\u586b | \u8bf4\u660e            |\r\n|:--------------|:-------|:----|:-----|:--------------|\r\n| numbers       | List | \u65e0   | \u662f    | \u50a8\u5b58\u53f7\u7801|\r\n| output_file       | String | \"contacts.vcf\"   | \u5426    | \u50a8\u5b58\u8def\u5f84|\r\n\r\n**\u793a\u4f8b\u4ee3\u7801**\r\n```python\r\nimport NumberGenerate\r\n\r\nsaveFile = NumberGenerate.SaveFile()\r\n\r\nsaveFile.generate_txt(['data1', 'data2'])\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "CN-NumberGenerate",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/FourTwooo/NumberGenerate"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3330d7a9f86534ee199493c5f3f096f1cae3a1d3b4172e5de22c613fa3acaeb",
                "md5": "a41e04754a5f0da5f15b1e2943353f8d",
                "sha256": "ff9e76563a26ac56d3a820a072c762568c56136db7320bf9c217ca5fd5357230"
            },
            "downloads": -1,
            "filename": "NumberGenerate-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a41e04754a5f0da5f15b1e2943353f8d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4906886,
            "upload_time": "2024-11-22T08:37:45",
            "upload_time_iso_8601": "2024-11-22T08:37:45.951905Z",
            "url": "https://files.pythonhosted.org/packages/a3/33/0d7a9f86534ee199493c5f3f096f1cae3a1d3b4172e5de22c613fa3acaeb/NumberGenerate-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "166b9fa31d93e50399689c48adee310b11c028db7451fe12f4468b3783d55a98",
                "md5": "ab584da72663672505375ab004789dd1",
                "sha256": "1336d9db85b659a6527e7f35bc36d3877d32ed3059b7adbfb7e88eceb98f03a0"
            },
            "downloads": -1,
            "filename": "NumberGenerate-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ab584da72663672505375ab004789dd1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4837842,
            "upload_time": "2024-11-22T08:38:04",
            "upload_time_iso_8601": "2024-11-22T08:38:04.347137Z",
            "url": "https://files.pythonhosted.org/packages/16/6b/9fa31d93e50399689c48adee310b11c028db7451fe12f4468b3783d55a98/NumberGenerate-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 08:38:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "FourTwooo",
    "github_project": "NumberGenerate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "numbergenerate"
}
        
42
Elapsed time: 0.42898s