Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

VKSlaves

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

VKSlaves

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

  • 1.1.1
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc