Skip to main content

VKSlaves

Asynchronous api wrapper for the game from vk.com called "slaves"

Example of usage

import asyncio
from vkslaves import SlavesAPI
from vkslaves.errors import SlaveAreLockedError, NotEnoughMoneyError

slaves_api = SlavesAPI(
    app_auth="vk_access_token_settings=friends,status&vk_app_id=7794757..."
)


async def main():
    await slaves_api.start()  # update .me and .slaves
    print(slaves_api.me.balance)  # get your balance
    user = await slaves_api.user(1)  # get info about vk.com/id1
    print(user.master_id)  # get id of user's master
    try:
        await svales_api.buy_slave(1)
    except SlaveAreLockedError:
        print(" Oh no :( ")
    except NotEnoughMoneyError:
        print(" I need more money :( ")


asyncio.run(main())

I'm too lazy to write documentation, just look at the names of the functions and docstrings

Metadata

Release files for VKSlaves 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for VKSlaves 1.1.1
File Size Uploaded
VKSlaves-1.1.1.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for VKSlaves 1.1.1
File Interpreter ABI Platform
VKSlaves-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 36.0 kB

Release files / VKSlaves-1.1.1.tar.gz

Download URL VKSlaves-1.1.1.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3f1f1a09a2b0bf590ddba0aba44abcfd115cdc8bfec0ef13b8e5e35a49ddfd3d
BLAKE2b-256 checksum
How to use checksums
8de77687508aad2ddd703b70efbdf5f2e4f264c2bd49235baa97e1d222ea9612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.6

Release files / VKSlaves-1.1.1-py3-none-any.whl

Download URL VKSlaves-1.1.1-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b365daf95d661c0ce6c9147bd9a74af3592a37ec5ccf144442f65761eaed415
BLAKE2b-256 checksum
How to use checksums
f3052e4cba8f4d8af8b0794b13a883354c7644c39904ca583cb0c621d8aa6d90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.9.0 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

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