Skip to main content

Async Python SoloBot API Wrapper

Project description

logo-main

solobot-web-api

LICENSE Supported Versions PyPI Version

Python library for interacting with SoloBot Web API.

README also available in:

Powered by 🥕 Морковный Бот

Installing

solobot-web-api is available on PyPI:

$ python -m pip install solobot-web-api

Officially supports Python 3.9+ and requires aiohttp.

API Version and Reference

Base api url: https://pocomacho.ru/solonetbot/api/v1/modules

API reference and official docs: https://pocomacho.ru/solonetbot/api/swagger

Usage Examples

You can find a raw scheme example in the docs: https://pocomacho.ru/solonetbot/api/openapi.json

Grant a license to a user:

import asyncio
from solowebapi import SoloWebAPI


async def main():
    api = SoloWebAPI("username", "password")
    active = await api.grant_license("example_module", 123)
    print("License active:", active)
    await api.close()


asyncio.run(main())

Check if a license is active:

import asyncio
from solowebapi import SoloWebAPI


async def main():
    api = SoloWebAPI("username", "password")
    is_active = await api.check_license("example_module", 123)
    print("License active:", is_active)
    await api.close()


asyncio.run(main())

Revoke a license:

import asyncio
from solowebapi import SoloWebAPI


async def main():
    api = SoloWebAPI("username", "password")
    revoked = await api.revoke_license("example_module", 123)
    print("License revoked:", revoked)
    await api.close()


asyncio.run(main())

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solobot_web_api-1.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solobot_web_api-1.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file solobot_web_api-1.0.1.tar.gz.

File metadata

  • Download URL: solobot_web_api-1.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for solobot_web_api-1.0.1.tar.gz
Algorithm Hash digest
SHA256 63969ee1fcbec2696c37940974fa90399edb75e0d975c4858a5a00cd084eddd0
MD5 53850f5ecf7e05b2258aec4eb1909c06
BLAKE2b-256 d63cc1aa35ee08d3d223cbd8557441b1ba5910c4457e651285460a143d797de2

See more details on using hashes here.

Provenance

The following attestation bundles were made for solobot_web_api-1.0.1.tar.gz:

Publisher: publish.yml on hteppl/solobot-web-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file solobot_web_api-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for solobot_web_api-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d75f5f02eb9b0de836d4fb56cf0e0319813b8f6bb46a208013f165f39cbdf6d
MD5 71bdaea30115e8a116942fd3f732cb61
BLAKE2b-256 7d4502b8897b88dd712c2bc0fe3fc8158a31457a4e700ab96bc4a273ea9a2e17

See more details on using hashes here.

Provenance

The following attestation bundles were made for solobot_web_api-1.0.1-py3-none-any.whl:

Publisher: publish.yml on hteppl/solobot-web-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page