winney
Install
pip install winney
Tutorial
from winney.winney import Address
from winney import Winney, retry
from winney.mock import Mock
class UserMock(Mock):
data = {"name": "olivetree"}
class UserCenter(object):
def __init__(self):
self.winney = Winney(host="localhost", port=5000)
self.init_functions()
def init_functions(self):
self.winney.register(method="post",
name="login",
uri="/api/login",
mock=False,
mock_data=None)
self.winney.register(method="get",
name="get_user",
uri="/api/user",
mock=True,
mock_data=UserMock())
def login(self, account, password):
r = self.winney.login(json={"account": account, "password": password})
return r.json()
def get_user(self, user_id):
r = self.winney.get_user(data={"user_id": user_id})
return r.json()
if __name__ == "__main__":
uc = UserCenter()
uc.login("hello", "123456")
Metadata
Release files for winney 0.5.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| winney-0.5.6.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| winney-0.5.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.8 kB
Release files / winney-0.5.6.tar.gz
| Download URL | winney-0.5.6.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53f7f7995b312ca6266ebf5862acaaba440e1180be77ffcadeba1c8bbadecdab
|
|
BLAKE2b-256 checksum How to use checksums |
59b591bcf08e7cf538cf39c9f9df528cbb6a83002b14a577d686f59864a5e6be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.9
|
Release files / winney-0.5.6-py3-none-any.whl
| Download URL | winney-0.5.6-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
788e1bafe9d200024e6b6bb3c45ea3a29b68614ff2177587a1e5fdd22f374d39
|
|
BLAKE2b-256 checksum How to use checksums |
81c9b9dc07ac915dd414968340511bed4baefcda8bf257cc49584af854a1f36b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|