Skip to main content

Asynchronous package for using the optSMM API

Project description


OptSMM

Python Version

Python-клиент для работы с SMM-сервисом OptSMM. Позволяет получать баланс, создавать и управлять заказами, получать список услуг и искать сервисы по названию.


Установка

pip install aiohttp
pip install optsmm

Использование

import asyncio
from optsmm import OptSMM

async def main():
    api_key = "ВАШ_API_KEY"
    client = OptSMM(api_key)

    balance, currency = await client.balance()
    print(f"Баланс: {balance} {currency}")

    services = await client.services()
    print("Доступные услуги:", services)

    order_id = await client.create_order(service=1, link="https://instagram.com/example", quantity=1000)
    print("Создан заказ:", order_id)

    status = await client.order_status(order_id)
    print("Статус заказа:", status)

    search_results = await client.search_services("Подписчики")
    print("Найденные сервисы:", search_results)

    cancelled = await client.order_cancel(order_id)
    print("Заказ отменен:", cancelled)

asyncio.run(main())

Методы

  • balance() – возвращает текущий баланс и валюту.
  • services() – возвращает список всех доступных услуг.
  • search_services(query) – поиск услуг по названию.
  • create_order(service, link, quantity, **kwargs) – создание заказа.
  • order_status(order_id) – получение статуса заказа.
  • order_cancel(order_id) – отмена заказа.

Примеры использования

Получение баланса

balance, currency = await client.balance()
print(f"Баланс: {balance} {currency}")

Создание заказа

order_id = await client.create_order(service=5, link="https://t.me/example", quantity=500)

Проверка статуса заказа

status = await client.order_status(order_id)

Поиск сервиса

results = await client.search_services("Лайки")

Отмена заказа

await client.order_cancel(order_id)

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

optsmm-1.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

optsmm-1.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: optsmm-1.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for optsmm-1.0.1.tar.gz
Algorithm Hash digest
SHA256 200440174f1f3085e2280f18f60c597ee368b433620d08ee4454df30ed1a7491
MD5 3c6ab8f73a6c518433ad12541104993f
BLAKE2b-256 0e641ec31a1153fdb538ece4c1b0c9b67a54470d97ba430d60ae00bdb93ad21b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: optsmm-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for optsmm-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c229b3d5143dd0f273a6ffa44b97aacc9bcad5edc493df20729eabcf74b8f692
MD5 4884840050d772940e80f80598c0682b
BLAKE2b-256 eef917af1906cb5a19add44988955bd765d51a476bf82e51f10cbf273fc650cd

See more details on using hashes here.

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