{ "info": { "author": "Tinywan", "author_email": "756684177@qq.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684python\u65e5\u5fd7\u5305\n\n\u73af\u5883\n```\npython > 3.5\n```\n\n\u5b89\u88c5\n```\npip install t_log\n```\n\n\u5982\u4f55\u4f7f\u7528\n```python\n#!/usr/bin/python3\n\nfrom t_log import logger\n\nlog = logger.logger()\n\nlog.critical(\"\u8fd9\u662f\u4e00\u4e2a critical \u7ea7\u522b\u7684\u95ee\u9898\uff01\")\nlog.error(\"\u8fd9\u662f\u4e00\u4e2a error \u7ea7\u522b\u7684\u95ee\u9898\uff01\")\nlog.warning(\"\u8fd9\u662f\u4e00\u4e2a warning \u7ea7\u522b\u7684\u95ee\u9898\uff01\")\nlog.info(\"\u8fd9\u662f\u4e00\u4e2a info \u7ea7\u522b\u7684\u95ee\u9898\uff01\")\nlog.debug(\"\u8fd9\u662f\u4e00\u4e2a debug \u7ea7\u522b\u7684\u95ee\u9898\uff01\")\n```\n\n#### \u6559\u7a0b \n\u5b98\u65b9\u6587\u6863 \uff1ahttps://packaging.python.org/tutorials/packaging-projects/#uploading-your-project-to-pypi\n```\ntwine : \u65e0\u6cd5\u5c06\u201ctwine\u201d\u9879\u8bc6\u522b\u4e3a cmdlet\u3001\u51fd\u6570\u3001\u811a\u672c\u6587\u4ef6\u6216\u53ef\u8fd0\u884c\u7a0b\u5e8f\u7684\u540d\u79f0\u3002\n```\n> \u914d\u7f6e\u73af\u5883\u53d8\u91cf `C:\\Users\\tinyw\\AppData\\Roaming\\Python\\Python37\\Scripts`\n\nhttps://pypi.org/manage/account/\n```\nHTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://test.pypi.org/legacy/\n```\n\n```\nUnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 197: illegal multibyte sequence\n```\n* \u89e3\u51b3\u529e\u6cd51\uff1a`FILE_OBJECT= open('order.log','r', encoding='UTF-8')`\n* \u89e3\u51b3\u529e\u6cd52\uff1a`FILE_OBJECT= open('order.log','rb')`\n\n## \u6253\u5305\n\n#### \u751f\u6210\u5305\n\n* \u5b89\u88c5 `setuptools`\u5e76 `wheel` \u5b89\u88c5\u4e86\u6700\u65b0\u7248\u672c\n ```\n python3 -m pip install --user --upgrade setuptools wheel\n ``` \n* \u73b0\u5728\u4ece `setup.py` \u4f4d\u4e8e\u7684\u540c\u4e00\u76ee\u5f55\u8fd0\u884c\u6b64\u547d\u4ee4 \n ```\n python3 setup.py sdist bdist_wheel\n ```\n* \u4ee5\u4e0a\u547d\u4ee4\u5e94\u8f93\u51fa\u5927\u91cf\u6587\u672c\uff0c\u4e00\u65e6\u5b8c\u6210\uff0c\u5e94\u5728dist\u76ee\u5f55\u4e2d\u751f\u6210\u4e24\u4e2a\u6587\u4ef6\n ```\n dist/\n example_pkg-0.0.1-py3-none-any.whl\n example_pkg-0.0.1.tar.gz\n ```\n\u8be5`tar.gz`\u6587\u4ef6\u662f\u6e90\u5b58\u6863\uff0c\u800c\u8be5`.whl`\u6587\u4ef6\u662f\u6784\u5efa\u7684\u5206\u53d1\u3002\u8f83\u65b0\u7684pip\u7248\u672c\u4f18\u5148\u5b89\u88c5\u6784\u5efa\u7684\u53d1\u884c\u7248\uff0c\u4f46\u5982\u679c\u9700\u8981\uff0c\u5c06\u56de\u9000\u5230\u6e90\u4ee3\u7801\u5b58\u6863\u3002\u60a8\u5e94\u8be5\u59cb\u7ec8\u4e0a\u4f20\u6e90\u5b58\u6863\u5e76\u4e3a\u9879\u76ee\u517c\u5bb9\u7684\u5e73\u53f0\u63d0\u4f9b\u6784\u5efa\u7684\u5b58\u6863\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u7684\u793a\u4f8b\u5305\u5728\u4efb\u4f55\u5e73\u53f0\u4e0a\u90fd\u4e0ePython\u517c\u5bb9\uff0c\u56e0\u6b64\u53ea\u9700\u8981\u4e00\u4e2a\u6784\u5efa\u7684\u53d1\u884c\u7248\u3002 \n\n#### \u53d1\u5e03\u5305 \n\n\u4f7f\u7528twine\u4e0a\u4f20\u5206\u53d1\u5305\u3002 \u4f60\u9700\u8981\u5b89\u88c5Twine\uff1a\n```\npython3 -m pip install --user --upgrade twine\n```\n> \u5982\u679c\u662fWindows \u6e05\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u91cd\u65b0\u6253\u5f00 \n\n\u91cd\u65b0\u6253\u5305\n```\npython3 setup.py sdist bdist_wheel\n```\n\n\u8fd0\u884cTwine\u4e0a\u4f20\u6240\u6709\u5b58\u6863dist\n\n```\nPS D:\\Git\\t_log> twine upload dist/*\n```\n\u7cfb\u7edf\u5c06\u63d0\u793a\u60a8\u8f93\u5165\u4f7f\u7528Test PyPI\u6ce8\u518c\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002\u547d\u4ee4\u5b8c\u6210\u540e\uff0c\u60a8\u5e94\u8be5\u770b\u5230\u4e0e\u6b64\u7c7b\u4f3c\u7684\u8f93\u51fa\n```\nEnter your username: Tinywan\nEnter your password:\nUploading distributions to https://upload.pypi.org/legacy/\nUploading t_log-0.51-py3-none-any.whl\n 76%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\n\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 10.5k/10.5k [00:03<00:00, 3.31kB/s]\nUploading t_log-0.51.tar.gz\n100%|\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\n\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 9.50k/9.50k [00:01<00:00, 9.24kB/s]\n```\n>\u6ce8\u610f:\u5982\u679c\u60a8\u6536\u5230\u9519\u8bef\u6d88\u606f\uff0c\u5219\u9700\u8981\u4e3a\u60a8\u7684\u5305\u9009\u62e9\u4e00\u4e2a\u552f\u4e00\u7684\u540d\u79f0\u3002\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9 \u3002\u66f4\u65b0\u53c2\u6570 \uff0c\u5220\u9664\u6587\u4ef6\u5939\uff0c\u7136\u540e \u91cd\u65b0\u751f\u6210\u5b58\u6863\u3002`The user '[your username]' isn't allowed to upload to project 'example-pkg'example_pkg_your_usernamenamesetup.pydist`\n\n\u5305\u53d1\u5e03\u5b8c\u6210\u540e\uff0c\u5176\u4ed6\u4eba\u53ea\u9700\u8981\u4f7f\u7528pip\u5c31\u53ef\u4ee5\u5b89\u88c5\u4f60\u7684\u5305\u6587\u4ef6\u3002\u6bd4\u5982\n```\npip install package-name\n```\n\n\u5305\u53d1\u5e03\u5b8c\u6210\u540e\uff0c\u5176\u4ed6\u4eba\u53ea\u9700\u8981\u4f7f\u7528pip\u5c31\u53ef\u4ee5\u5b89\u88c5\u4f60\u7684\u5305\u6587\u4ef6\u3002\u6bd4\u5982\n```\npip install package-name --upgrade\n```\n\n#### \u5982\u4f55\u4f7f\u7528\n* \u5b89\u88c5\n```\npip install t_log\n```\n\n* \u5347\u7ea7\u5305\n```\npip install --upgrade t_log \n```\n\n* \u5378\u8f7d\u5305\n```\npip uninstall t_log\n```\n\n* \u641c\u7d22\n```\npip search t_log\n```\n\n\n* \u5347\u7ea7pip\u672c\u8eab\n```\npip install --upgrade pip\n```\n\n\u53ef\u80fd\u9047\u5230\u7684\u9519\u8bef\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/Tinywan/t_log", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "t-log", "package_url": "https://pypi.org/project/t-log/", "platform": "", "project_url": "https://pypi.org/project/t-log/", "project_urls": { "Homepage": "https://github.com/Tinywan/t_log" }, "release_url": "https://pypi.org/project/t-log/0.52/", "requires_dist": null, "requires_python": "", "summary": "A small log package", "version": "0.52" }, "last_serial": 4575316, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "f46553065fcdee5756d722232987f712", "sha256": "c43f1bd89e34e78c4fa3cfb24a61129a33137f551bffc04147129e7b0e93a835" }, "downloads": -1, "filename": "t_log-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f46553065fcdee5756d722232987f712", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4810, "upload_time": "2018-12-07T06:32:30", "url": "https://files.pythonhosted.org/packages/92/1d/117a49f184336f588a90ff1f0480bbd3567ee16fec4020bce0308c31764e/t_log-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4bbdf68420200c3fb10d70861650bd7", "sha256": "436eb0bb041942ee30385a4c5d9afc566e6e49991c984c02a6d9db58942cbb05" }, "downloads": -1, "filename": "t_log-0.2.tar.gz", "has_sig": false, "md5_digest": "e4bbdf68420200c3fb10d70861650bd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2978, "upload_time": "2018-12-07T06:32:33", "url": "https://files.pythonhosted.org/packages/97/1f/99d5b2e11db8484058607f5112d1fab38b72ade961fc20e166b093b57d7e/t_log-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "9518c2e6bda69cdeb9ec1c2bfeb87a55", "sha256": "a0dd5bdecfb2c5198f2d01384ec3161ed29f6c5db154c4df79b3c3e92b0fb4f5" }, "downloads": -1, "filename": "t_log-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "9518c2e6bda69cdeb9ec1c2bfeb87a55", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4918, "upload_time": "2018-12-07T06:36:29", "url": "https://files.pythonhosted.org/packages/9b/72/aa0e210dc16720a7819f76d77ae787543f9ffe71b165536a7f9507d0b0be/t_log-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9671b4b7ea29579fdd1af8e45e1a6e83", "sha256": "dd0a1eae0e63b6791eec9a4e82e1063385ff8c7ae42a141218f634a1af2f142a" }, "downloads": -1, "filename": "t_log-0.3.tar.gz", "has_sig": false, "md5_digest": "9671b4b7ea29579fdd1af8e45e1a6e83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3111, "upload_time": "2018-12-07T06:36:32", "url": "https://files.pythonhosted.org/packages/a6/48/df59733289dc25ba93e1f010c37b20e0c3bb84c6815c1c11b29d60ffa2db/t_log-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "839686c78809c8025bcd02a592f3a7c3", "sha256": "03bf1560b6258e6633fee7f8f942cafa58df0ba4be1465a98abb7a4ee46c89e1" }, "downloads": -1, "filename": "t_log-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "839686c78809c8025bcd02a592f3a7c3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5061, "upload_time": "2018-12-07T06:51:02", "url": "https://files.pythonhosted.org/packages/77/34/f5c3a6830a4a92de934212df86097026cac78d4d41ca780dcab2d6e37c6e/t_log-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "560795c432c0202ab684c003f4c6ee11", "sha256": "691438898b1a728cd9e491e0f7e7fd69a3f004ed79c69739dd0926b1aa9fe292" }, "downloads": -1, "filename": "t_log-0.4.tar.gz", "has_sig": false, "md5_digest": "560795c432c0202ab684c003f4c6ee11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3312, "upload_time": "2018-12-07T06:51:05", "url": "https://files.pythonhosted.org/packages/6e/a3/a13a554ccb95ddfe3d8d07bfa7b54409a1e115248a74ab446ef0e76ec656/t_log-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "732d410c360922eb7c1fd8a65d2079e2", "sha256": "87662776dc1acd24ffad92e8da1154c18daa6c07ff280d1e2d94aac707d7410a" }, "downloads": -1, "filename": "t_log-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "732d410c360922eb7c1fd8a65d2079e2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5917, "upload_time": "2018-12-07T07:09:27", "url": "https://files.pythonhosted.org/packages/e8/41/a45aa8742806161e2aa9c237a2e7d1973fdf4805fda2962c20e881d7b030/t_log-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4286fd69704832adb2f1604f1d1964d", "sha256": "52e1364814d3b5be9e3d2daa9ddd5d79b00f43242f2ddfb8b97c60f08987c78a" }, "downloads": -1, "filename": "t_log-0.5.tar.gz", "has_sig": false, "md5_digest": "c4286fd69704832adb2f1604f1d1964d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3352, "upload_time": "2018-12-07T07:09:28", "url": "https://files.pythonhosted.org/packages/b1/6c/84edce141bd46e2c0b59ef041f5f8172a66de84cf1d72a79990d2ee6712d/t_log-0.5.tar.gz" } ], "0.51": [ { "comment_text": "", "digests": { "md5": "5e1f52074405898298f3927f3ba46020", "sha256": "b5086989890c150d8af878aeeeb78b41f79324d18d7e50cba6d847c48bf94adc" }, "downloads": -1, "filename": "t_log-0.51-py3-none-any.whl", "has_sig": false, "md5_digest": "5e1f52074405898298f3927f3ba46020", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4882, "upload_time": "2018-12-08T13:39:30", "url": "https://files.pythonhosted.org/packages/9e/11/b64a51e070c68153e1535ac9176383933a2b669f5de3a647a46caf437ba9/t_log-0.51-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c10f7b918be93db175964dc3511a7044", "sha256": "ed92ac1414b358f9f5be5eeba4167a788f4af51e006d75c2564b1ee7f9872917" }, "downloads": -1, "filename": "t_log-0.51.tar.gz", "has_sig": false, "md5_digest": "c10f7b918be93db175964dc3511a7044", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3840, "upload_time": "2018-12-08T13:39:32", "url": "https://files.pythonhosted.org/packages/41/2b/8edfa8b0b8663f982438a7dd19d713815b2fdd7f9e5bb3a2fc79452a6b78/t_log-0.51.tar.gz" } ], "0.52": [ { "comment_text": "", "digests": { "md5": "ceec8d8dbd10b50fe8800b98e73061e0", "sha256": "d608d4cb686e567305392700e72b9ab606e36a2b38f0895d8bc4ef6c985cbe70" }, "downloads": -1, "filename": "t_log-0.52-py3-none-any.whl", "has_sig": false, "md5_digest": "ceec8d8dbd10b50fe8800b98e73061e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5343, "upload_time": "2018-12-08T14:32:48", "url": "https://files.pythonhosted.org/packages/f1/fe/8012ead6de6c657ac75a6e354cafca45e57f76e852f3e2d98022ae9c0709/t_log-0.52-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be3e0e8a4cf512361a0c96c1f76030c3", "sha256": "b659c874a5f91a15cd77fc26bcb909eb3a7d5fc4f999f8f22728a94637ecc57a" }, "downloads": -1, "filename": "t_log-0.52.tar.gz", "has_sig": false, "md5_digest": "be3e0e8a4cf512361a0c96c1f76030c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4401, "upload_time": "2018-12-08T14:32:50", "url": "https://files.pythonhosted.org/packages/ba/9b/b49125546eacc6073b171b7c84bcc786bd8c38a0199160c7e5766f0cbd14/t_log-0.52.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ceec8d8dbd10b50fe8800b98e73061e0", "sha256": "d608d4cb686e567305392700e72b9ab606e36a2b38f0895d8bc4ef6c985cbe70" }, "downloads": -1, "filename": "t_log-0.52-py3-none-any.whl", "has_sig": false, "md5_digest": "ceec8d8dbd10b50fe8800b98e73061e0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5343, "upload_time": "2018-12-08T14:32:48", "url": "https://files.pythonhosted.org/packages/f1/fe/8012ead6de6c657ac75a6e354cafca45e57f76e852f3e2d98022ae9c0709/t_log-0.52-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be3e0e8a4cf512361a0c96c1f76030c3", "sha256": "b659c874a5f91a15cd77fc26bcb909eb3a7d5fc4f999f8f22728a94637ecc57a" }, "downloads": -1, "filename": "t_log-0.52.tar.gz", "has_sig": false, "md5_digest": "be3e0e8a4cf512361a0c96c1f76030c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4401, "upload_time": "2018-12-08T14:32:50", "url": "https://files.pythonhosted.org/packages/ba/9b/b49125546eacc6073b171b7c84bcc786bd8c38a0199160c7e5766f0cbd14/t_log-0.52.tar.gz" } ] }