{ "info": { "author": "lalala223", "author_email": "hi@lalala.ink", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "# phone-db\n\u624b\u673a\u53f7\u7801\u5f52\u5c5e\u5730SQLite\u6570\u636e\u5e93\n\n#### \u5b89\u88c5\n```\npip install phone-db\n```\n\n#### \u4f7f\u7528\uff1a\n##### \u67e5\u8be2\u6570\u636e\u5e93\u4e2d\u624b\u673a\u53f7\u6bb5\u603b\u6761\u6570\n```\n>>> from phone_db import Session, Phone, Region\n>>> session = Session()\n>>> session.query(Phone).count()\n415284\n```\n\n##### \u67e5\u8be2\u5317\u4eac\u5e02\u8054\u901a\u624b\u673a\u53f7\u6bb5\u603b\u6761\u6570\n```\n>>> city = session.query(Region).filter_by(zip_code='100000').first()\n>>> if city:\n... city.phones.filter_by(type=2).count()\n...\n6355\n```\n\n##### \u67e5\u8be2\u6307\u5b9a\u624b\u673a\u53f7\u6bb5\u5f52\u5c5e\u5730\u4fe1\u606f\n```\n>>> num = session.query(Phone).filter_by(number=1761166).first()\n>>> if num:\n... num.detail()\n...\n(1761166, '\u8054\u901a', {'province': '\u5317\u4eac', 'city': '\u5317\u4eac', 'zip_code': '100000', 'area_code': '010'})\n```\n\n#### \u6570\u636e\u8868\u7ed3\u6784\n\n##### phones\u8868\n```\nid INTEGER NOT NULL,\nnumber INTEGER,\ntype INTEGER,\nregion_id INTEGER,\nPRIMARY KEY (id),\nFOREIGN KEY(region_id) REFERENCES regions (id)\n```\n\n##### regions\u8868\n```\nid INTEGER NOT NULL,\nprovince VARCHAR,\ncity VARCHAR,\nzip_code VARCHAR,\narea_code VARCHAR,\nPRIMARY KEY (id)\n```\n\n#### phones\u8868type\u5b57\u6bb5\u5361\u7c7b\u578b\u5b9a\u4e49\n```\n* 1 \u79fb\u52a8\n* 2 \u8054\u901a\n* 3 \u7535\u4fe1\n* 4 \u7535\u4fe1\u865a\u62df\u8fd0\u8425\u5546\n* 5 \u8054\u901a\u865a\u62df\u8fd0\u8425\u5546\n* 6 \u79fb\u52a8\u865a\u62df\u8fd0\u8425\u5546\n```\n\n#### \u6570\u636e\u53ef\u89c6\u5316\n\u4e0b\u8f7d[phone.db](https://raw.githubusercontent.com/lalala223/phone-db/master/phone_db/phone.db)\u6587\u4ef6\uff0c\u4f7f\u7528[sqlitebrowser](https://github.com/sqlitebrowser/sqlitebrowser)\u67e5\u770b\n\n#### \u8bb0\u5f55\u6761\u6570\n\n415284 (updated:2019\u5e742\u6708)\n\n#### \u6570\u636e\u6765\u6e90\n\n[https://github.com/ls0f/phone](https://github.com/ls0f/phone)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lalala223/phone-db", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "phone-db", "package_url": "https://pypi.org/project/phone-db/", "platform": "", "project_url": "https://pypi.org/project/phone-db/", "project_urls": { "Homepage": "https://github.com/lalala223/phone-db" }, "release_url": "https://pypi.org/project/phone-db/1.0.3/", "requires_dist": [ "sqlalchemy" ], "requires_python": "", "summary": "\u624b\u673a\u53f7\u7801SQLite\u6570\u636e\u5e93", "version": "1.0.3" }, "last_serial": 4844093, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "58b987bed6e2a00736255fb21c9c671a", "sha256": "8ded1f607b8a4c8f3fb609d4e7996ff847efee91cf375bfa37ae23971efd1d53" }, "downloads": -1, "filename": "phone_db-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "58b987bed6e2a00736255fb21c9c671a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4339, "upload_time": "2019-02-20T06:18:34", "url": "https://files.pythonhosted.org/packages/d3/8d/c276f8729e3f1a937654dd59c8c43decf42974a625e0e9ca201bfefcb2e2/phone_db-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2a6f16cd3d4cb3be46a83ee5c3ec7f77", "sha256": "dd14bf260aee9d2d9bf740e4fb6cada2a533035fe58f8744479b7ccb74443c26" }, "downloads": -1, "filename": "phone-db-1.0.0.tar.gz", "has_sig": false, "md5_digest": "2a6f16cd3d4cb3be46a83ee5c3ec7f77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3014, "upload_time": "2019-02-20T06:18:36", "url": "https://files.pythonhosted.org/packages/68/57/1134acea1bb0cd6ab8f70f82a93b651e0ce94e68685f8c98d01567589f26/phone-db-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "92b18aa922c2cc4b38fcf997ac81d857", "sha256": "2f155ccc9d6b283f07008e88a5585880f652a034b4fe1de4d6aaff174650b29b" }, "downloads": -1, "filename": "phone_db-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "92b18aa922c2cc4b38fcf997ac81d857", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4365, "upload_time": "2019-02-20T07:03:51", "url": "https://files.pythonhosted.org/packages/29/e6/eb5b945cb68d27da8d43f13f384ae41242a4963c7f56ac50f417099bab52/phone_db-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92503607f638825acf8e668ead675150", "sha256": "a6e5f132d8f1d9c90a55d877cfbcf6543b84c4b7f04424fb3f9e5c1db2b3678a" }, "downloads": -1, "filename": "phone-db-1.0.1.tar.gz", "has_sig": false, "md5_digest": "92503607f638825acf8e668ead675150", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3051, "upload_time": "2019-02-20T07:03:53", "url": "https://files.pythonhosted.org/packages/8a/0b/6a905110c5c7524ab43be062245468a963861606e6cb148de4e344adfe38/phone-db-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "301324b34d86379256809807fc037b85", "sha256": "076a64a8c0abae8acff1e23581218b0b48b741f758f265040a3e88f5ecbe9979" }, "downloads": -1, "filename": "phone_db-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "301324b34d86379256809807fc037b85", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4384, "upload_time": "2019-02-20T07:26:16", "url": "https://files.pythonhosted.org/packages/f9/03/a47a44b1437af36d034b8182482b87a155e76e9b989f0419ca3b905ed41d/phone_db-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c69e80802bd640df640f6cb036114015", "sha256": "2df712fe29857142ff751046c0b7bdf64d8653d267488a835b6025620df46432" }, "downloads": -1, "filename": "phone-db-1.0.2.tar.gz", "has_sig": false, "md5_digest": "c69e80802bd640df640f6cb036114015", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3135, "upload_time": "2019-02-20T07:26:17", "url": "https://files.pythonhosted.org/packages/7a/18/3c581953b082673d6c31d012012e921b0b98db014da4a1614b7fe65c8a6b/phone-db-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "e61deae163db28c307a3bebffbdd3334", "sha256": "5aa75a01cfb43a4e6f376fb1143c5a2e88c66a89f14754139435ba902b686045" }, "downloads": -1, "filename": "phone_db-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e61deae163db28c307a3bebffbdd3334", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5245191, "upload_time": "2019-02-20T07:32:55", "url": "https://files.pythonhosted.org/packages/c7/49/3635bc5672841641556221e0066b85b37d0b2d295f46678242f9139263d4/phone_db-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ba69adf658c52175e96f5481d41884d6", "sha256": "2252cae09fa4c6be07002af856f585036d323802ed337de0f9f8edcfced5d5ea" }, "downloads": -1, "filename": "phone-db-1.0.3.tar.gz", "has_sig": false, "md5_digest": "ba69adf658c52175e96f5481d41884d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5242143, "upload_time": "2019-02-20T07:32:58", "url": "https://files.pythonhosted.org/packages/fc/92/c62424c512d001ade86efdccc92a0c795e1fca3e2df93e7c937e8177be70/phone-db-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e61deae163db28c307a3bebffbdd3334", "sha256": "5aa75a01cfb43a4e6f376fb1143c5a2e88c66a89f14754139435ba902b686045" }, "downloads": -1, "filename": "phone_db-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e61deae163db28c307a3bebffbdd3334", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5245191, "upload_time": "2019-02-20T07:32:55", "url": "https://files.pythonhosted.org/packages/c7/49/3635bc5672841641556221e0066b85b37d0b2d295f46678242f9139263d4/phone_db-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ba69adf658c52175e96f5481d41884d6", "sha256": "2252cae09fa4c6be07002af856f585036d323802ed337de0f9f8edcfced5d5ea" }, "downloads": -1, "filename": "phone-db-1.0.3.tar.gz", "has_sig": false, "md5_digest": "ba69adf658c52175e96f5481d41884d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5242143, "upload_time": "2019-02-20T07:32:58", "url": "https://files.pythonhosted.org/packages/fc/92/c62424c512d001ade86efdccc92a0c795e1fca3e2df93e7c937e8177be70/phone-db-1.0.3.tar.gz" } ] }