Skip to main content

winney

pypi Codacy Badge

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)

Source distribution for winney 0.5.6
File Size Uploaded
winney-0.5.6.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for winney 0.5.6
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.5.6 This release

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.10

2 release files

0.3.9

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page