those common functions of package for inner corporation
Project description
天智信达的库
用法
- 此库作为git项目管理,凡是修改完后应及时通知到开发团队
- 需要使用库中的方法,需要将项目下载的本地,然后进入到项目中执行 python setup.py install,这时候就可以在项目中引用库中的方法
- 引用的方法举例:
install
- pip install wisdoms
find the latest package of wisdoms
- pip list --outdated
upgrade
- pip install wisdoms --upgrade
generation
Make sure you installed setuptools and wheel.
Important: You must modify the version of the package in setup.py and delete folders (build, dist, egg-info)
- python setup.py sdist bdist_wheel
upload
Install twine before doing this
- twine upload dist/*
packet usage:
auth.py:
from wisdoms.auth import permit
host ={'AMQP_URI': "amqp://guest:guest@localhost"}
auth = permit(host)
class A:
@auth
def func():
pass
config.py
from wisdoms.config import c
# gains item of YML config
print(c.get('name'))
# transforms class into dict
d = c.to_dict()
print(d['name'])
common.py
from wisdoms.commons import revert, codes
def func():
# do something
# return revert(codes.code) or return revert(number)
return revert(1)
return revert(codes.SUCCESS)
如何设计包
- 顶级包:wisdom,代表天智,智慧
- 现阶段的约定:采用一级包的方式
- 不同的功能放在不同的文件(模块)即可做好方法的分类
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wisdoms-0.0.7.tar.gz
(5.9 kB
view details)
Built Distribution
File details
Details for the file wisdoms-0.0.7.tar.gz
.
File metadata
- Download URL: wisdoms-0.0.7.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71779693d9bf4d254bb5da1bb1066dc5e92d262ad9ddb49b066be22c692e8ff3 |
|
MD5 | a58ce641a22245ad33c4fa929cd18b1c |
|
BLAKE2b-256 | bf1a2da129a65302e28568ec032fa55ee54fc2872b8acc9dc14a1bfbbfab6fa7 |
File details
Details for the file wisdoms-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: wisdoms-0.0.7-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f426eefbf1fd99c66482c6abdd5e0cdc6fad8133a4d7937172c41229394ee0a |
|
MD5 | 63128442a185ac1ae51061ee8d13f862 |
|
BLAKE2b-256 | 838172b74cbe38dab9ef33c2f9dd377e2345f102726f4f606f92670bea5da491 |